Skip to content

Commit 0a850ff

Browse files
author
SDKAuto
committed
CodeGen from PR 32911 in Azure/azure-rest-api-specs
Merge b061f6093dc7cbb5083ecda1554ee81b6d09a209 into 8a0168458930c86636a76bcd7acfdc9c81291bfc
1 parent 646a3bc commit 0a850ff

File tree

44 files changed

+275
-320
lines changed

Some content is hidden

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

44 files changed

+275
-320
lines changed

sdk/trustedsigning/azure-resourcemanager-trustedsigning/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.2 (2025-03-07)
4+
5+
- Azure Resource Manager Trusted Signing client library for Java. This package contains Microsoft Azure SDK for Trusted Signing Management SDK. Code Signing resource provider api. 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/trustedsigning/azure-resourcemanager-trustedsigning/README.md

Lines changed: 2 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
TrustedSigningManager manager = TrustedSigningManager
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

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

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import com.azure.resourcemanager.trustedsigning.models.ProfileType;
3333
*/
3434
public final class CertificateProfilesCreateSamples {
3535
/*
36-
* x-ms-original-file: 2024-02-05-preview/CertificateProfiles_Create.json
36+
* x-ms-original-file: 2025-03-30/CertificateProfiles_Create.json
3737
*/
3838
/**
3939
* Sample code: Create a certificate profile.
@@ -62,7 +62,7 @@ public final class CertificateProfilesCreateSamples {
6262
*/
6363
public final class CertificateProfilesDeleteSamples {
6464
/*
65-
* x-ms-original-file: 2024-02-05-preview/CertificateProfiles_Delete.json
65+
* x-ms-original-file: 2025-03-30/CertificateProfiles_Delete.json
6666
*/
6767
/**
6868
* Sample code: Delete a certificate profile.
@@ -85,7 +85,7 @@ public final class CertificateProfilesDeleteSamples {
8585
*/
8686
public final class CertificateProfilesGetSamples {
8787
/*
88-
* x-ms-original-file: 2024-02-05-preview/CertificateProfiles_Get.json
88+
* x-ms-original-file: 2025-03-30/CertificateProfiles_Get.json
8989
*/
9090
/**
9191
* Sample code: Get details of a certificate profile.
@@ -108,7 +108,7 @@ public final class CertificateProfilesGetSamples {
108108
*/
109109
public final class CertificateProfilesListByCodeSigningAccountSamples {
110110
/*
111-
* x-ms-original-file: 2024-02-05-preview/CertificateProfiles_ListByCodeSigningAccount.json
111+
* x-ms-original-file: 2025-03-30/CertificateProfiles_ListByCodeSigningAccount.json
112112
*/
113113
/**
114114
* Sample code: List certificate profiles under a trusted signing account.
@@ -134,7 +134,7 @@ import java.time.OffsetDateTime;
134134
*/
135135
public final class CertificateProfilesRevokeCertificateSamples {
136136
/*
137-
* x-ms-original-file: 2024-02-05-preview/CertificateProfiles_RevokeCertificate.json
137+
* x-ms-original-file: 2025-03-30/CertificateProfiles_RevokeCertificate.json
138138
*/
139139
/**
140140
* Sample code: Revoke a certificate under a certificate profile.
@@ -165,7 +165,7 @@ import com.azure.resourcemanager.trustedsigning.models.CheckNameAvailability;
165165
*/
166166
public final class CodeSigningAccountsCheckNameAvailabilitySamples {
167167
/*
168-
* x-ms-original-file: 2024-02-05-preview/CodeSigningAccounts_CheckNameAvailability.json
168+
* x-ms-original-file: 2025-03-30/CodeSigningAccounts_CheckNameAvailability.json
169169
*/
170170
/**
171171
* Sample code: Checks that the trusted signing account name is available.
@@ -193,7 +193,7 @@ import com.azure.resourcemanager.trustedsigning.models.SkuName;
193193
*/
194194
public final class CodeSigningAccountsCreateSamples {
195195
/*
196-
* x-ms-original-file: 2024-02-05-preview/CodeSigningAccounts_Create.json
196+
* x-ms-original-file: 2025-03-30/CodeSigningAccounts_Create.json
197197
*/
198198
/**
199199
* Sample code: Create a trusted Signing Account.
@@ -220,7 +220,7 @@ public final class CodeSigningAccountsCreateSamples {
220220
*/
221221
public final class CodeSigningAccountsDeleteSamples {
222222
/*
223-
* x-ms-original-file: 2024-02-05-preview/CodeSigningAccounts_Delete.json
223+
* x-ms-original-file: 2025-03-30/CodeSigningAccounts_Delete.json
224224
*/
225225
/**
226226
* Sample code: Delete a trusted signing account.
@@ -242,7 +242,7 @@ public final class CodeSigningAccountsDeleteSamples {
242242
*/
243243
public final class CodeSigningAccountsGetByResourceGroupSamples {
244244
/*
245-
* x-ms-original-file: 2024-02-05-preview/CodeSigningAccounts_Get.json
245+
* x-ms-original-file: 2025-03-30/CodeSigningAccounts_Get.json
246246
*/
247247
/**
248248
* Sample code: Get a Trusted Signing Account.
@@ -265,7 +265,7 @@ public final class CodeSigningAccountsGetByResourceGroupSamples {
265265
*/
266266
public final class CodeSigningAccountsListSamples {
267267
/*
268-
* x-ms-original-file: 2024-02-05-preview/CodeSigningAccounts_ListBySubscription.json
268+
* x-ms-original-file: 2025-03-30/CodeSigningAccounts_ListBySubscription.json
269269
*/
270270
/**
271271
* Sample code: Lists trusted signing accounts within a subscription.
@@ -287,7 +287,7 @@ public final class CodeSigningAccountsListSamples {
287287
*/
288288
public final class CodeSigningAccountsListByResourceGroupSamples {
289289
/*
290-
* x-ms-original-file: 2024-02-05-preview/CodeSigningAccounts_ListByResourceGroup.json
290+
* x-ms-original-file: 2025-03-30/CodeSigningAccounts_ListByResourceGroup.json
291291
*/
292292
/**
293293
* Sample code: Lists trusted signing accounts within a resource group.
@@ -313,7 +313,7 @@ import java.util.Map;
313313
*/
314314
public final class CodeSigningAccountsUpdateSamples {
315315
/*
316-
* x-ms-original-file: 2024-02-05-preview/CodeSigningAccounts_Update.json
316+
* x-ms-original-file: 2025-03-30/CodeSigningAccounts_Update.json
317317
*/
318318
/**
319319
* Sample code: Update a trusted signing account.
@@ -350,7 +350,7 @@ public final class CodeSigningAccountsUpdateSamples {
350350
*/
351351
public final class OperationsListSamples {
352352
/*
353-
* x-ms-original-file: 2024-02-05-preview/Operations_List.json
353+
* x-ms-original-file: 2025-03-30/Operations_List.json
354354
*/
355355
/**
356356
* Sample code: List trusted signing account operations.

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@
4848
<revapi.skip>true</revapi.skip>
4949
</properties>
5050
<dependencies>
51-
<dependency>
52-
<groupId>com.azure</groupId>
53-
<artifactId>azure-json</artifactId>
54-
<version>1.4.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
55-
</dependency>
5651
<dependency>
5752
<groupId>com.azure</groupId>
5853
<artifactId>azure-core</artifactId>
@@ -75,5 +70,10 @@
7570
<version>1.15.3</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
7671
<scope>test</scope>
7772
</dependency>
73+
<dependency>
74+
<groupId>com.azure</groupId>
75+
<artifactId>azure-json</artifactId>
76+
<version>1.4.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
77+
</dependency>
7878
</dependencies>
7979
</project>

sdk/trustedsigning/azure-resourcemanager-trustedsigning/src/main/java/com/azure/resourcemanager/trustedsigning/fluent/models/CodeSigningAccountPatchProperties.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.azure.json.JsonSerializable;
1010
import com.azure.json.JsonToken;
1111
import com.azure.json.JsonWriter;
12-
import com.azure.resourcemanager.trustedsigning.models.AccountSku;
12+
import com.azure.resourcemanager.trustedsigning.models.AccountSkuPatch;
1313
import java.io.IOException;
1414

1515
/**
@@ -20,7 +20,7 @@ public final class CodeSigningAccountPatchProperties implements JsonSerializable
2020
/*
2121
* SKU of the trusted signing account.
2222
*/
23-
private AccountSku sku;
23+
private AccountSkuPatch sku;
2424

2525
/**
2626
* Creates an instance of CodeSigningAccountPatchProperties class.
@@ -33,7 +33,7 @@ public CodeSigningAccountPatchProperties() {
3333
*
3434
* @return the sku value.
3535
*/
36-
public AccountSku sku() {
36+
public AccountSkuPatch sku() {
3737
return this.sku;
3838
}
3939

@@ -43,7 +43,7 @@ public AccountSku sku() {
4343
* @param sku the sku value to set.
4444
* @return the CodeSigningAccountPatchProperties object itself.
4545
*/
46-
public CodeSigningAccountPatchProperties withSku(AccountSku sku) {
46+
public CodeSigningAccountPatchProperties withSku(AccountSkuPatch sku) {
4747
this.sku = sku;
4848
return this;
4949
}
@@ -86,7 +86,7 @@ public static CodeSigningAccountPatchProperties fromJson(JsonReader jsonReader)
8686
reader.nextToken();
8787

8888
if ("sku".equals(fieldName)) {
89-
deserializedCodeSigningAccountPatchProperties.sku = AccountSku.fromJson(reader);
89+
deserializedCodeSigningAccountPatchProperties.sku = AccountSkuPatch.fromJson(reader);
9090
} else {
9191
reader.skipChildren();
9292
}

sdk/trustedsigning/azure-resourcemanager-trustedsigning/src/main/java/com/azure/resourcemanager/trustedsigning/implementation/CodeSigningAccountImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import com.azure.core.management.SystemData;
99
import com.azure.core.util.Context;
1010
import com.azure.resourcemanager.trustedsigning.fluent.models.CodeSigningAccountInner;
11-
import com.azure.resourcemanager.trustedsigning.models.AccountSku;
11+
import com.azure.resourcemanager.trustedsigning.models.AccountSkuPatch;
1212
import com.azure.resourcemanager.trustedsigning.models.CodeSigningAccount;
1313
import com.azure.resourcemanager.trustedsigning.models.CodeSigningAccountPatch;
1414
import com.azure.resourcemanager.trustedsigning.models.CodeSigningAccountProperties;
@@ -173,7 +173,7 @@ public CodeSigningAccountImpl withProperties(CodeSigningAccountProperties proper
173173
return this;
174174
}
175175

176-
public CodeSigningAccountImpl withSku(AccountSku sku) {
176+
public CodeSigningAccountImpl withSku(AccountSkuPatch sku) {
177177
this.updateProperties.withSku(sku);
178178
return this;
179179
}

sdk/trustedsigning/azure-resourcemanager-trustedsigning/src/main/java/com/azure/resourcemanager/trustedsigning/implementation/TrustedSigningManagementClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public CertificateProfilesClient getCertificateProfiles() {
184184
this.defaultPollInterval = defaultPollInterval;
185185
this.endpoint = endpoint;
186186
this.subscriptionId = subscriptionId;
187-
this.apiVersion = "2024-02-05-preview";
187+
this.apiVersion = "2025-03-30";
188188
this.operations = new OperationsClientImpl(this);
189189
this.codeSigningAccounts = new CodeSigningAccountsClientImpl(this);
190190
this.certificateProfiles = new CertificateProfilesClientImpl(this);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) TypeSpec Code Generator.
4+
5+
package com.azure.resourcemanager.trustedsigning.models;
6+
7+
import com.azure.core.annotation.Fluent;
8+
import com.azure.json.JsonReader;
9+
import com.azure.json.JsonSerializable;
10+
import com.azure.json.JsonToken;
11+
import com.azure.json.JsonWriter;
12+
import java.io.IOException;
13+
14+
/**
15+
* SKU of the trusted signing account.
16+
*/
17+
@Fluent
18+
public final class AccountSkuPatch implements JsonSerializable<AccountSkuPatch> {
19+
/*
20+
* Name of the SKU.
21+
*/
22+
private SkuName name;
23+
24+
/**
25+
* Creates an instance of AccountSkuPatch class.
26+
*/
27+
public AccountSkuPatch() {
28+
}
29+
30+
/**
31+
* Get the name property: Name of the SKU.
32+
*
33+
* @return the name value.
34+
*/
35+
public SkuName name() {
36+
return this.name;
37+
}
38+
39+
/**
40+
* Set the name property: Name of the SKU.
41+
*
42+
* @param name the name value to set.
43+
* @return the AccountSkuPatch object itself.
44+
*/
45+
public AccountSkuPatch withName(SkuName name) {
46+
this.name = name;
47+
return this;
48+
}
49+
50+
/**
51+
* Validates the instance.
52+
*
53+
* @throws IllegalArgumentException thrown if the instance is not valid.
54+
*/
55+
public void validate() {
56+
}
57+
58+
/**
59+
* {@inheritDoc}
60+
*/
61+
@Override
62+
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
63+
jsonWriter.writeStartObject();
64+
jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString());
65+
return jsonWriter.writeEndObject();
66+
}
67+
68+
/**
69+
* Reads an instance of AccountSkuPatch from the JsonReader.
70+
*
71+
* @param jsonReader The JsonReader being read.
72+
* @return An instance of AccountSkuPatch if the JsonReader was pointing to an instance of it, or null if it was
73+
* pointing to JSON null.
74+
* @throws IOException If an error occurs while reading the AccountSkuPatch.
75+
*/
76+
public static AccountSkuPatch fromJson(JsonReader jsonReader) throws IOException {
77+
return jsonReader.readObject(reader -> {
78+
AccountSkuPatch deserializedAccountSkuPatch = new AccountSkuPatch();
79+
while (reader.nextToken() != JsonToken.END_OBJECT) {
80+
String fieldName = reader.getFieldName();
81+
reader.nextToken();
82+
83+
if ("name".equals(fieldName)) {
84+
deserializedAccountSkuPatch.name = SkuName.fromString(reader.getString());
85+
} else {
86+
reader.skipChildren();
87+
}
88+
}
89+
90+
return deserializedAccountSkuPatch;
91+
});
92+
}
93+
}

sdk/trustedsigning/azure-resourcemanager-trustedsigning/src/main/java/com/azure/resourcemanager/trustedsigning/models/Certificate.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ public final class Certificate implements JsonSerializable<Certificate> {
2323
*/
2424
private String serialNumber;
2525

26+
/*
27+
* Enhanced key usage of the certificate.
28+
*/
29+
private String enhancedKeyUsage;
30+
2631
/*
2732
* Subject name of the certificate.
2833
*/
@@ -68,6 +73,15 @@ public String serialNumber() {
6873
return this.serialNumber;
6974
}
7075

76+
/**
77+
* Get the enhancedKeyUsage property: Enhanced key usage of the certificate.
78+
*
79+
* @return the enhancedKeyUsage value.
80+
*/
81+
public String enhancedKeyUsage() {
82+
return this.enhancedKeyUsage;
83+
}
84+
7185
/**
7286
* Get the subjectName property: Subject name of the certificate.
7387
*
@@ -194,6 +208,7 @@ public void validate() {
194208
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
195209
jsonWriter.writeStartObject();
196210
jsonWriter.writeStringField("serialNumber", this.serialNumber);
211+
jsonWriter.writeStringField("enhancedKeyUsage", this.enhancedKeyUsage);
197212
jsonWriter.writeStringField("subjectName", this.subjectName);
198213
jsonWriter.writeStringField("thumbprint", this.thumbprint);
199214
jsonWriter.writeStringField("createdDate", this.createdDate);
@@ -220,6 +235,8 @@ public static Certificate fromJson(JsonReader jsonReader) throws IOException {
220235

221236
if ("serialNumber".equals(fieldName)) {
222237
deserializedCertificate.serialNumber = reader.getString();
238+
} else if ("enhancedKeyUsage".equals(fieldName)) {
239+
deserializedCertificate.enhancedKeyUsage = reader.getString();
223240
} else if ("subjectName".equals(fieldName)) {
224241
deserializedCertificate.subjectName = reader.getString();
225242
} else if ("thumbprint".equals(fieldName)) {

0 commit comments

Comments
 (0)