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

[Automation] Generate Fluent Lite from datafactory#package-2018-06 #36972

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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,428 changes: 1,424 additions & 4 deletions sdk/datafactory/azure-resourcemanager-datafactory/CHANGELOG.md

Large diffs are not rendered by default.

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.22</version>
<version>1.0.0-beta.23</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -190,3 +190,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fdatafactory%2Fazure-resourcemanager-datafactory%2FREADME.png)
232 changes: 232 additions & 0 deletions sdk/datafactory/azure-resourcemanager-datafactory/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@

- [QueryByPipelineRun](#activityruns_querybypipelinerun)

## ChangeDataCapture

- [CreateOrUpdate](#changedatacapture_createorupdate)
- [Delete](#changedatacapture_delete)
- [Get](#changedatacapture_get)
- [ListByFactory](#changedatacapture_listbyfactory)
- [Start](#changedatacapture_start)
- [Status](#changedatacapture_status)
- [Stop](#changedatacapture_stop)

## CredentialOperations

- [CreateOrUpdate](#credentialoperations_createorupdate)
Expand Down Expand Up @@ -193,6 +203,219 @@ public final class ActivityRunsQueryByPipelineRunSamples {
}
```

### ChangeDataCapture_CreateOrUpdate

```java
import com.azure.resourcemanager.datafactory.models.ChangeDataCaptureResource;
import com.azure.resourcemanager.datafactory.models.MapperPolicy;
import com.azure.resourcemanager.datafactory.models.MapperSourceConnectionsInfo;
import com.azure.resourcemanager.datafactory.models.MapperTargetConnectionsInfo;
import java.util.List;

/** Samples for ChangeDataCapture CreateOrUpdate. */
public final class ChangeDataCaptureCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Create.json
*/
/**
* Sample code: ChangeDataCapture_Create.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void changeDataCaptureCreate(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager
.changeDataCaptures()
.define("exampleChangeDataCapture")
.withExistingFactory("exampleResourceGroup", "exampleFactoryName")
.withSourceConnectionsInfo((List<MapperSourceConnectionsInfo>) null)
.withTargetConnectionsInfo((List<MapperTargetConnectionsInfo>) null)
.withPolicy((MapperPolicy) null)
.withDescription(
"Sample demo change data capture to transfer data from delimited (csv) to Azure SQL Database with"
+ " automapped and non-automapped mappings.")
.withAllowVNetOverride(false)
.create();
}

/*
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Update.json
*/
/**
* Sample code: ChangeDataCapture_Update.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void changeDataCaptureUpdate(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
ChangeDataCaptureResource resource =
manager
.changeDataCaptures()
.getWithResponse(
"exampleResourceGroup",
"exampleFactoryName",
"exampleChangeDataCapture",
null,
com.azure.core.util.Context.NONE)
.getValue();
resource
.update()
.withDescription(
"Sample demo change data capture to transfer data from delimited (csv) to Azure SQL Database. Updating"
+ " table mappings.")
.withAllowVNetOverride(false)
.withStatus("Stopped")
.apply();
}
}
```

### ChangeDataCapture_Delete

```java
/** Samples for ChangeDataCapture Delete. */
public final class ChangeDataCaptureDeleteSamples {
/*
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Delete.json
*/
/**
* Sample code: ChangeDataCapture_Delete.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void changeDataCaptureDelete(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager
.changeDataCaptures()
.deleteWithResponse(
"exampleResourceGroup",
"exampleFactoryName",
"exampleChangeDataCapture",
com.azure.core.util.Context.NONE);
}
}
```

### ChangeDataCapture_Get

```java
/** Samples for ChangeDataCapture Get. */
public final class ChangeDataCaptureGetSamples {
/*
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Get.json
*/
/**
* Sample code: ChangeDataCapture_Get.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void changeDataCaptureGet(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager
.changeDataCaptures()
.getWithResponse(
"exampleResourceGroup",
"exampleFactoryName",
"exampleChangeDataCapture",
null,
com.azure.core.util.Context.NONE);
}
}
```

### ChangeDataCapture_ListByFactory

```java
/** Samples for ChangeDataCapture ListByFactory. */
public final class ChangeDataCaptureListByFactorySamples {
/*
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_ListByFactory.json
*/
/**
* Sample code: ChangeDataCapture_ListByFactory.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void changeDataCaptureListByFactory(
com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager
.changeDataCaptures()
.listByFactory("exampleResourceGroup", "exampleFactoryName", com.azure.core.util.Context.NONE);
}
}
```

### ChangeDataCapture_Start

```java
/** Samples for ChangeDataCapture Start. */
public final class ChangeDataCaptureStartSamples {
/*
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Start.json
*/
/**
* Sample code: ChangeDataCapture_Start.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void changeDataCaptureStart(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager
.changeDataCaptures()
.startWithResponse(
"exampleResourceGroup",
"exampleFactoryName",
"exampleChangeDataCapture",
com.azure.core.util.Context.NONE);
}
}
```

### ChangeDataCapture_Status

```java
/** Samples for ChangeDataCapture Status. */
public final class ChangeDataCaptureStatusSamples {
/*
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Status.json
*/
/**
* Sample code: ChangeDataCapture_Start.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void changeDataCaptureStart(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager
.changeDataCaptures()
.statusWithResponse(
"exampleResourceGroup",
"exampleFactoryName",
"exampleChangeDataCapture",
com.azure.core.util.Context.NONE);
}
}
```

### ChangeDataCapture_Stop

```java
/** Samples for ChangeDataCapture Stop. */
public final class ChangeDataCaptureStopSamples {
/*
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/ChangeDataCapture_Stop.json
*/
/**
* Sample code: ChangeDataCapture_Stop.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void changeDataCaptureStop(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager
.changeDataCaptures()
.stopWithResponse(
"exampleResourceGroup",
"exampleFactoryName",
"exampleChangeDataCapture",
com.azure.core.util.Context.NONE);
}
}
```

### CredentialOperations_CreateOrUpdate

```java
Expand Down Expand Up @@ -415,6 +638,7 @@ public final class DataFlowDebugSessionAddDataFlowSamples {
com.azure.core.util.Context.NONE);
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -476,6 +700,7 @@ public final class DataFlowDebugSessionCreateSamples {
com.azure.core.util.Context.NONE);
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -900,6 +1125,7 @@ public final class DatasetsCreateOrUpdateSamples {
.apply();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -1309,6 +1535,7 @@ public final class FactoriesUpdateSamples {
resource.update().withTags(mapOf("exampleTag", "exampleValue")).apply();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -2223,6 +2450,7 @@ public final class ManagedPrivateEndpointsCreateOrUpdateSamples {
.create();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -2341,6 +2569,7 @@ public final class ManagedVirtualNetworksCreateOrUpdateSamples {
.create();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -2688,6 +2917,7 @@ public final class PipelinesCreateOrUpdateSamples {
.apply();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -2740,6 +2970,7 @@ public final class PipelinesCreateRunSamples {
com.azure.core.util.Context.NONE);
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -3154,6 +3385,7 @@ public final class TriggersCreateOrUpdateSamples {
.apply();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.datafactory.fluent.DataFactoryManagementClient;
import com.azure.resourcemanager.datafactory.implementation.ActivityRunsImpl;
import com.azure.resourcemanager.datafactory.implementation.ChangeDataCapturesImpl;
import com.azure.resourcemanager.datafactory.implementation.CredentialOperationsImpl;
import com.azure.resourcemanager.datafactory.implementation.DataFactoryManagementClientBuilder;
import com.azure.resourcemanager.datafactory.implementation.DataFlowDebugSessionsImpl;
Expand All @@ -48,6 +49,7 @@
import com.azure.resourcemanager.datafactory.implementation.TriggerRunsImpl;
import com.azure.resourcemanager.datafactory.implementation.TriggersImpl;
import com.azure.resourcemanager.datafactory.models.ActivityRuns;
import com.azure.resourcemanager.datafactory.models.ChangeDataCaptures;
import com.azure.resourcemanager.datafactory.models.CredentialOperations;
import com.azure.resourcemanager.datafactory.models.DataFlowDebugSessions;
import com.azure.resourcemanager.datafactory.models.DataFlows;
Expand Down Expand Up @@ -125,6 +127,8 @@ public final class DataFactoryManager {

private GlobalParameters globalParameters;

private ChangeDataCaptures changeDataCaptures;

private final DataFactoryManagementClient clientObject;

private DataFactoryManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Expand Down Expand Up @@ -290,7 +294,7 @@ public DataFactoryManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.datafactory")
.append("/")
.append("1.0.0-beta.22");
.append("1.0.0-beta.23");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -620,8 +624,22 @@ public GlobalParameters globalParameters() {
}

/**
* @return Wrapped service client DataFactoryManagementClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
* Gets the resource collection API of ChangeDataCaptures. It manages ChangeDataCaptureResource.
*
* @return Resource collection API of ChangeDataCaptures.
*/
public ChangeDataCaptures changeDataCaptures() {
if (this.changeDataCaptures == null) {
this.changeDataCaptures = new ChangeDataCapturesImpl(clientObject.getChangeDataCaptures(), this);
}
return changeDataCaptures;
}

/**
* Gets wrapped service client DataFactoryManagementClient providing direct access to the underlying auto-generated
* API implementation, based on Azure REST API.
*
* @return Wrapped service client DataFactoryManagementClient.
*/
public DataFactoryManagementClient serviceClient() {
return this.clientObject;
Expand Down
Loading