Skip to content

Commit d34d05f

Browse files
authored
[Automation] Generate Fluent Lite from applicationinsights#package-2022-02-01 (Azure#27845)
1 parent 924a4e7 commit d34d05f

File tree

147 files changed

+572
-729
lines changed

Some content is hidden

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

147 files changed

+572
-729
lines changed

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
# Release History
22

3-
## 1.0.0-beta.4 (Unreleased)
3+
## 1.0.0-beta.4 (2022-03-24)
44

5-
### Features Added
5+
- Azure Resource Manager ApplicationInsights client library for Java. This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2022-02-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
### Breaking Changes
88

9-
### Bugs Fixed
9+
#### `models.Workbooks` was modified
10+
11+
* `getByResourceGroupWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
12+
* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed
13+
14+
### Features Added
15+
16+
#### `models.Workbooks` was modified
1017

11-
### Other Changes
18+
* `getByIdWithResponse(java.lang.String,java.lang.Boolean,com.azure.core.util.Context)` was added
19+
* `getByResourceGroupWithResponse(java.lang.String,java.lang.String,java.lang.Boolean,com.azure.core.util.Context)` was added
1220

1321
## 1.0.0-beta.3 (2022-01-30)
1422

sdk/applicationinsights/azure-resourcemanager-applicationinsights/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 ApplicationInsights client library for Java.
44

5-
This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2022-01-11. 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 ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2022-02-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-applicationinsights</artifactId>
35-
<version>1.0.0-beta.3</version>
35+
<version>1.0.0-beta.4</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

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

Lines changed: 43 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2448,7 +2448,6 @@ import com.azure.resourcemanager.applicationinsights.models.Kind;
24482448
import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType;
24492449
import com.azure.resourcemanager.applicationinsights.models.UserAssignedIdentity;
24502450
import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity;
2451-
import java.util.Arrays;
24522451
import java.util.HashMap;
24532452
import java.util.Map;
24542453

@@ -2469,27 +2468,25 @@ public final class WorkbooksCreateOrUpdateSamples {
24692468
.define("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2")
24702469
.withRegion("westus")
24712470
.withExistingResourceGroup("my-resource-group")
2472-
.withTags(mapOf("hidden-title", "tttt"))
24732471
.withIdentity(
24742472
new WorkbookResourceIdentity()
24752473
.withType(ManagedServiceIdentityType.USER_ASSIGNED)
24762474
.withUserAssignedIdentities(
24772475
mapOf(
2478-
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
2476+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid",
24792477
new UserAssignedIdentity())))
24802478
.withKind(Kind.SHARED)
2481-
.withEtag("\"4a00f78d-0000-0700-0000-5f8f616c1000\"")
2482-
.withDisplayName("tttt")
2479+
.withDisplayName("Sample workbook")
24832480
.withSerializedData(
24842481
"{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text -"
2485-
+ " 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup\"]}")
2482+
+ " 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group\"]}")
24862483
.withVersion("Notebook/1.0")
24872484
.withCategory("workbook")
2488-
.withTagsPropertiesTags(Arrays.asList())
24892485
.withStorageUri(
2490-
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/MyGroup/providers/Microsoft.Storage/storageAccounts/testStorage/blobServices/default/containers/testContainer")
2486+
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer")
24912487
.withDescription("Sample workbook")
2492-
.withSourceIdParameter("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup")
2488+
.withSourceIdParameter(
2489+
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group")
24932490
.create();
24942491
}
24952492

@@ -2504,12 +2501,12 @@ public final class WorkbooksCreateOrUpdateSamples {
25042501
public static void workbookAdd(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
25052502
manager
25062503
.workbooks()
2507-
.define("deadb33f-8bee-4d3b-a059-9be8dac93960")
2508-
.withRegion("west us")
2504+
.define("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2")
2505+
.withRegion("westus")
25092506
.withExistingResourceGroup("my-resource-group")
25102507
.withTags(mapOf("TagSample01", "sample01", "TagSample02", "sample02"))
25112508
.withKind(Kind.SHARED)
2512-
.withDisplayName("tttt")
2509+
.withDisplayName("Sample workbook")
25132510
.withSerializedData(
25142511
"{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r"
25152512
+ "\\n"
@@ -2532,7 +2529,8 @@ public final class WorkbooksCreateOrUpdateSamples {
25322529
+ " barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}")
25332530
.withCategory("workbook")
25342531
.withDescription("Sample workbook")
2535-
.withSourceIdParameter("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup")
2532+
.withSourceIdParameter(
2533+
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group")
25362534
.create();
25372535
}
25382536

@@ -2591,7 +2589,8 @@ public final class WorkbooksGetByResourceGroupSamples {
25912589
public static void workbookGet1(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
25922590
manager
25932591
.workbooks()
2594-
.getByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
2592+
.getByResourceGroupWithResponse(
2593+
"my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE);
25952594
}
25962595

25972596
/*
@@ -2606,7 +2605,8 @@ public final class WorkbooksGetByResourceGroupSamples {
26062605
com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
26072606
manager
26082607
.workbooks()
2609-
.getByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
2608+
.getByResourceGroupWithResponse(
2609+
"my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE);
26102610
}
26112611

26122612
/*
@@ -2620,7 +2620,8 @@ public final class WorkbooksGetByResourceGroupSamples {
26202620
public static void workbookGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
26212621
manager
26222622
.workbooks()
2623-
.getByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
2623+
.getByResourceGroupWithResponse(
2624+
"my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE);
26242625
}
26252626
}
26262627
```
@@ -2633,19 +2634,6 @@ import com.azure.resourcemanager.applicationinsights.models.CategoryType;
26332634

26342635
/** Samples for Workbooks List. */
26352636
public final class WorkbooksListSamples {
2636-
/*
2637-
* x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksManagedList.json
2638-
*/
2639-
/**
2640-
* Sample code: WorkbooksManagedList.
2641-
*
2642-
* @param manager Entry point to ApplicationInsightsManager.
2643-
*/
2644-
public static void workbooksManagedList(
2645-
com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
2646-
manager.workbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE);
2647-
}
2648-
26492637
/*
26502638
* x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksListSub.json
26512639
*/
@@ -2682,6 +2670,27 @@ import com.azure.resourcemanager.applicationinsights.models.CategoryType;
26822670

26832671
/** Samples for Workbooks ListByResourceGroup. */
26842672
public final class WorkbooksListByResourceGroupSamples {
2673+
/*
2674+
* x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksManagedList.json
2675+
*/
2676+
/**
2677+
* Sample code: WorkbooksManagedList.
2678+
*
2679+
* @param manager Entry point to ApplicationInsightsManager.
2680+
*/
2681+
public static void workbooksManagedList(
2682+
com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
2683+
manager
2684+
.workbooks()
2685+
.listByResourceGroup(
2686+
"my-resource-group",
2687+
CategoryType.WORKBOOK,
2688+
null,
2689+
"/subscriptions/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp",
2690+
null,
2691+
Context.NONE);
2692+
}
2693+
26852694
/*
26862695
* x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksList.json
26872696
*/
@@ -2697,7 +2706,7 @@ public final class WorkbooksListByResourceGroupSamples {
26972706
"my-resource-group",
26982707
CategoryType.WORKBOOK,
26992708
null,
2700-
"/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1",
2709+
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp",
27012710
null,
27022711
Context.NONE);
27032712
}
@@ -2776,12 +2785,12 @@ public final class WorkbooksUpdateSamples {
27762785
manager
27772786
.workbooks()
27782787
.getByResourceGroupWithResponse(
2779-
"my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE)
2788+
"my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE)
27802789
.getValue();
27812790
resource
27822791
.update()
27832792
.withSourceId(
2784-
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1")
2793+
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp")
27852794
.apply();
27862795
}
27872796

@@ -2799,11 +2808,11 @@ public final class WorkbooksUpdateSamples {
27992808
manager
28002809
.workbooks()
28012810
.getByResourceGroupWithResponse(
2802-
"my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE)
2811+
"my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE)
28032812
.getValue();
28042813
resource
28052814
.update()
2806-
.withSourceId("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup")
2815+
.withSourceId("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group")
28072816
.apply();
28082817
}
28092818
}

sdk/applicationinsights/azure-resourcemanager-applicationinsights/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 ApplicationInsights Management</name>
16-
<description>This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Composite Swagger for Application Insights Management Client. Package tag package-2022-01-11.</description>
16+
<description>This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Composite Swagger for Application Insights Management Client. Package tag package-2022-02-01.</description>
1717
<url>https://github.com/Azure/azure-sdk-for-java</url>
1818

1919
<licenses>

sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/ApplicationInsightsManager.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public static Configurable configure() {
150150

151151
/** The Configurable allowing configurations to be set. */
152152
public static final class Configurable {
153-
private final ClientLogger logger = new ClientLogger(Configurable.class);
153+
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
154154

155155
private HttpClient httpClient;
156156
private HttpLogOptions httpLogOptions;
@@ -224,9 +224,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
224224
* @return the configurable object itself.
225225
*/
226226
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
227-
this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
227+
this.defaultPollInterval =
228+
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
228229
if (this.defaultPollInterval.isNegative()) {
229-
throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
230+
throw LOGGER
231+
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
230232
}
231233
return this;
232234
}
@@ -248,7 +250,7 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure
248250
.append("-")
249251
.append("com.azure.resourcemanager.applicationinsights")
250252
.append("/")
251-
.append("1.0.0-beta.3");
253+
.append("1.0.0-beta.4");
252254
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
253255
userAgentBuilder
254256
.append(" (")

sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public interface AnnotationsClient {
2525
* @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is
2626
* rejected by server.
2727
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
28-
* @return the list of annotations for a component for given time range.
28+
* @return the list of annotations for a component for given time range as paginated response with {@link
29+
* PagedIterable}.
2930
*/
3031
@ServiceMethod(returns = ReturnType.COLLECTION)
3132
PagedIterable<AnnotationInner> list(String resourceGroupName, String resourceName, String start, String end);
@@ -42,7 +43,8 @@ public interface AnnotationsClient {
4243
* @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is
4344
* rejected by server.
4445
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
45-
* @return the list of annotations for a component for given time range.
46+
* @return the list of annotations for a component for given time range as paginated response with {@link
47+
* PagedIterable}.
4648
*/
4749
@ServiceMethod(returns = ReturnType.COLLECTION)
4850
PagedIterable<AnnotationInner> list(

sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public interface ApiKeysClient {
2222
* @throws IllegalArgumentException thrown if parameters fail the validation.
2323
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2424
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
25-
* @return a list of API keys of an Application Insights component.
25+
* @return a list of API keys of an Application Insights component as paginated response with {@link PagedIterable}.
2626
*/
2727
@ServiceMethod(returns = ReturnType.COLLECTION)
2828
PagedIterable<ApplicationInsightsComponentApiKeyInner> list(String resourceGroupName, String resourceName);
@@ -36,7 +36,7 @@ public interface ApiKeysClient {
3636
* @throws IllegalArgumentException thrown if parameters fail the validation.
3737
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3838
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
39-
* @return a list of API keys of an Application Insights component.
39+
* @return a list of API keys of an Application Insights component as paginated response with {@link PagedIterable}.
4040
*/
4141
@ServiceMethod(returns = ReturnType.COLLECTION)
4242
PagedIterable<ApplicationInsightsComponentApiKeyInner> list(

sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ public interface ComponentsClient {
2222
*
2323
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2424
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
25-
* @return a list of all Application Insights components within a subscription.
25+
* @return a list of all Application Insights components within a subscription as paginated response with {@link
26+
* PagedIterable}.
2627
*/
2728
@ServiceMethod(returns = ReturnType.COLLECTION)
2829
PagedIterable<ApplicationInsightsComponentInner> list();
@@ -34,7 +35,8 @@ public interface ComponentsClient {
3435
* @throws IllegalArgumentException thrown if parameters fail the validation.
3536
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3637
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
37-
* @return a list of all Application Insights components within a subscription.
38+
* @return a list of all Application Insights components within a subscription as paginated response with {@link
39+
* PagedIterable}.
3840
*/
3941
@ServiceMethod(returns = ReturnType.COLLECTION)
4042
PagedIterable<ApplicationInsightsComponentInner> list(Context context);
@@ -46,7 +48,8 @@ public interface ComponentsClient {
4648
* @throws IllegalArgumentException thrown if parameters fail the validation.
4749
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4850
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
49-
* @return a list of Application Insights components within a resource group.
51+
* @return a list of Application Insights components within a resource group as paginated response with {@link
52+
* PagedIterable}.
5053
*/
5154
@ServiceMethod(returns = ReturnType.COLLECTION)
5255
PagedIterable<ApplicationInsightsComponentInner> listByResourceGroup(String resourceGroupName);
@@ -59,7 +62,8 @@ public interface ComponentsClient {
5962
* @throws IllegalArgumentException thrown if parameters fail the validation.
6063
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
6164
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
62-
* @return a list of Application Insights components within a resource group.
65+
* @return a list of Application Insights components within a resource group as paginated response with {@link
66+
* PagedIterable}.
6367
*/
6468
@ServiceMethod(returns = ReturnType.COLLECTION)
6569
PagedIterable<ApplicationInsightsComponentInner> listByResourceGroup(String resourceGroupName, Context context);

0 commit comments

Comments
 (0)