Skip to content

Commit

Permalink
CodeGen from PR 25219 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Renormalize line endings from CRLF to LF (Azure#25219)

- Fixes Azure#25212 
- Files were committed with CRLF instead of LF
- Should be prevented going forward due to settings in `.gitattributes`, but clients can always force add files with CRLF
- Related to Azure#24817
- Issue seen before in #4746 and #3786
  • Loading branch information
SDKAuto committed Aug 9, 2023
1 parent ebcc4ec commit 947081a
Show file tree
Hide file tree
Showing 51 changed files with 138 additions and 1,573 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2023-08-09)

- Azure Resource Manager AzureTrafficCollector client library for Java. This package contains Microsoft Azure SDK for AzureTrafficCollector Management SDK. Azure Traffic Collector service. Package tag package-2022-11-01. 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-networkfunction</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -103,3 +103,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%2Fnetworkfunction%2Fazure-resourcemanager-networkfunction%2FREADME.png)
50 changes: 19 additions & 31 deletions sdk/networkfunction/azure-resourcemanager-networkfunction/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public final class AzureTrafficCollectorsCreateOrUpdateSamples {
.define("atc")
.withRegion("West US")
.withExistingResourceGroup("rg1")
.withTags(mapOf("key1", "value1"))
.withTags(mapOf("key1", "fakeTokenPlaceholder"))
.create();
}

Expand All @@ -70,8 +70,6 @@ public final class AzureTrafficCollectorsCreateOrUpdateSamples {
### AzureTrafficCollectors_Delete

```java
import com.azure.core.util.Context;

/** Samples for AzureTrafficCollectors Delete. */
public final class AzureTrafficCollectorsDeleteSamples {
/*
Expand All @@ -84,16 +82,14 @@ public final class AzureTrafficCollectorsDeleteSamples {
*/
public static void deleteTrafficCollector(
com.azure.resourcemanager.networkfunction.AzureTrafficCollectorManager manager) {
manager.azureTrafficCollectors().delete("rg1", "atc", Context.NONE);
manager.azureTrafficCollectors().delete("rg1", "atc", com.azure.core.util.Context.NONE);
}
}
```

### AzureTrafficCollectors_GetByResourceGroup

```java
import com.azure.core.util.Context;

/** Samples for AzureTrafficCollectors GetByResourceGroup. */
public final class AzureTrafficCollectorsGetByResourceGroupSamples {
/*
Expand All @@ -106,15 +102,14 @@ public final class AzureTrafficCollectorsGetByResourceGroupSamples {
*/
public static void getTrafficCollector(
com.azure.resourcemanager.networkfunction.AzureTrafficCollectorManager manager) {
manager.azureTrafficCollectors().getByResourceGroupWithResponse("rg1", "atc", Context.NONE);
manager.azureTrafficCollectors().getByResourceGroupWithResponse("rg1", "atc", com.azure.core.util.Context.NONE);
}
}
```

### AzureTrafficCollectors_UpdateTags

```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.networkfunction.models.AzureTrafficCollector;
import java.util.HashMap;
import java.util.Map;
Expand All @@ -132,8 +127,11 @@ public final class AzureTrafficCollectorsUpdateTagsSamples {
public static void updateTrafficCollectorTags(
com.azure.resourcemanager.networkfunction.AzureTrafficCollectorManager manager) {
AzureTrafficCollector resource =
manager.azureTrafficCollectors().getByResourceGroupWithResponse("rg1", "atc", Context.NONE).getValue();
resource.update().withTags(mapOf("key1", "value1", "key2", "value2")).apply();
manager
.azureTrafficCollectors()
.getByResourceGroupWithResponse("rg1", "atc", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")).apply();
}

@SuppressWarnings("unchecked")
Expand All @@ -152,8 +150,6 @@ public final class AzureTrafficCollectorsUpdateTagsSamples {
### AzureTrafficCollectorsByResourceGroup_ListByResourceGroup

```java
import com.azure.core.util.Context;

/** Samples for AzureTrafficCollectorsByResourceGroup ListByResourceGroup. */
public final class AzureTrafficCollectorsByResourceGroupListByResourceGroupSamples {
/*
Expand All @@ -166,16 +162,14 @@ public final class AzureTrafficCollectorsByResourceGroupListByResourceGroupSampl
*/
public static void listOfTrafficCollectorsByResourceGroup(
com.azure.resourcemanager.networkfunction.AzureTrafficCollectorManager manager) {
manager.azureTrafficCollectorsByResourceGroups().listByResourceGroup("rg1", Context.NONE);
manager.azureTrafficCollectorsByResourceGroups().listByResourceGroup("rg1", com.azure.core.util.Context.NONE);
}
}
```

### AzureTrafficCollectorsBySubscription_List

```java
import com.azure.core.util.Context;

/** Samples for AzureTrafficCollectorsBySubscription List. */
public final class AzureTrafficCollectorsBySubscriptionListSamples {
/*
Expand All @@ -188,7 +182,7 @@ public final class AzureTrafficCollectorsBySubscriptionListSamples {
*/
public static void listOfTrafficCollectorsBySubscription(
com.azure.resourcemanager.networkfunction.AzureTrafficCollectorManager manager) {
manager.azureTrafficCollectorsBySubscriptions().list(Context.NONE);
manager.azureTrafficCollectorsBySubscriptions().list(com.azure.core.util.Context.NONE);
}
}
```
Expand Down Expand Up @@ -251,8 +245,6 @@ public final class CollectorPoliciesCreateOrUpdateSamples {
### CollectorPolicies_Delete

```java
import com.azure.core.util.Context;

/** Samples for CollectorPolicies Delete. */
public final class CollectorPoliciesDeleteSamples {
/*
Expand All @@ -265,16 +257,14 @@ public final class CollectorPoliciesDeleteSamples {
*/
public static void deleteCollectionPolicy(
com.azure.resourcemanager.networkfunction.AzureTrafficCollectorManager manager) {
manager.collectorPolicies().delete("rg1", "atc", "cp1", Context.NONE);
manager.collectorPolicies().delete("rg1", "atc", "cp1", com.azure.core.util.Context.NONE);
}
}
```

### CollectorPolicies_Get

```java
import com.azure.core.util.Context;

/** Samples for CollectorPolicies Get. */
public final class CollectorPoliciesGetSamples {
/*
Expand All @@ -287,16 +277,14 @@ public final class CollectorPoliciesGetSamples {
*/
public static void getCollectionPolicy(
com.azure.resourcemanager.networkfunction.AzureTrafficCollectorManager manager) {
manager.collectorPolicies().getWithResponse("rg1", "atc", "cp1", Context.NONE);
manager.collectorPolicies().getWithResponse("rg1", "atc", "cp1", com.azure.core.util.Context.NONE);
}
}
```

### CollectorPolicies_List

```java
import com.azure.core.util.Context;

/** Samples for CollectorPolicies List. */
public final class CollectorPoliciesListSamples {
/*
Expand All @@ -309,15 +297,14 @@ public final class CollectorPoliciesListSamples {
*/
public static void listOfCollectionPolicies(
com.azure.resourcemanager.networkfunction.AzureTrafficCollectorManager manager) {
manager.collectorPolicies().list("rg1", "atc", Context.NONE);
manager.collectorPolicies().list("rg1", "atc", com.azure.core.util.Context.NONE);
}
}
```

### CollectorPolicies_UpdateTags

```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.networkfunction.models.CollectorPolicy;
import java.util.HashMap;
import java.util.Map;
Expand All @@ -335,8 +322,11 @@ public final class CollectorPoliciesUpdateTagsSamples {
public static void updateCollectorPolicyTags(
com.azure.resourcemanager.networkfunction.AzureTrafficCollectorManager manager) {
CollectorPolicy resource =
manager.collectorPolicies().getWithResponse("rg1", "atc", "cp1", Context.NONE).getValue();
resource.update().withTags(mapOf("key1", "value1", "key2", "value2")).apply();
manager
.collectorPolicies()
.getWithResponse("rg1", "atc", "cp1", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")).apply();
}

@SuppressWarnings("unchecked")
Expand All @@ -355,8 +345,6 @@ public final class CollectorPoliciesUpdateTagsSamples {
### NetworkFunction_ListOperations

```java
import com.azure.core.util.Context;

/** Samples for NetworkFunction ListOperations. */
public final class NetworkFunctionListOperationsSamples {
/*
Expand All @@ -368,7 +356,7 @@ public final class NetworkFunctionListOperationsSamples {
* @param manager Entry point to AzureTrafficCollectorManager.
*/
public static void operationsList(com.azure.resourcemanager.networkfunction.AzureTrafficCollectorManager manager) {
manager.networkFunctions().listOperations(Context.NONE);
manager.networkFunctions().listOperations(com.azure.core.util.Context.NONE);
}
}
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) AutoRest Code Generator.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
Expand Down Expand Up @@ -38,7 +43,8 @@
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.skip>true</jacoco.skip>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public AzureTrafficCollectorManager authenticate(TokenCredential credential, Azu
.append("-")
.append("com.azure.resourcemanager.networkfunction")
.append("/")
.append("1.0.0-beta.2");
.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 @@ -67,8 +67,7 @@ public final class AzureTrafficCollectorsByResourceGroupsClientImpl
public interface AzureTrafficCollectorsByResourceGroupsService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction"
+ "/azureTrafficCollectors")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<AzureTrafficCollectorListResult>> listByResourceGroup(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ public final class AzureTrafficCollectorsClientImpl implements AzureTrafficColle
public interface AzureTrafficCollectorsService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction"
+ "/azureTrafficCollectors/{azureTrafficCollectorName}")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<AzureTrafficCollectorInner>> getByResourceGroup(
Expand All @@ -79,8 +78,7 @@ Mono<Response<AzureTrafficCollectorInner>> getByResourceGroup(

@Headers({"Content-Type: application/json"})
@Put(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction"
+ "/azureTrafficCollectors/{azureTrafficCollectorName}")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}")
@ExpectedResponses({200, 201})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> createOrUpdate(
Expand All @@ -95,8 +93,7 @@ Mono<Response<Flux<ByteBuffer>>> createOrUpdate(

@Headers({"Content-Type: application/json"})
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction"
+ "/azureTrafficCollectors/{azureTrafficCollectorName}")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}")
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> delete(
Expand All @@ -110,8 +107,7 @@ Mono<Response<Flux<ByteBuffer>>> delete(

@Headers({"Content-Type: application/json"})
@Patch(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction"
+ "/azureTrafficCollectors/{azureTrafficCollectorName}")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<AzureTrafficCollectorInner>> updateTags(
Expand Down Expand Up @@ -465,7 +461,7 @@ private PollerFlux<PollResult<AzureTrafficCollectorInner>, AzureTrafficCollector
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<AzureTrafficCollectorInner>, AzureTrafficCollectorInner> beginCreateOrUpdate(
String resourceGroupName, String azureTrafficCollectorName, AzureTrafficCollectorInner parameters) {
return beginCreateOrUpdateAsync(resourceGroupName, azureTrafficCollectorName, parameters).getSyncPoller();
return this.beginCreateOrUpdateAsync(resourceGroupName, azureTrafficCollectorName, parameters).getSyncPoller();
}

/**
Expand All @@ -486,7 +482,8 @@ public SyncPoller<PollResult<AzureTrafficCollectorInner>, AzureTrafficCollectorI
String azureTrafficCollectorName,
AzureTrafficCollectorInner parameters,
Context context) {
return beginCreateOrUpdateAsync(resourceGroupName, azureTrafficCollectorName, parameters, context)
return this
.beginCreateOrUpdateAsync(resourceGroupName, azureTrafficCollectorName, parameters, context)
.getSyncPoller();
}

Expand Down Expand Up @@ -724,7 +721,7 @@ private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String azureTrafficCollectorName) {
return beginDeleteAsync(resourceGroupName, azureTrafficCollectorName).getSyncPoller();
return this.beginDeleteAsync(resourceGroupName, azureTrafficCollectorName).getSyncPoller();
}

/**
Expand All @@ -741,7 +738,7 @@ public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName,
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String azureTrafficCollectorName, Context context) {
return beginDeleteAsync(resourceGroupName, azureTrafficCollectorName, context).getSyncPoller();
return this.beginDeleteAsync(resourceGroupName, azureTrafficCollectorName, context).getSyncPoller();
}

/**
Expand Down
Loading

0 comments on commit 947081a

Please sign in to comment.