From 281f5e6267b93341f637158d21bc4a999f386534 Mon Sep 17 00:00:00 2001 From: adxsdknet <39844661+adxsdknet@users.noreply.github.com> Date: Fri, 29 Mar 2019 09:50:56 -0700 Subject: [PATCH] AutoPr-DataFactory-arsunda-REST Spec PrNumber 5468 (#5608) * .NET SDK Resource Provider:'DataFactory' REST Spec PR 'https://github.com/Azure/azure-rest-api-specs/pull/5468' REST Spec PR Author 'arsunda' REST Spec PR Last commit * .NET SDK Resource Provider:'DataFactory' REST Spec PR 'https://github.com/Azure/azure-rest-api-specs/pull/5468' REST Spec PR Author 'arsunda' REST Spec PR Last commit --- .../Generated/Models/WebHookActivity.cs | 148 ++++++++++++++++++ .../Generated/Models/WebHookActivityMethod.cs | 21 +++ 2 files changed, 169 insertions(+) create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/WebHookActivity.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/WebHookActivityMethod.cs diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/WebHookActivity.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/WebHookActivity.cs new file mode 100644 index 000000000000..cc81bf7a83ac --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/WebHookActivity.cs @@ -0,0 +1,148 @@ +// +// 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. +// + +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; + + /// + /// WebHook activity. + /// + [Newtonsoft.Json.JsonObject("WebHook")] + [Rest.Serialization.JsonTransformation] + public partial class WebHookActivity : ControlActivity + { + /// + /// Initializes a new instance of the WebHookActivity class. + /// + public WebHookActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebHookActivity class. + /// + /// Activity name. + /// WebHook activity target endpoint and path. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// Specifies the timeout within which the + /// webhook should be called back. If there is no value specified, it + /// defaults to 10 minutes. Type: string. Pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Represents the headers that will be sent to + /// the request. For example, to set the language and type on a + /// request: "headers" : { "Accept-Language": "en-us", "Content-Type": + /// "application/json" }. Type: string (or Expression with resultType + /// string). + /// Represents the payload that will be sent to the + /// endpoint. Required for POST/PUT method, not allowed for GET method + /// Type: string (or Expression with resultType string). + /// Authentication method used for calling + /// the endpoint. + public WebHookActivity(string name, object url, IDictionary additionalProperties = default(IDictionary), string description = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), string timeout = default(string), object headers = default(object), object body = default(object), WebActivityAuthentication authentication = default(WebActivityAuthentication)) + : base(name, additionalProperties, description, dependsOn, userProperties) + { + Url = url; + Timeout = timeout; + Headers = headers; + Body = body; + Authentication = authentication; + CustomInit(); + } + /// + /// Static constructor for WebHookActivity class. + /// + static WebHookActivity() + { + Method = "POST"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets webHook activity target endpoint and path. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets specifies the timeout within which the webhook should + /// be called back. If there is no value specified, it defaults to 10 + /// minutes. Type: string. Pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "typeProperties.timeout")] + public string Timeout { get; set; } + + /// + /// Gets or sets represents the headers that will be sent to the + /// request. For example, to set the language and type on a request: + /// "headers" : { "Accept-Language": "en-us", "Content-Type": + /// "application/json" }. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.headers")] + public object Headers { get; set; } + + /// + /// Gets or sets represents the payload that will be sent to the + /// endpoint. Required for POST/PUT method, not allowed for GET method + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.body")] + public object Body { get; set; } + + /// + /// Gets or sets authentication method used for calling the endpoint. + /// + [JsonProperty(PropertyName = "typeProperties.authentication")] + public WebActivityAuthentication Authentication { get; set; } + + /// + /// Rest API method for target endpoint. + /// + [JsonProperty(PropertyName = "typeProperties.method")] + public static string Method { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + if (Authentication != null) + { + Authentication.Validate(); + } + } + } +} diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/WebHookActivityMethod.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/WebHookActivityMethod.cs new file mode 100644 index 000000000000..877c76ec8db7 --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/WebHookActivityMethod.cs @@ -0,0 +1,21 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for WebHookActivityMethod. + /// + public static class WebHookActivityMethod + { + public const string POST = "POST"; + } +}