Skip to content

Commit cbac7ea

Browse files
author
SDKAuto
committed
CodeGen from PR 33754 in Azure/azure-rest-api-specs
Merge cf3ec282f247a7a156a1b5c60197b211197772c2 into a67a8c166cdbcb357ac3e56cbc1c1e285b52706a
1 parent 5cb4e60 commit cbac7ea

File tree

6 files changed

+115
-116
lines changed

6 files changed

+115
-116
lines changed

sdk/clientcore/annotation-processor/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
<dependency>
114114
<groupId>io.clientcore</groupId>
115115
<artifactId>core</artifactId>
116-
<version>1.0.0-beta.9</version> <!-- {x-version-update;io.clientcore:core;dependency} -->
116+
<version>1.0.0-beta.8</version> <!-- {x-version-update;io.clientcore:core;dependency} -->
117117
</dependency>
118118

119119
<!-- Unit Test -->

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

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

3-
## 1.1.0-beta.1 (Unreleased)
3+
## 1.1.0-beta.1 (2025-04-07)
44

5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
5+
- Azure Resource Manager Playwright Testing client library for Java. This package contains Microsoft Azure SDK for Playwright Testing Management SDK. Microsoft.AzurePlaywrightService Resource Provider Management API. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
126

137
## 1.0.0 (2024-12-16)
148

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5252
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5353

5454
```java
55-
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
5656
TokenCredential credential = new DefaultAzureCredentialBuilder()
5757
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
5858
.build();
5959
PlaywrightTestingManager manager = PlaywrightTestingManager
6060
.authenticate(credential, profile);
6161
```
6262

63-
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
6464

6565
See [Authentication][authenticate] for more options.
6666

@@ -70,6 +70,14 @@ See [API design][design] for general introduction on design and key concepts on
7070

7171
## Examples
7272

73+
```java
74+
account = playwrightTestingManager.accounts()
75+
.define(accountName)
76+
.withRegion(REGION)
77+
.withExistingResourceGroup(resourceGroupName)
78+
.withProperties(new AccountProperties().withRegionalAffinity(EnablementStatus.ENABLED))
79+
.create();
80+
```
7381
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/SAMPLE.md)
7482

7583

@@ -100,5 +108,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
100108
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
101109
[coc]: https://opensource.microsoft.com/codeofconduct/
102110
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
103-
104-

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

Lines changed: 101 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,44 @@
2424
### AccountQuotas_Get
2525

2626
```java
27-
import com.azure.resourcemanager.playwrighttesting.models.QuotaNames;
27+
import com.azure.resourcemanager.playwrighttesting.models.Account;
28+
import com.azure.resourcemanager.playwrighttesting.models.AccountUpdateProperties;
29+
import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus;
30+
import java.util.HashMap;
31+
import java.util.Map;
2832

2933
/**
30-
* Samples for AccountQuotas Get.
34+
* Samples for Accounts Update.
3135
*/
32-
public final class AccountQuotasGetSamples {
36+
public final class AccountsUpdateSamples {
3337
/*
34-
* x-ms-original-file: 2024-12-01/AccountQuotas_Get.json
38+
* x-ms-original-file: 2024-12-01/Accounts_Update.json
3539
*/
3640
/**
37-
* Sample code: AccountQuotas_Get.
41+
* Sample code: Accounts_Update.
3842
*
3943
* @param manager Entry point to PlaywrightTestingManager.
4044
*/
41-
public static void accountQuotasGet(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
42-
manager.accountQuotas()
43-
.getWithResponse("dummyrg", "myPlaywrightAccount", QuotaNames.SCALABLE_EXECUTION,
44-
com.azure.core.util.Context.NONE);
45+
public static void accountsUpdate(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
46+
Account resource = manager.accounts()
47+
.getByResourceGroupWithResponse("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE)
48+
.getValue();
49+
resource.update()
50+
.withTags(mapOf("Team", "Dev Exp", "Division", "LT"))
51+
.withProperties(new AccountUpdateProperties().withRegionalAffinity(EnablementStatus.ENABLED))
52+
.apply();
53+
}
54+
55+
// Use "Map.of" if available
56+
@SuppressWarnings("unchecked")
57+
private static <T> Map<String, T> mapOf(Object... inputs) {
58+
Map<String, T> map = new HashMap<>();
59+
for (int i = 0; i < inputs.length; i += 2) {
60+
String key = (String) inputs[i];
61+
T value = (T) inputs[i + 1];
62+
map.put(key, value);
63+
}
64+
return map;
4565
}
4666
}
4767
```
@@ -50,20 +70,19 @@ public final class AccountQuotasGetSamples {
5070

5171
```java
5272
/**
53-
* Samples for AccountQuotas ListByAccount.
73+
* Samples for Accounts Delete.
5474
*/
55-
public final class AccountQuotasListByAccountSamples {
75+
public final class AccountsDeleteSamples {
5676
/*
57-
* x-ms-original-file: 2024-12-01/AccountQuotas_ListByAccount.json
77+
* x-ms-original-file: 2024-12-01/Accounts_Delete.json
5878
*/
5979
/**
60-
* Sample code: AccountQuotas_ListByAccount.
80+
* Sample code: Accounts_Delete.
6181
*
6282
* @param manager Entry point to PlaywrightTestingManager.
6383
*/
64-
public static void
65-
accountQuotasListByAccount(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
66-
manager.accountQuotas().listByAccount("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE);
84+
public static void accountsDelete(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
85+
manager.accounts().delete("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE);
6786
}
6887
}
6988
```
@@ -97,44 +116,20 @@ public final class AccountsCheckNameAvailabilitySamples {
97116
### Accounts_CreateOrUpdate
98117

99118
```java
100-
import com.azure.resourcemanager.playwrighttesting.models.AccountProperties;
101-
import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus;
102-
import java.util.HashMap;
103-
import java.util.Map;
104-
105119
/**
106-
* Samples for Accounts CreateOrUpdate.
120+
* Samples for Operations List.
107121
*/
108-
public final class AccountsCreateOrUpdateSamples {
122+
public final class OperationsListSamples {
109123
/*
110-
* x-ms-original-file: 2024-12-01/Accounts_CreateOrUpdate.json
124+
* x-ms-original-file: 2024-12-01/Operations_List.json
111125
*/
112126
/**
113-
* Sample code: Accounts_CreateOrUpdate.
127+
* Sample code: Operations_List.
114128
*
115129
* @param manager Entry point to PlaywrightTestingManager.
116130
*/
117-
public static void
118-
accountsCreateOrUpdate(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
119-
manager.accounts()
120-
.define("myPlaywrightAccount")
121-
.withRegion("westus")
122-
.withExistingResourceGroup("dummyrg")
123-
.withTags(mapOf("Team", "Dev Exp"))
124-
.withProperties(new AccountProperties().withRegionalAffinity(EnablementStatus.ENABLED))
125-
.create();
126-
}
127-
128-
// Use "Map.of" if available
129-
@SuppressWarnings("unchecked")
130-
private static <T> Map<String, T> mapOf(Object... inputs) {
131-
Map<String, T> map = new HashMap<>();
132-
for (int i = 0; i < inputs.length; i += 2) {
133-
String key = (String) inputs[i];
134-
T value = (T) inputs[i + 1];
135-
map.put(key, value);
136-
}
137-
return map;
131+
public static void operationsList(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
132+
manager.operations().list(com.azure.core.util.Context.NONE);
138133
}
139134
}
140135
```
@@ -143,64 +138,43 @@ public final class AccountsCreateOrUpdateSamples {
143138

144139
```java
145140
/**
146-
* Samples for Accounts Delete.
141+
* Samples for Quotas ListBySubscription.
147142
*/
148-
public final class AccountsDeleteSamples {
143+
public final class QuotasListBySubscriptionSamples {
149144
/*
150-
* x-ms-original-file: 2024-12-01/Accounts_Delete.json
145+
* x-ms-original-file: 2024-12-01/Quotas_ListBySubscription.json
151146
*/
152147
/**
153-
* Sample code: Accounts_Delete.
148+
* Sample code: Quotas_ListBySubscription.
154149
*
155150
* @param manager Entry point to PlaywrightTestingManager.
156151
*/
157-
public static void accountsDelete(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
158-
manager.accounts().delete("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE);
152+
public static void
153+
quotasListBySubscription(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
154+
manager.quotas().listBySubscription("eastus", com.azure.core.util.Context.NONE);
159155
}
160156
}
161157
```
162158

163159
### Accounts_Update
164160

165161
```java
166-
import com.azure.resourcemanager.playwrighttesting.models.Account;
167-
import com.azure.resourcemanager.playwrighttesting.models.AccountUpdateProperties;
168-
import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus;
169-
import java.util.HashMap;
170-
import java.util.Map;
162+
import com.azure.resourcemanager.playwrighttesting.models.QuotaNames;
171163

172164
/**
173-
* Samples for Accounts Update.
165+
* Samples for Quotas Get.
174166
*/
175-
public final class AccountsUpdateSamples {
167+
public final class QuotasGetSamples {
176168
/*
177-
* x-ms-original-file: 2024-12-01/Accounts_Update.json
169+
* x-ms-original-file: 2024-12-01/Quotas_Get.json
178170
*/
179171
/**
180-
* Sample code: Accounts_Update.
172+
* Sample code: Quotas_Get.
181173
*
182174
* @param manager Entry point to PlaywrightTestingManager.
183175
*/
184-
public static void accountsUpdate(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
185-
Account resource = manager.accounts()
186-
.getByResourceGroupWithResponse("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE)
187-
.getValue();
188-
resource.update()
189-
.withTags(mapOf("Team", "Dev Exp", "Division", "LT"))
190-
.withProperties(new AccountUpdateProperties().withRegionalAffinity(EnablementStatus.ENABLED))
191-
.apply();
192-
}
193-
194-
// Use "Map.of" if available
195-
@SuppressWarnings("unchecked")
196-
private static <T> Map<String, T> mapOf(Object... inputs) {
197-
Map<String, T> map = new HashMap<>();
198-
for (int i = 0; i < inputs.length; i += 2) {
199-
String key = (String) inputs[i];
200-
T value = (T) inputs[i + 1];
201-
map.put(key, value);
202-
}
203-
return map;
176+
public static void quotasGet(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
177+
manager.quotas().getWithResponse("eastus", QuotaNames.SCALABLE_EXECUTION, com.azure.core.util.Context.NONE);
204178
}
205179
}
206180
```
@@ -209,64 +183,90 @@ public final class AccountsUpdateSamples {
209183

210184
```java
211185
/**
212-
* Samples for Operations List.
186+
* Samples for AccountQuotas ListByAccount.
213187
*/
214-
public final class OperationsListSamples {
188+
public final class AccountQuotasListByAccountSamples {
215189
/*
216-
* x-ms-original-file: 2024-12-01/Operations_List.json
190+
* x-ms-original-file: 2024-12-01/AccountQuotas_ListByAccount.json
217191
*/
218192
/**
219-
* Sample code: Operations_List.
193+
* Sample code: AccountQuotas_ListByAccount.
220194
*
221195
* @param manager Entry point to PlaywrightTestingManager.
222196
*/
223-
public static void operationsList(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
224-
manager.operations().list(com.azure.core.util.Context.NONE);
197+
public static void
198+
accountQuotasListByAccount(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
199+
manager.accountQuotas().listByAccount("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE);
225200
}
226201
}
227202
```
228203

229204
### Quotas_Get
230205

231206
```java
232-
import com.azure.resourcemanager.playwrighttesting.models.QuotaNames;
207+
import com.azure.resourcemanager.playwrighttesting.models.AccountProperties;
208+
import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus;
209+
import java.util.HashMap;
210+
import java.util.Map;
233211

234212
/**
235-
* Samples for Quotas Get.
213+
* Samples for Accounts CreateOrUpdate.
236214
*/
237-
public final class QuotasGetSamples {
215+
public final class AccountsCreateOrUpdateSamples {
238216
/*
239-
* x-ms-original-file: 2024-12-01/Quotas_Get.json
217+
* x-ms-original-file: 2024-12-01/Accounts_CreateOrUpdate.json
240218
*/
241219
/**
242-
* Sample code: Quotas_Get.
220+
* Sample code: Accounts_CreateOrUpdate.
243221
*
244222
* @param manager Entry point to PlaywrightTestingManager.
245223
*/
246-
public static void quotasGet(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
247-
manager.quotas().getWithResponse("eastus", QuotaNames.SCALABLE_EXECUTION, com.azure.core.util.Context.NONE);
224+
public static void
225+
accountsCreateOrUpdate(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
226+
manager.accounts()
227+
.define("myPlaywrightAccount")
228+
.withRegion("westus")
229+
.withExistingResourceGroup("dummyrg")
230+
.withTags(mapOf("Team", "Dev Exp"))
231+
.withProperties(new AccountProperties().withRegionalAffinity(EnablementStatus.ENABLED))
232+
.create();
233+
}
234+
235+
// Use "Map.of" if available
236+
@SuppressWarnings("unchecked")
237+
private static <T> Map<String, T> mapOf(Object... inputs) {
238+
Map<String, T> map = new HashMap<>();
239+
for (int i = 0; i < inputs.length; i += 2) {
240+
String key = (String) inputs[i];
241+
T value = (T) inputs[i + 1];
242+
map.put(key, value);
243+
}
244+
return map;
248245
}
249246
}
250247
```
251248

252249
### Quotas_ListBySubscription
253250

254251
```java
252+
import com.azure.resourcemanager.playwrighttesting.models.QuotaNames;
253+
255254
/**
256-
* Samples for Quotas ListBySubscription.
255+
* Samples for AccountQuotas Get.
257256
*/
258-
public final class QuotasListBySubscriptionSamples {
257+
public final class AccountQuotasGetSamples {
259258
/*
260-
* x-ms-original-file: 2024-12-01/Quotas_ListBySubscription.json
259+
* x-ms-original-file: 2024-12-01/AccountQuotas_Get.json
261260
*/
262261
/**
263-
* Sample code: Quotas_ListBySubscription.
262+
* Sample code: AccountQuotas_Get.
264263
*
265264
* @param manager Entry point to PlaywrightTestingManager.
266265
*/
267-
public static void
268-
quotasListBySubscription(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
269-
manager.quotas().listBySubscription("eastus", com.azure.core.util.Context.NONE);
266+
public static void accountQuotasGet(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
267+
manager.accountQuotas()
268+
.getWithResponse("dummyrg", "myPlaywrightAccount", QuotaNames.SCALABLE_EXECUTION,
269+
com.azure.core.util.Context.NONE);
270270
}
271271
}
272272
```

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
4848
<revapi.skip>true</revapi.skip>
49-
<spotless.skip>false</spotless.skip>
5049
</properties>
5150
<dependencies>
5251
<dependency>

0 commit comments

Comments
 (0)