Skip to content
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

[AutoPR datafactory/resource-manager] [Datafactory] Add Azure Function to Swagger #2828

Merged
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
/**
* 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.
*/

package com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.microsoft.rest.serializer.JsonFlatten;

/**
* Azure Function activity.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("AzureFunctionActivity")
@JsonFlatten
public class AzureFunctionActivity extends ExecutionActivity {
/**
* Rest API method for target endpoint. Possible values include: 'GET',
* 'POST', 'PUT', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE'.
*/
@JsonProperty(value = "typeProperties.method", required = true)
private AzureFunctionActivityMethod method;

/**
* Name of the Function that the Azure Function Activity will call.
*/
@JsonProperty(value = "typeProperties.functionName", required = true)
private Object functionName;

/**
* 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(value = "typeProperties.headers")
private Object headers;

/**
* 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(value = "typeProperties.body")
private Object body;

/**
* Get rest API method for target endpoint. Possible values include: 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE'.
*
* @return the method value
*/
public AzureFunctionActivityMethod method() {
return this.method;
}

/**
* Set rest API method for target endpoint. Possible values include: 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE'.
*
* @param method the method value to set
* @return the AzureFunctionActivity object itself.
*/
public AzureFunctionActivity withMethod(AzureFunctionActivityMethod method) {
this.method = method;
return this;
}

/**
* Get name of the Function that the Azure Function Activity will call.
*
* @return the functionName value
*/
public Object functionName() {
return this.functionName;
}

/**
* Set name of the Function that the Azure Function Activity will call.
*
* @param functionName the functionName value to set
* @return the AzureFunctionActivity object itself.
*/
public AzureFunctionActivity withFunctionName(Object functionName) {
this.functionName = functionName;
return this;
}

/**
* Get 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).
*
* @return the headers value
*/
public Object headers() {
return this.headers;
}

/**
* Set 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).
*
* @param headers the headers value to set
* @return the AzureFunctionActivity object itself.
*/
public AzureFunctionActivity withHeaders(Object headers) {
this.headers = headers;
return this;
}

/**
* Get 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).
*
* @return the body value
*/
public Object body() {
return this.body;
}

/**
* Set 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).
*
* @param body the body value to set
* @return the AzureFunctionActivity object itself.
*/
public AzureFunctionActivity withBody(Object body) {
this.body = body;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* 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.
*/

package com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for AzureFunctionActivityMethod.
*/
public final class AzureFunctionActivityMethod extends ExpandableStringEnum<AzureFunctionActivityMethod> {
/** Static value GET for AzureFunctionActivityMethod. */
public static final AzureFunctionActivityMethod GET = fromString("GET");

/** Static value POST for AzureFunctionActivityMethod. */
public static final AzureFunctionActivityMethod POST = fromString("POST");

/** Static value PUT for AzureFunctionActivityMethod. */
public static final AzureFunctionActivityMethod PUT = fromString("PUT");

/** Static value DELETE for AzureFunctionActivityMethod. */
public static final AzureFunctionActivityMethod DELETE = fromString("DELETE");

/** Static value OPTIONS for AzureFunctionActivityMethod. */
public static final AzureFunctionActivityMethod OPTIONS = fromString("OPTIONS");

/** Static value HEAD for AzureFunctionActivityMethod. */
public static final AzureFunctionActivityMethod HEAD = fromString("HEAD");

/** Static value TRACE for AzureFunctionActivityMethod. */
public static final AzureFunctionActivityMethod TRACE = fromString("TRACE");

/**
* Creates or finds a AzureFunctionActivityMethod from its string representation.
* @param name a name to look for
* @return the corresponding AzureFunctionActivityMethod
*/
@JsonCreator
public static AzureFunctionActivityMethod fromString(String name) {
return fromString(name, AzureFunctionActivityMethod.class);
}

/**
* @return known AzureFunctionActivityMethod values
*/
public static Collection<AzureFunctionActivityMethod> values() {
return values(AzureFunctionActivityMethod.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/**
* 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.
*/

package com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.azure.management.datafactoryv2.v2017_09_01_preview.implementation.LinkedServiceInner;

/**
* Azure Function linked service.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("AzureFunction")
@JsonFlatten
public class AzureFunctionLinkedService extends LinkedServiceInner {
/**
* The endpoint of the Azure Function App. URL will be in the format
* https://&lt;accountName&gt;.azurewebsites.net.
*/
@JsonProperty(value = "typeProperties.functionAppUrl", required = true)
private Object functionAppUrl;

/**
* Function or Host key for Azure Function App.
*/
@JsonProperty(value = "typeProperties.functionKey")
private Object functionKey;

/**
* The encrypted credential used for authentication. Credentials are
* encrypted using the integration runtime credential manager. Type: string
* (or Expression with resultType string).
*/
@JsonProperty(value = "typeProperties.encryptedCredential")
private Object encryptedCredential;

/**
* Get the endpoint of the Azure Function App. URL will be in the format https://&lt;accountName&gt;.azurewebsites.net.
*
* @return the functionAppUrl value
*/
public Object functionAppUrl() {
return this.functionAppUrl;
}

/**
* Set the endpoint of the Azure Function App. URL will be in the format https://&lt;accountName&gt;.azurewebsites.net.
*
* @param functionAppUrl the functionAppUrl value to set
* @return the AzureFunctionLinkedService object itself.
*/
public AzureFunctionLinkedService withFunctionAppUrl(Object functionAppUrl) {
this.functionAppUrl = functionAppUrl;
return this;
}

/**
* Get function or Host key for Azure Function App.
*
* @return the functionKey value
*/
public Object functionKey() {
return this.functionKey;
}

/**
* Set function or Host key for Azure Function App.
*
* @param functionKey the functionKey value to set
* @return the AzureFunctionLinkedService object itself.
*/
public AzureFunctionLinkedService withFunctionKey(Object functionKey) {
this.functionKey = functionKey;
return this;
}

/**
* Get the encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string).
*
* @return the encryptedCredential value
*/
public Object encryptedCredential() {
return this.encryptedCredential;
}

/**
* Set the encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string).
*
* @param encryptedCredential the encryptedCredential value to set
* @return the AzureFunctionLinkedService object itself.
*/
public AzureFunctionLinkedService withEncryptedCredential(Object encryptedCredential) {
this.encryptedCredential = encryptedCredential;
return this;
}

}
Loading