Skip to content

Commit 345b9f1

Browse files
author
SDKAuto
committed
CodeGen from PR 20942 in Azure/azure-rest-api-specs
Merge 08364119d684b938c28c69ce54420d80cf3c007c into 812592d05854e761c71f3ba67227e66175d6e7a9
1 parent d9d78da commit 345b9f1

File tree

52 files changed

+692
-221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+692
-221
lines changed

sdk/networkfunction/azure-resourcemanager-networkfunction/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.2 (Unreleased)
3+
## 1.0.0-beta.1 (2022-09-30)
4+
5+
- 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).
46

57
### Features Added
68

sdk/networkfunction/azure-resourcemanager-networkfunction/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager AzureTrafficCollector client library for Java.
44

5-
This package contains Microsoft Azure SDK for AzureTrafficCollector Management SDK. Azure Traffic Collector service. Package tag package-2022-05-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
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).
66

77
## We'd love to hear your feedback
88

@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-networkfunction</artifactId>
35-
<version>1.0.0-beta.1</version>
35+
<version>1.0.0-beta.2</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

sdk/networkfunction/azure-resourcemanager-networkfunction/SAMPLE.md

Lines changed: 51 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@
2222
- [Delete](#collectorpolicies_delete)
2323
- [Get](#collectorpolicies_get)
2424
- [List](#collectorpolicies_list)
25+
- [UpdateTags](#collectorpolicies_updatetags)
2526

2627
## NetworkFunction
2728

2829
- [ListOperations](#networkfunction_listoperations)
2930
### AzureTrafficCollectors_CreateOrUpdate
3031

3132
```java
32-
import java.util.Arrays;
3333
import java.util.HashMap;
3434
import java.util.Map;
3535

3636
/** Samples for AzureTrafficCollectors CreateOrUpdate. */
3737
public final class AzureTrafficCollectorsCreateOrUpdateSamples {
3838
/*
39-
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorCreate.json
39+
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/AzureTrafficCollectorCreate.json
4040
*/
4141
/**
4242
* Sample code: Create a traffic collector.
@@ -51,7 +51,6 @@ public final class AzureTrafficCollectorsCreateOrUpdateSamples {
5151
.withRegion("West US")
5252
.withExistingResourceGroup("rg1")
5353
.withTags(mapOf("key1", "value1"))
54-
.withCollectorPolicies(Arrays.asList())
5554
.create();
5655
}
5756

@@ -76,7 +75,7 @@ import com.azure.core.util.Context;
7675
/** Samples for AzureTrafficCollectors Delete. */
7776
public final class AzureTrafficCollectorsDeleteSamples {
7877
/*
79-
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorDelete.json
78+
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/AzureTrafficCollectorDelete.json
8079
*/
8180
/**
8281
* Sample code: Delete Traffic Collector.
@@ -98,7 +97,7 @@ import com.azure.core.util.Context;
9897
/** Samples for AzureTrafficCollectors GetByResourceGroup. */
9998
public final class AzureTrafficCollectorsGetByResourceGroupSamples {
10099
/*
101-
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorGet.json
100+
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/AzureTrafficCollectorGet.json
102101
*/
103102
/**
104103
* Sample code: Get Traffic Collector.
@@ -123,7 +122,7 @@ import java.util.Map;
123122
/** Samples for AzureTrafficCollectors UpdateTags. */
124123
public final class AzureTrafficCollectorsUpdateTagsSamples {
125124
/*
126-
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorUpdateTags.json
125+
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/AzureTrafficCollectorUpdateTags.json
127126
*/
128127
/**
129128
* Sample code: Update Traffic Collector tags.
@@ -158,7 +157,7 @@ import com.azure.core.util.Context;
158157
/** Samples for AzureTrafficCollectorsByResourceGroup ListByResourceGroup. */
159158
public final class AzureTrafficCollectorsByResourceGroupListByResourceGroupSamples {
160159
/*
161-
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorsByResourceGroupList.json
160+
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/AzureTrafficCollectorsByResourceGroupList.json
162161
*/
163162
/**
164163
* Sample code: List of Traffic Collectors by ResourceGroup.
@@ -180,7 +179,7 @@ import com.azure.core.util.Context;
180179
/** Samples for AzureTrafficCollectorsBySubscription List. */
181180
public final class AzureTrafficCollectorsBySubscriptionListSamples {
182181
/*
183-
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorsBySubscriptionList.json
182+
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/AzureTrafficCollectorsBySubscriptionList.json
184183
*/
185184
/**
186185
* Sample code: List of Traffic Collectors by Subscription.
@@ -210,7 +209,7 @@ import java.util.Arrays;
210209
/** Samples for CollectorPolicies CreateOrUpdate. */
211210
public final class CollectorPoliciesCreateOrUpdateSamples {
212211
/*
213-
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/CollectorPolicyCreate.json
212+
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/CollectorPolicyCreate.json
214213
*/
215214
/**
216215
* Sample code: Create a collection policy.
@@ -222,6 +221,7 @@ public final class CollectorPoliciesCreateOrUpdateSamples {
222221
manager
223222
.collectorPolicies()
224223
.define("cp1")
224+
.withRegion("West US")
225225
.withExistingAzureTrafficCollector("rg1", "atc")
226226
.withIngestionPolicy(
227227
new IngestionPolicyPropertiesFormat()
@@ -256,7 +256,7 @@ import com.azure.core.util.Context;
256256
/** Samples for CollectorPolicies Delete. */
257257
public final class CollectorPoliciesDeleteSamples {
258258
/*
259-
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/CollectorPolicyDelete.json
259+
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/CollectorPolicyDelete.json
260260
*/
261261
/**
262262
* Sample code: Delete Collection Policy.
@@ -278,7 +278,7 @@ import com.azure.core.util.Context;
278278
/** Samples for CollectorPolicies Get. */
279279
public final class CollectorPoliciesGetSamples {
280280
/*
281-
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/CollectorPolicyGet.json
281+
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/CollectorPolicyGet.json
282282
*/
283283
/**
284284
* Sample code: Get Collection Policy.
@@ -300,7 +300,7 @@ import com.azure.core.util.Context;
300300
/** Samples for CollectorPolicies List. */
301301
public final class CollectorPoliciesListSamples {
302302
/*
303-
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/CollectorPoliciesList.json
303+
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/CollectorPoliciesList.json
304304
*/
305305
/**
306306
* Sample code: List of Collection Policies.
@@ -314,6 +314,44 @@ public final class CollectorPoliciesListSamples {
314314
}
315315
```
316316

317+
### CollectorPolicies_UpdateTags
318+
319+
```java
320+
import com.azure.core.util.Context;
321+
import com.azure.resourcemanager.networkfunction.models.CollectorPolicy;
322+
import java.util.HashMap;
323+
import java.util.Map;
324+
325+
/** Samples for CollectorPolicies UpdateTags. */
326+
public final class CollectorPoliciesUpdateTagsSamples {
327+
/*
328+
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/CollectorPolicyUpdateTags.json
329+
*/
330+
/**
331+
* Sample code: Update Collector Policy tags.
332+
*
333+
* @param manager Entry point to AzureTrafficCollectorManager.
334+
*/
335+
public static void updateCollectorPolicyTags(
336+
com.azure.resourcemanager.networkfunction.AzureTrafficCollectorManager manager) {
337+
CollectorPolicy resource =
338+
manager.collectorPolicies().getWithResponse("rg1", "atc", "cp1", Context.NONE).getValue();
339+
resource.update().withTags(mapOf("key1", "value1", "key2", "value2")).apply();
340+
}
341+
342+
@SuppressWarnings("unchecked")
343+
private static <T> Map<String, T> mapOf(Object... inputs) {
344+
Map<String, T> map = new HashMap<>();
345+
for (int i = 0; i < inputs.length; i += 2) {
346+
String key = (String) inputs[i];
347+
T value = (T) inputs[i + 1];
348+
map.put(key, value);
349+
}
350+
return map;
351+
}
352+
}
353+
```
354+
317355
### NetworkFunction_ListOperations
318356

319357
```java
@@ -322,7 +360,7 @@ import com.azure.core.util.Context;
322360
/** Samples for NetworkFunction ListOperations. */
323361
public final class NetworkFunctionListOperationsSamples {
324362
/*
325-
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/OperationsList.json
363+
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/OperationsList.json
326364
*/
327365
/**
328366
* Sample code: OperationsList.

sdk/networkfunction/azure-resourcemanager-networkfunction/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<packaging>jar</packaging>
1414

1515
<name>Microsoft Azure SDK for AzureTrafficCollector Management</name>
16-
<description>This package contains Microsoft Azure SDK for AzureTrafficCollector Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Traffic Collector service. Package tag package-2022-05-01.</description>
16+
<description>This package contains Microsoft Azure SDK for AzureTrafficCollector Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Traffic Collector service. Package tag package-2022-11-01.</description>
1717
<url>https://github.com/Azure/azure-sdk-for-java</url>
1818

1919
<licenses>

sdk/networkfunction/azure-resourcemanager-networkfunction/src/main/java/com/azure/resourcemanager/networkfunction/fluent/AzureTrafficCollectorsClient.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,28 @@ public interface AzureTrafficCollectorsClient {
2020
*
2121
* @param resourceGroupName The name of the resource group.
2222
* @param azureTrafficCollectorName Azure Traffic Collector name.
23+
* @param context The context to associate with this operation.
2324
* @throws IllegalArgumentException thrown if parameters fail the validation.
2425
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2526
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
26-
* @return the specified Azure Traffic Collector in a specified resource group.
27+
* @return the specified Azure Traffic Collector in a specified resource group along with {@link Response}.
2728
*/
2829
@ServiceMethod(returns = ReturnType.SINGLE)
29-
AzureTrafficCollectorInner getByResourceGroup(String resourceGroupName, String azureTrafficCollectorName);
30+
Response<AzureTrafficCollectorInner> getByResourceGroupWithResponse(
31+
String resourceGroupName, String azureTrafficCollectorName, Context context);
3032

3133
/**
3234
* Gets the specified Azure Traffic Collector in a specified resource group.
3335
*
3436
* @param resourceGroupName The name of the resource group.
3537
* @param azureTrafficCollectorName Azure Traffic Collector name.
36-
* @param context The context to associate with this operation.
3738
* @throws IllegalArgumentException thrown if parameters fail the validation.
3839
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3940
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
40-
* @return the specified Azure Traffic Collector in a specified resource group along with {@link Response}.
41+
* @return the specified Azure Traffic Collector in a specified resource group.
4142
*/
4243
@ServiceMethod(returns = ReturnType.SINGLE)
43-
Response<AzureTrafficCollectorInner> getByResourceGroupWithResponse(
44-
String resourceGroupName, String azureTrafficCollectorName, Context context);
44+
AzureTrafficCollectorInner getByResourceGroup(String resourceGroupName, String azureTrafficCollectorName);
4545

4646
/**
4747
* Creates or updates a Azure Traffic Collector resource.
@@ -170,28 +170,28 @@ SyncPoller<PollResult<Void>, Void> beginDelete(
170170
* @param resourceGroupName The name of the resource group.
171171
* @param azureTrafficCollectorName Azure Traffic Collector name.
172172
* @param parameters Parameters supplied to update Azure Traffic Collector tags.
173+
* @param context The context to associate with this operation.
173174
* @throws IllegalArgumentException thrown if parameters fail the validation.
174175
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
175176
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
176-
* @return azure Traffic Collector resource.
177+
* @return azure Traffic Collector resource along with {@link Response}.
177178
*/
178179
@ServiceMethod(returns = ReturnType.SINGLE)
179-
AzureTrafficCollectorInner updateTags(
180-
String resourceGroupName, String azureTrafficCollectorName, TagsObject parameters);
180+
Response<AzureTrafficCollectorInner> updateTagsWithResponse(
181+
String resourceGroupName, String azureTrafficCollectorName, TagsObject parameters, Context context);
181182

182183
/**
183184
* Updates the specified Azure Traffic Collector tags.
184185
*
185186
* @param resourceGroupName The name of the resource group.
186187
* @param azureTrafficCollectorName Azure Traffic Collector name.
187188
* @param parameters Parameters supplied to update Azure Traffic Collector tags.
188-
* @param context The context to associate with this operation.
189189
* @throws IllegalArgumentException thrown if parameters fail the validation.
190190
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
191191
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
192-
* @return azure Traffic Collector resource along with {@link Response}.
192+
* @return azure Traffic Collector resource.
193193
*/
194194
@ServiceMethod(returns = ReturnType.SINGLE)
195-
Response<AzureTrafficCollectorInner> updateTagsWithResponse(
196-
String resourceGroupName, String azureTrafficCollectorName, TagsObject parameters, Context context);
195+
AzureTrafficCollectorInner updateTags(
196+
String resourceGroupName, String azureTrafficCollectorName, TagsObject parameters);
197197
}

0 commit comments

Comments
 (0)