Skip to content

Commit

Permalink
CodeGen from PR 18413 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge abe82531558be49a37c46cc1900f9a01a8949e3c into 927e50063ce9c3defdc8fc97906656dc64a37e51
  • Loading branch information
SDKAuto committed Mar 31, 2022
1 parent 83ec004 commit ea96f68
Show file tree
Hide file tree
Showing 15 changed files with 285 additions and 56 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.14 (Unreleased)
## 1.0.0-beta.1 (2022-03-31)

- Azure Resource Manager DataFactory client library for Java. This package contains Microsoft Azure SDK for DataFactory Management SDK. The Azure Data Factory V2 management API provides a RESTful set of web services that interact with Azure Data Factory V2 services. Package tag package-2018-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-datafactory</artifactId>
<version>1.0.0-beta.13</version>
<version>1.0.0-beta.14</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public DataFactoryManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.datafactory")
.append("/")
.append("1.0.0-beta.13");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.datafactory.models.StoredProcedureParameter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** SQL stored procedure activity properties. */
@Fluent
Expand All @@ -26,8 +23,7 @@ public final class SqlServerStoredProcedureActivityTypeProperties {
* "{Parameter1: {value: "1", type: "int"}}".
*/
@JsonProperty(value = "storedProcedureParameters")
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map<String, StoredProcedureParameter> storedProcedureParameters;
private Object storedProcedureParameters;

/**
* Get the storedProcedureName property: Stored procedure name. Type: string (or Expression with resultType string).
Expand Down Expand Up @@ -55,7 +51,7 @@ public SqlServerStoredProcedureActivityTypeProperties withStoredProcedureName(Ob
*
* @return the storedProcedureParameters value.
*/
public Map<String, StoredProcedureParameter> storedProcedureParameters() {
public Object storedProcedureParameters() {
return this.storedProcedureParameters;
}

Expand All @@ -67,7 +63,7 @@ public Map<String, StoredProcedureParameter> storedProcedureParameters() {
* @return the SqlServerStoredProcedureActivityTypeProperties object itself.
*/
public SqlServerStoredProcedureActivityTypeProperties withStoredProcedureParameters(
Map<String, StoredProcedureParameter> storedProcedureParameters) {
Object storedProcedureParameters) {
this.storedProcedureParameters = storedProcedureParameters;
return this;
}
Expand All @@ -85,16 +81,6 @@ public void validate() {
"Missing required property storedProcedureName in model"
+ " SqlServerStoredProcedureActivityTypeProperties"));
}
if (storedProcedureParameters() != null) {
storedProcedureParameters()
.values()
.forEach(
e -> {
if (e != null) {
e.validate();
}
});
}
}

private static final ClientLogger LOGGER = new ClientLogger(SqlServerStoredProcedureActivityTypeProperties.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public final class CredentialReference {
* Credential reference type.
*/
@JsonProperty(value = "type", required = true)
private String type = "CredentialReference";
private CredentialReferenceType type;

/*
* Reference credential name.
Expand All @@ -33,17 +33,12 @@ public final class CredentialReference {
*/
@JsonIgnore private Map<String, Object> additionalProperties;

/** Creates an instance of CredentialReference class. */
public CredentialReference() {
type = "CredentialReference";
}

/**
* Get the type property: Credential reference type.
*
* @return the type value.
*/
public String type() {
public CredentialReferenceType type() {
return this.type;
}

Expand All @@ -53,7 +48,7 @@ public String type() {
* @param type the type value to set.
* @return the CredentialReference object itself.
*/
public CredentialReference withType(String type) {
public CredentialReference withType(CredentialReferenceType type) {
this.type = type;
return this;
}
Expand Down Expand Up @@ -113,6 +108,11 @@ void withAdditionalProperties(String key, Object value) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (type() == null) {
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property type in model CredentialReference"));
}
if (referenceName() == null) {
throw LOGGER
.logExceptionAsError(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.datafactory.models;

import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

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

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

/** @return known CredentialReferenceType values. */
public static Collection<CredentialReferenceType> values() {
return values(CredentialReferenceType.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public final class DataFlowReference {
* Data flow reference type.
*/
@JsonProperty(value = "type", required = true)
private String type = "DataFlowReference";
private DataFlowReferenceType type;

/*
* Reference data flow name.
Expand All @@ -47,17 +47,12 @@ public final class DataFlowReference {
*/
@JsonIgnore private Map<String, Object> additionalProperties;

/** Creates an instance of DataFlowReference class. */
public DataFlowReference() {
type = "DataFlowReference";
}

/**
* Get the type property: Data flow reference type.
*
* @return the type value.
*/
public String type() {
public DataFlowReferenceType type() {
return this.type;
}

Expand All @@ -67,7 +62,7 @@ public String type() {
* @param type the type value to set.
* @return the DataFlowReference object itself.
*/
public DataFlowReference withType(String type) {
public DataFlowReference withType(DataFlowReferenceType type) {
this.type = type;
return this;
}
Expand Down Expand Up @@ -167,6 +162,11 @@ void withAdditionalProperties(String key, Object value) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (type() == null) {
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property type in model DataFlowReference"));
}
if (referenceName() == null) {
throw LOGGER
.logExceptionAsError(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.datafactory.models;

import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

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

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

/** @return known DataFlowReferenceType values. */
public static Collection<DataFlowReferenceType> values() {
return values(DataFlowReferenceType.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,38 @@
@JsonTypeName("ExecutePipeline")
@Fluent
public final class ExecutePipelineActivity extends ControlActivity {
/*
* Execute pipeline activity policy.
*/
@JsonProperty(value = "policy")
private ExecutePipelineActivityPolicy policy;

/*
* Execute pipeline activity properties.
*/
@JsonProperty(value = "typeProperties", required = true)
private ExecutePipelineActivityTypeProperties innerTypeProperties = new ExecutePipelineActivityTypeProperties();

/**
* Get the policy property: Execute pipeline activity policy.
*
* @return the policy value.
*/
public ExecutePipelineActivityPolicy policy() {
return this.policy;
}

/**
* Set the policy property: Execute pipeline activity policy.
*
* @param policy the policy value to set.
* @return the ExecutePipelineActivity object itself.
*/
public ExecutePipelineActivity withPolicy(ExecutePipelineActivityPolicy policy) {
this.policy = policy;
return this;
}

/**
* Get the innerTypeProperties property: Execute pipeline activity properties.
*
Expand Down Expand Up @@ -140,6 +166,9 @@ public ExecutePipelineActivity withWaitOnCompletion(Boolean waitOnCompletion) {
@Override
public void validate() {
super.validate();
if (policy() != null) {
policy().validate();
}
if (innerTypeProperties() == null) {
throw LOGGER
.logExceptionAsError(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.datafactory.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.HashMap;
import java.util.Map;

/** Execution policy for an execute pipeline activity. */
@Fluent
public final class ExecutePipelineActivityPolicy {
/*
* When set to true, Input from activity is considered as secure and will
* not be logged to monitoring.
*/
@JsonProperty(value = "secureInput")
private Boolean secureInput;

/*
* Execution policy for an execute pipeline activity.
*/
@JsonIgnore private Map<String, Object> additionalProperties;

/**
* Get the secureInput property: When set to true, Input from activity is considered as secure and will not be
* logged to monitoring.
*
* @return the secureInput value.
*/
public Boolean secureInput() {
return this.secureInput;
}

/**
* Set the secureInput property: When set to true, Input from activity is considered as secure and will not be
* logged to monitoring.
*
* @param secureInput the secureInput value to set.
* @return the ExecutePipelineActivityPolicy object itself.
*/
public ExecutePipelineActivityPolicy withSecureInput(Boolean secureInput) {
this.secureInput = secureInput;
return this;
}

/**
* Get the additionalProperties property: Execution policy for an execute pipeline activity.
*
* @return the additionalProperties value.
*/
@JsonAnyGetter
public Map<String, Object> additionalProperties() {
return this.additionalProperties;
}

/**
* Set the additionalProperties property: Execution policy for an execute pipeline activity.
*
* @param additionalProperties the additionalProperties value to set.
* @return the ExecutePipelineActivityPolicy object itself.
*/
public ExecutePipelineActivityPolicy withAdditionalProperties(Map<String, Object> additionalProperties) {
this.additionalProperties = additionalProperties;
return this;
}

@JsonAnySetter
void withAdditionalProperties(String key, Object value) {
if (additionalProperties == null) {
additionalProperties = new HashMap<>();
}
additionalProperties.put(key, value);
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
}
Loading

0 comments on commit ea96f68

Please sign in to comment.