Skip to content

Commit

Permalink
[Automation] Generate Fluent Lite from applicationinsights#package-20…
Browse files Browse the repository at this point in the history
…22-02-01 (#27845)
  • Loading branch information
azure-sdk authored Mar 24, 2022
1 parent 924a4e7 commit d34d05f
Show file tree
Hide file tree
Showing 147 changed files with 572 additions and 729 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# Release History

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

### Features Added
- 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).

### Breaking Changes

### Bugs Fixed
#### `models.Workbooks` was modified

* `getByResourceGroupWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed

### Features Added

#### `models.Workbooks` was modified

### Other Changes
* `getByIdWithResponse(java.lang.String,java.lang.Boolean,com.azure.core.util.Context)` was added
* `getByResourceGroupWithResponse(java.lang.String,java.lang.String,java.lang.Boolean,com.azure.core.util.Context)` was added

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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-01-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
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).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-applicationinsights</artifactId>
<version>1.0.0-beta.3</version>
<version>1.0.0-beta.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2448,7 +2448,6 @@ import com.azure.resourcemanager.applicationinsights.models.Kind;
import com.azure.resourcemanager.applicationinsights.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.applicationinsights.models.UserAssignedIdentity;
import com.azure.resourcemanager.applicationinsights.models.WorkbookResourceIdentity;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -2469,27 +2468,25 @@ public final class WorkbooksCreateOrUpdateSamples {
.define("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2")
.withRegion("westus")
.withExistingResourceGroup("my-resource-group")
.withTags(mapOf("hidden-title", "tttt"))
.withIdentity(
new WorkbookResourceIdentity()
.withType(ManagedServiceIdentityType.USER_ASSIGNED)
.withUserAssignedIdentities(
mapOf(
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid",
new UserAssignedIdentity())))
.withKind(Kind.SHARED)
.withEtag("\"4a00f78d-0000-0700-0000-5f8f616c1000\"")
.withDisplayName("tttt")
.withDisplayName("Sample workbook")
.withSerializedData(
"{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text -"
+ " 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup\"]}")
+ " 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group\"]}")
.withVersion("Notebook/1.0")
.withCategory("workbook")
.withTagsPropertiesTags(Arrays.asList())
.withStorageUri(
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/MyGroup/providers/Microsoft.Storage/storageAccounts/testStorage/blobServices/default/containers/testContainer")
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer")
.withDescription("Sample workbook")
.withSourceIdParameter("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup")
.withSourceIdParameter(
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group")
.create();
}

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

Expand Down Expand Up @@ -2591,7 +2589,8 @@ public final class WorkbooksGetByResourceGroupSamples {
public static void workbookGet1(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
manager
.workbooks()
.getByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE);
.getByResourceGroupWithResponse(
"my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE);
}

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

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

/** Samples for Workbooks List. */
public final class WorkbooksListSamples {
/*
* x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksManagedList.json
*/
/**
* Sample code: WorkbooksManagedList.
*
* @param manager Entry point to ApplicationInsightsManager.
*/
public static void workbooksManagedList(
com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
manager.workbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE);
}

/*
* x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksListSub.json
*/
Expand Down Expand Up @@ -2682,6 +2670,27 @@ import com.azure.resourcemanager.applicationinsights.models.CategoryType;

/** Samples for Workbooks ListByResourceGroup. */
public final class WorkbooksListByResourceGroupSamples {
/*
* x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksManagedList.json
*/
/**
* Sample code: WorkbooksManagedList.
*
* @param manager Entry point to ApplicationInsightsManager.
*/
public static void workbooksManagedList(
com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) {
manager
.workbooks()
.listByResourceGroup(
"my-resource-group",
CategoryType.WORKBOOK,
null,
"/subscriptions/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp",
null,
Context.NONE);
}

/*
* x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksList.json
*/
Expand All @@ -2697,7 +2706,7 @@ public final class WorkbooksListByResourceGroupSamples {
"my-resource-group",
CategoryType.WORKBOOK,
null,
"/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1",
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp",
null,
Context.NONE);
}
Expand Down Expand Up @@ -2776,12 +2785,12 @@ public final class WorkbooksUpdateSamples {
manager
.workbooks()
.getByResourceGroupWithResponse(
"my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE)
"my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE)
.getValue();
resource
.update()
.withSourceId(
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1")
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp")
.apply();
}

Expand All @@ -2799,11 +2808,11 @@ public final class WorkbooksUpdateSamples {
manager
.workbooks()
.getByResourceGroupWithResponse(
"my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE)
"my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE)
.getValue();
resource
.update()
.withSourceId("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup")
.withSourceId("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group")
.apply();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for ApplicationInsights Management</name>
<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>
<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>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public static Configurable configure() {

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

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
Expand Down Expand Up @@ -224,9 +224,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
this.defaultPollInterval =
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
throw LOGGER
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
Expand All @@ -248,7 +250,7 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure
.append("-")
.append("com.azure.resourcemanager.applicationinsights")
.append("/")
.append("1.0.0-beta.3");
.append("1.0.0-beta.4");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public interface AnnotationsClient {
* @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is
* rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of annotations for a component for given time range.
* @return the list of annotations for a component for given time range as paginated response with {@link
* PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<AnnotationInner> list(String resourceGroupName, String resourceName, String start, String end);
Expand All @@ -42,7 +43,8 @@ public interface AnnotationsClient {
* @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is
* rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of annotations for a component for given time range.
* @return the list of annotations for a component for given time range as paginated response with {@link
* PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<AnnotationInner> list(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public interface ApiKeysClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of API keys of an Application Insights component.
* @return a list of API keys of an Application Insights component as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ApplicationInsightsComponentApiKeyInner> list(String resourceGroupName, String resourceName);
Expand All @@ -36,7 +36,7 @@ public interface ApiKeysClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of API keys of an Application Insights component.
* @return a list of API keys of an Application Insights component as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ApplicationInsightsComponentApiKeyInner> list(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public interface ComponentsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of all Application Insights components within a subscription.
* @return a list of all Application Insights components within a subscription as paginated response with {@link
* PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ApplicationInsightsComponentInner> list();
Expand All @@ -34,7 +35,8 @@ public interface ComponentsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of all Application Insights components within a subscription.
* @return a list of all Application Insights components within a subscription as paginated response with {@link
* PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ApplicationInsightsComponentInner> list(Context context);
Expand All @@ -46,7 +48,8 @@ public interface ComponentsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of Application Insights components within a resource group.
* @return a list of Application Insights components within a resource group as paginated response with {@link
* PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ApplicationInsightsComponentInner> listByResourceGroup(String resourceGroupName);
Expand All @@ -59,7 +62,8 @@ public interface ComponentsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of Application Insights components within a resource group.
* @return a list of Application Insights components within a resource group as paginated response with {@link
* PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ApplicationInsightsComponentInner> listByResourceGroup(String resourceGroupName, Context context);
Expand Down
Loading

0 comments on commit d34d05f

Please sign in to comment.