Skip to content

Commit

Permalink
[Automation] Generate Fluent Lite from Swagger datalake-store#package…
Browse files Browse the repository at this point in the history
…-2016-11 (#43688)
  • Loading branch information
azure-sdk authored Jan 3, 2025
1 parent 52bc694 commit 0930c29
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 46 deletions.
2 changes: 1 addition & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ com.azure.resourcemanager:azure-resourcemanager-streamanalytics;1.0.0-beta.4;1.0
com.azure.resourcemanager:azure-resourcemanager-operationsmanagement;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-batch;2.0.0;2.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-datalakeanalytics;1.0.0-beta.3;1.0.0
com.azure.resourcemanager:azure-resourcemanager-datalakestore;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-datalakestore;1.0.0-beta.3;1.0.0
com.azure.resourcemanager:azure-resourcemanager-iotcentral;1.0.0;1.1.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-labservices;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-vmwarecloudsimple;1.0.0-beta.3;1.0.0-beta.4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0 (2025-01-03)

### Features Added
- Azure Resource Manager DataLakeStore client library for Java. This package contains Microsoft Azure SDK for DataLakeStore Management SDK. Creates an Azure Data Lake Store account management client. Package tag package-2016-11. 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.CheckNameAvailabilityParameters` was modified

* `withType(java.lang.String)` was removed

#### `models.EncryptionIdentity` was modified

### Other Changes
* `withType(java.lang.String)` was removed

## 1.0.0-beta.3 (2024-10-17)

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-datalakestore</artifactId>
<version>1.0.0-beta.3</version>
<version>1.0.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
4 changes: 2 additions & 2 deletions sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-datalakestore</artifactId>
<version>1.0.0-beta.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-datalakestore;current} -->
<version>1.0.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-datalakestore;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for DataLakeStore Management</name>
Expand Down Expand Up @@ -45,7 +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>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
Expand All @@ -19,7 +20,6 @@
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
Expand Down Expand Up @@ -225,7 +225,7 @@ public DataLakeStoreManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.datalakestore")
.append("/")
.append("1.0.0-beta.3");
.append("1.0.0");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
Expand Down Expand Up @@ -258,7 +258,7 @@ public DataLakeStoreManager authenticate(TokenCredential credential, AzureProfil
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public final class CheckNameAvailabilityParameters implements JsonSerializable<C
* The resource type. Note: This should not be set by the user, as the constant value is
* Microsoft.DataLakeStore/accounts
*/
private String type = "Microsoft.DataLakeStore/accounts";
private final String type = "Microsoft.DataLakeStore/accounts";

/**
* Creates an instance of CheckNameAvailabilityParameters class.
Expand Down Expand Up @@ -64,18 +64,6 @@ public String type() {
return this.type;
}

/**
* Set the type property: The resource type. Note: This should not be set by the user, as the constant value is
* Microsoft.DataLakeStore/accounts.
*
* @param type the type value to set.
* @return the CheckNameAvailabilityParameters object itself.
*/
public CheckNameAvailabilityParameters withType(String type) {
this.type = type;
return this;
}

/**
* Validates the instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package com.azure.resourcemanager.datalakestore.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
Expand All @@ -15,12 +15,12 @@
/**
* The encryption identity properties.
*/
@Fluent
@Immutable
public final class EncryptionIdentity implements JsonSerializable<EncryptionIdentity> {
/*
* The type of encryption being used. Currently the only supported type is 'SystemAssigned'.
*/
private String type = "SystemAssigned";
private final String type = "SystemAssigned";

/*
* The principal identifier associated with the encryption.
Expand All @@ -47,17 +47,6 @@ public String type() {
return this.type;
}

/**
* Set the type property: The type of encryption being used. Currently the only supported type is 'SystemAssigned'.
*
* @param type the type value to set.
* @return the EncryptionIdentity object itself.
*/
public EncryptionIdentity withType(String type) {
this.type = type;
return this;
}

/**
* Get the principalId property: The principal identifier associated with the encryption.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public final class AccountsListByResourceGroupMockTests {
@Test
public void testListByResourceGroup() throws Exception {
String responseStr
= "{\"value\":[{\"properties\":{\"accountId\":\"652ac898-1456-49c3-bb7e-08e4a67563e1\",\"provisioningState\":\"Resuming\",\"state\":\"Active\",\"creationTime\":\"2021-05-05T15:09:29Z\",\"lastModifiedTime\":\"2021-08-16T16:37:14Z\",\"endpoint\":\"pkc\"},\"location\":\"t\",\"tags\":{\"ajvnysounqe\":\"gjcrcczsqpjhvm\"},\"id\":\"a\",\"name\":\"oaeupfhyhltrpmo\",\"type\":\"jmcmatuokthfu\"}]}";
= "{\"value\":[{\"properties\":{\"accountId\":\"de60489b-d0f9-4cc8-9f4f-0a51f42172ee\",\"provisioningState\":\"Resuming\",\"state\":\"Active\",\"creationTime\":\"2021-05-05T15:09:29Z\",\"lastModifiedTime\":\"2021-08-16T16:37:14Z\",\"endpoint\":\"pkc\"},\"location\":\"t\",\"tags\":{\"ajvnysounqe\":\"gjcrcczsqpjhvm\"},\"id\":\"a\",\"name\":\"oaeupfhyhltrpmo\",\"type\":\"jmcmatuokthfu\"}]}";

HttpClient httpClient
= response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public final class AccountsListMockTests {
@Test
public void testList() throws Exception {
String responseStr
= "{\"value\":[{\"properties\":{\"accountId\":\"7ec5dcba-c2cc-416b-b72d-53b0df94118b\",\"provisioningState\":\"Creating\",\"state\":\"Suspended\",\"creationTime\":\"2021-06-02T09:19:15Z\",\"lastModifiedTime\":\"2021-03-02T12:24:45Z\",\"endpoint\":\"ltyfsop\"},\"location\":\"usue\",\"tags\":{\"jbavorxzdm\":\"wd\",\"nvowgujju\":\"hctbqvudwxdn\",\"zj\":\"wdkcglhsl\"},\"id\":\"yggdtjixh\",\"name\":\"kuofqweykhme\",\"type\":\"evfyexfwhybcib\"}]}";
= "{\"value\":[{\"properties\":{\"accountId\":\"35a8200f-b642-4a47-8b4d-d5070765b19c\",\"provisioningState\":\"Creating\",\"state\":\"Suspended\",\"creationTime\":\"2021-06-02T09:19:15Z\",\"lastModifiedTime\":\"2021-03-02T12:24:45Z\",\"endpoint\":\"ltyfsop\"},\"location\":\"usue\",\"tags\":{\"jbavorxzdm\":\"wd\",\"nvowgujju\":\"hctbqvudwxdn\",\"zj\":\"wdkcglhsl\"},\"id\":\"yggdtjixh\",\"name\":\"kuofqweykhme\",\"type\":\"evfyexfwhybcib\"}]}";

HttpClient httpClient
= response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public final class CapabilityInformationInnerTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
CapabilityInformationInner model = BinaryData.fromString(
"{\"subscriptionId\":\"3d12fbb8-ef38-4c48-ba66-c25a1f0a64f7\",\"state\":\"Unregistered\",\"maxAccountCount\":425108971,\"accountCount\":614962425,\"migrationState\":false}")
"{\"subscriptionId\":\"dea61583-af5d-4c20-b26d-62aab67b082d\",\"state\":\"Unregistered\",\"maxAccountCount\":425108971,\"accountCount\":614962425,\"migrationState\":false}")
.toObject(CapabilityInformationInner.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public final class DataLakeStoreAccountBasicInnerTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
DataLakeStoreAccountBasicInner model = BinaryData.fromString(
"{\"properties\":{\"accountId\":\"5da8d816-50e6-457e-bb6f-a693b9c52aa3\",\"provisioningState\":\"Deleting\",\"state\":\"Active\",\"creationTime\":\"2021-03-22T18:05:05Z\",\"lastModifiedTime\":\"2021-06-23T16:37:05Z\",\"endpoint\":\"ifpikxwczby\"},\"location\":\"cnpqxuhivyqniwby\",\"tags\":{\"mjgr\":\"xvd\"},\"id\":\"fwvuk\",\"name\":\"gaudcc\",\"type\":\"nhsjcnyej\"}")
"{\"properties\":{\"accountId\":\"8f8988ee-5985-4ecf-9f06-97bcc908ff53\",\"provisioningState\":\"Deleting\",\"state\":\"Active\",\"creationTime\":\"2021-03-22T18:05:05Z\",\"lastModifiedTime\":\"2021-06-23T16:37:05Z\",\"endpoint\":\"ifpikxwczby\"},\"location\":\"cnpqxuhivyqniwby\",\"tags\":{\"mjgr\":\"xvd\"},\"id\":\"fwvuk\",\"name\":\"gaudcc\",\"type\":\"nhsjcnyej\"}")
.toObject(DataLakeStoreAccountBasicInner.class);
Assertions.assertEquals("cnpqxuhivyqniwby", model.location());
Assertions.assertEquals("xvd", model.tags().get("mjgr"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public final class DataLakeStoreAccountListResultTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
DataLakeStoreAccountListResult model = BinaryData.fromString(
"{\"value\":[{\"properties\":{\"accountId\":\"d09b7a8e-a9d6-4f71-832c-eef81553027d\",\"provisioningState\":\"Running\",\"state\":\"Suspended\",\"creationTime\":\"2021-06-18T18:26:01Z\",\"lastModifiedTime\":\"2021-08-02T07:01:22Z\",\"endpoint\":\"zm\"},\"location\":\"hmtzopbsphrup\",\"tags\":{\"ycm\":\"sybbejhph\",\"htbmuf\":\"xaobhdxbmtqioqjz\",\"rxybqsoq\":\"ownoizhw\"},\"id\":\"jgkdmbpazlobcu\",\"name\":\"pdznrbtcqqjnqgl\",\"type\":\"qgn\"},{\"properties\":{\"accountId\":\"6f35f8f3-3113-41b0-8fb3-c7f53f3f1595\",\"provisioningState\":\"Running\",\"state\":\"Suspended\",\"creationTime\":\"2021-06-05T07:25:28Z\",\"lastModifiedTime\":\"2021-11-19T20:38:19Z\",\"endpoint\":\"esaagdfm\"},\"location\":\"lzl\",\"tags\":{\"vktsizntocipao\":\"rifkwm\",\"poyfdkfogkn\":\"ajpsquc\",\"eqsrdeupewnwreit\":\"gjofjd\"},\"id\":\"zyf\",\"name\":\"usarhmofc\",\"type\":\"hs\"},{\"properties\":{\"accountId\":\"9b13613e-e70f-417c-a768-e36634a14630\",\"provisioningState\":\"Undeleting\",\"state\":\"Suspended\",\"creationTime\":\"2021-06-13T04:20:54Z\",\"lastModifiedTime\":\"2021-10-06T17:56:05Z\",\"endpoint\":\"kuksjtxukcdm\"},\"location\":\"arcryuanzwuxzdxt\",\"tags\":{\"u\":\"lhmwhfpmrqobm\"},\"id\":\"knryrtihfxtij\",\"name\":\"pzvgnwzsymglzufc\",\"type\":\"zk\"}],\"nextLink\":\"dbihanufhfcbj\"}")
"{\"value\":[{\"properties\":{\"accountId\":\"7e1c1710-82d2-490b-a978-654a02bd345f\",\"provisioningState\":\"Running\",\"state\":\"Suspended\",\"creationTime\":\"2021-06-18T18:26:01Z\",\"lastModifiedTime\":\"2021-08-02T07:01:22Z\",\"endpoint\":\"zm\"},\"location\":\"hmtzopbsphrup\",\"tags\":{\"ycm\":\"sybbejhph\",\"htbmuf\":\"xaobhdxbmtqioqjz\",\"rxybqsoq\":\"ownoizhw\"},\"id\":\"jgkdmbpazlobcu\",\"name\":\"pdznrbtcqqjnqgl\",\"type\":\"qgn\"},{\"properties\":{\"accountId\":\"b71b6e3b-88c4-4b8c-99bf-277b4d5b220e\",\"provisioningState\":\"Running\",\"state\":\"Suspended\",\"creationTime\":\"2021-06-05T07:25:28Z\",\"lastModifiedTime\":\"2021-11-19T20:38:19Z\",\"endpoint\":\"esaagdfm\"},\"location\":\"lzl\",\"tags\":{\"vktsizntocipao\":\"rifkwm\",\"poyfdkfogkn\":\"ajpsquc\",\"eqsrdeupewnwreit\":\"gjofjd\"},\"id\":\"zyf\",\"name\":\"usarhmofc\",\"type\":\"hs\"},{\"properties\":{\"accountId\":\"fbf37b2e-a90d-41ae-970f-832d6517118b\",\"provisioningState\":\"Undeleting\",\"state\":\"Suspended\",\"creationTime\":\"2021-06-13T04:20:54Z\",\"lastModifiedTime\":\"2021-10-06T17:56:05Z\",\"endpoint\":\"kuksjtxukcdm\"},\"location\":\"arcryuanzwuxzdxt\",\"tags\":{\"u\":\"lhmwhfpmrqobm\"},\"id\":\"knryrtihfxtij\",\"name\":\"pzvgnwzsymglzufc\",\"type\":\"zk\"}],\"nextLink\":\"dbihanufhfcbj\"}")
.toObject(DataLakeStoreAccountListResult.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public final class DataLakeStoreAccountPropertiesBasicTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
DataLakeStoreAccountPropertiesBasic model = BinaryData.fromString(
"{\"accountId\":\"c82867aa-ddea-4f7e-9fcb-1ff344198468\",\"provisioningState\":\"Creating\",\"state\":\"Suspended\",\"creationTime\":\"2021-01-26T08:15:51Z\",\"lastModifiedTime\":\"2021-10-27T17:34:25Z\",\"endpoint\":\"wlokjyem\"}")
"{\"accountId\":\"bd6ff70e-2d47-40b9-8b06-6ecdd89f842c\",\"provisioningState\":\"Creating\",\"state\":\"Suspended\",\"creationTime\":\"2021-01-26T08:15:51Z\",\"lastModifiedTime\":\"2021-10-27T17:34:25Z\",\"endpoint\":\"wlokjyem\"}")
.toObject(DataLakeStoreAccountPropertiesBasic.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public final class EncryptionIdentityTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
EncryptionIdentity model = BinaryData.fromString(
"{\"principalId\":\"0ad55ba9-0b6e-4377-9f2e-29b8e384aea3\",\"tenantId\":\"e6b432eb-e9f3-448e-afb4-e167cb01050a\"}")
"{\"principalId\":\"aa75138b-68e3-493e-b2b0-04431cfea104\",\"tenantId\":\"b7554702-1dea-4e53-8d80-0e2aa0fa802f\"}")
.toObject(EncryptionIdentity.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public final class LocationsGetCapabilityWithResponseMockTests {
@Test
public void testGetCapabilityWithResponse() throws Exception {
String responseStr
= "{\"subscriptionId\":\"0dfba5f7-66de-42f4-9802-f618a90cf7a7\",\"state\":\"Suspended\",\"maxAccountCount\":392126366,\"accountCount\":1640882234,\"migrationState\":false}";
= "{\"subscriptionId\":\"c674c534-d474-4f14-bae7-40970997eb6a\",\"state\":\"Suspended\",\"maxAccountCount\":392126366,\"accountCount\":1640882234,\"migrationState\":false}";

HttpClient httpClient
= response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8)));
Expand Down

0 comments on commit 0930c29

Please sign in to comment.