Skip to content

Commit dbe0b07

Browse files
[Key Vault] Updated TypeSpec code customization and removed AutoRest files. (#45558)
* Updated tsp-location.yaml files * Updated Autorest version * Updated Secrets customizations for TSP. * Removed AutoRest-specific files and renamed customizations folders * Small typo fix for Secrets * Updated codegen for Keys and re-generated * Updated codegen for Certificates and re-generated * Updated codegen for Administration and re-generated * Fixed codegen for Keys and re-generated * Updated other codegen POMs * Fixed an issue with codegen and files being out of sync * Update sdk/keyvault/azure-security-keyvault-administration/customizations/src/main/java/AdministrationCustomizations.java Co-authored-by: Alan Zimmer <[email protected]> * Updated tsp-location.yaml commits * Fixed customizations * Updated codegen commit hash * Fixed codegen for Keys again --------- Co-authored-by: Alan Zimmer <[email protected]>
1 parent b46250d commit dbe0b07

File tree

153 files changed

+2660
-2710
lines changed

Some content is hidden

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

153 files changed

+2660
-2710
lines changed

sdk/keyvault/azure-security-keyvault-administration/swagger/pom.xml renamed to sdk/keyvault/azure-security-keyvault-administration/customizations/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5-
<modelVersion>4.0.0</modelVersion>
6-
75
<parent>
86
<groupId>com.azure</groupId>
97
<artifactId>azure-code-customization-parent</artifactId>
108
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-code-customization-parent;current} -->
119
<relativePath>../../../parents/azure-code-customization-parent</relativePath>
1210
</parent>
1311

12+
<modelVersion>4.0.0</modelVersion>
13+
1414
<name>Microsoft Azure Security Key Vault Administration code generation customization</name>
15-
<description>This package contains code generation customization for Microsoft Azure Security Key Vault Administration</description>
15+
<description>This package contains code generation customization for Microsoft Azure Security Key Vault Administration library</description>
1616

1717
<groupId>com.azure.tools</groupId>
18-
<artifactId>azure-security-administration-autorest-customization</artifactId>
18+
<artifactId>azure-security-keyvault-administration-codegen-customization</artifactId>
1919
<version>1.0.0-beta.1</version>
2020
<packaging>jar</packaging>
2121
</project>
Lines changed: 171 additions & 119 deletions
Large diffs are not rendered by default.

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAdministrationServiceVersion.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) TypeSpec Code Generator.
34

45
package com.azure.security.keyvault.administration;
56

67
import com.azure.core.util.ServiceVersion;
78

89
/**
9-
* The versions of Azure Key Vault Administration service supported by this client library.
10+
* The versions of Azure Key Vault supported by this client library.
1011
*/
1112
public enum KeyVaultAdministrationServiceVersion implements ServiceVersion {
1213
/**
@@ -40,6 +41,9 @@ public enum KeyVaultAdministrationServiceVersion implements ServiceVersion {
4041
this.version = version;
4142
}
4243

44+
/**
45+
* {@inheritDoc}
46+
*/
4347
@Override
4448
public String getVersion() {
4549
return this.version;

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/KeyVaultAdministrationClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public KeyVaultAdministrationClientImpl(HttpPipeline httpPipeline, SerializerAda
188188
* perform REST calls.
189189
*/
190190
@Host("{vaultBaseUrl}")
191-
@ServiceInterface(name = "KeyVaultAdministrationClient")
191+
@ServiceInterface(name = "KeyVaultAdministrati")
192192
public interface KeyVaultAdministrationClientService {
193193
@Get("/backup/{jobId}/pending")
194194
@ExpectedResponses({ 200 })

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleAssignmentsImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public KeyVaultAdministrationServiceVersion getServiceVersion() {
7777
* service to perform REST calls.
7878
*/
7979
@Host("{vaultBaseUrl}")
80-
@ServiceInterface(name = "KeyVaultAdministrationClientRoleAs")
80+
@ServiceInterface(name = "KeyVaultAdministrati")
8181
public interface RoleAssignmentsService {
8282
@Delete("/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}")
8383
@ExpectedResponses({ 200 })

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/RoleDefinitionsImpl.java

Lines changed: 29 additions & 29 deletions
Large diffs are not rendered by default.

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupOperation.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33
// Code generated by Microsoft (R) TypeSpec Code Generator.
4+
45
package com.azure.security.keyvault.administration.implementation.models;
56

67
import com.azure.core.annotation.Generated;
@@ -19,7 +20,6 @@
1920
*/
2021
@Immutable
2122
public final class FullBackupOperation implements JsonSerializable<FullBackupOperation> {
22-
2323
/*
2424
* Status of the backup operation.
2525
*/
@@ -71,7 +71,7 @@ private FullBackupOperation() {
7171

7272
/**
7373
* Get the status property: Status of the backup operation.
74-
*
74+
*
7575
* @return the status value.
7676
*/
7777
@Generated
@@ -81,7 +81,7 @@ public OperationStatus getStatus() {
8181

8282
/**
8383
* Get the statusDetails property: The status details of backup operation.
84-
*
84+
*
8585
* @return the statusDetails value.
8686
*/
8787
@Generated
@@ -91,7 +91,7 @@ public String getStatusDetails() {
9191

9292
/**
9393
* Get the error property: Error encountered, if any, during the full backup operation.
94-
*
94+
*
9595
* @return the error value.
9696
*/
9797
@Generated
@@ -101,7 +101,7 @@ public FullBackupOperationError getError() {
101101

102102
/**
103103
* Get the startTime property: The start time of the backup operation in UTC.
104-
*
104+
*
105105
* @return the startTime value.
106106
*/
107107
@Generated
@@ -114,7 +114,7 @@ public OffsetDateTime getStartTime() {
114114

115115
/**
116116
* Get the endTime property: The end time of the backup operation in UTC.
117-
*
117+
*
118118
* @return the endTime value.
119119
*/
120120
@Generated
@@ -127,7 +127,7 @@ public OffsetDateTime getEndTime() {
127127

128128
/**
129129
* Get the jobId property: Identifier for the full backup operation.
130-
*
130+
*
131131
* @return the jobId value.
132132
*/
133133
@Generated
@@ -138,7 +138,7 @@ public String getJobId() {
138138
/**
139139
* Get the azureStorageBlobContainerUri property: The Azure blob storage container Uri which contains the full
140140
* backup.
141-
*
141+
*
142142
* @return the azureStorageBlobContainerUri value.
143143
*/
144144
@Generated
@@ -165,7 +165,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
165165

166166
/**
167167
* Reads an instance of FullBackupOperation from the JsonReader.
168-
*
168+
*
169169
* @param jsonReader The JsonReader being read.
170170
* @return An instance of FullBackupOperation if the JsonReader was pointing to an instance of it, or null if it was
171171
* pointing to JSON null.
@@ -178,6 +178,7 @@ public static FullBackupOperation fromJson(JsonReader jsonReader) throws IOExcep
178178
while (reader.nextToken() != JsonToken.END_OBJECT) {
179179
String fieldName = reader.getFieldName();
180180
reader.nextToken();
181+
181182
if ("status".equals(fieldName)) {
182183
deserializedFullBackupOperation.status = OperationStatus.fromString(reader.getString());
183184
} else if ("statusDetails".equals(fieldName)) {
@@ -196,6 +197,7 @@ public static FullBackupOperation fromJson(JsonReader jsonReader) throws IOExcep
196197
reader.skipChildren();
197198
}
198199
}
200+
199201
return deserializedFullBackupOperation;
200202
});
201203
}

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/FullBackupOperationError.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33
// Code generated by Microsoft (R) TypeSpec Code Generator.
4+
45
package com.azure.security.keyvault.administration.implementation.models;
56

67
import com.azure.core.annotation.Generated;
@@ -16,7 +17,6 @@
1617
*/
1718
@Immutable
1819
public final class FullBackupOperationError implements JsonSerializable<FullBackupOperationError> {
19-
2020
/*
2121
* The error code.
2222
*/
@@ -44,7 +44,7 @@ private FullBackupOperationError() {
4444

4545
/**
4646
* Get the code property: The error code.
47-
*
47+
*
4848
* @return the code value.
4949
*/
5050
@Generated
@@ -54,7 +54,7 @@ public String getCode() {
5454

5555
/**
5656
* Get the message property: The error message.
57-
*
57+
*
5858
* @return the message value.
5959
*/
6060
@Generated
@@ -64,7 +64,7 @@ public String getMessage() {
6464

6565
/**
6666
* Get the innerError property: The key vault server error.
67-
*
67+
*
6868
* @return the innerError value.
6969
*/
7070
@Generated
@@ -84,7 +84,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
8484

8585
/**
8686
* Reads an instance of FullBackupOperationError from the JsonReader.
87-
*
87+
*
8888
* @param jsonReader The JsonReader being read.
8989
* @return An instance of FullBackupOperationError if the JsonReader was pointing to an instance of it, or null if
9090
* it was pointing to JSON null.
@@ -97,6 +97,7 @@ public static FullBackupOperationError fromJson(JsonReader jsonReader) throws IO
9797
while (reader.nextToken() != JsonToken.END_OBJECT) {
9898
String fieldName = reader.getFieldName();
9999
reader.nextToken();
100+
100101
if ("code".equals(fieldName)) {
101102
deserializedFullBackupOperationError.code = reader.getString();
102103
} else if ("message".equals(fieldName)) {
@@ -107,6 +108,7 @@ public static FullBackupOperationError fromJson(JsonReader jsonReader) throws IO
107108
reader.skipChildren();
108109
}
109110
}
111+
110112
return deserializedFullBackupOperationError;
111113
});
112114
}

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/OperationStatus.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33
// Code generated by Microsoft (R) TypeSpec Code Generator.
4+
45
package com.azure.security.keyvault.administration.implementation.models;
56

67
import com.azure.core.annotation.Generated;
@@ -11,7 +12,6 @@
1112
* The status of a long-running operation.
1213
*/
1314
public final class OperationStatus extends ExpandableStringEnum<OperationStatus> {
14-
1515
/**
1616
* The operation is in progress.
1717
*/
@@ -38,7 +38,7 @@ public final class OperationStatus extends ExpandableStringEnum<OperationStatus>
3838

3939
/**
4040
* Creates a new instance of OperationStatus value.
41-
*
41+
*
4242
* @deprecated Use the {@link #fromString(String)} factory method.
4343
*/
4444
@Generated
@@ -48,7 +48,7 @@ public OperationStatus() {
4848

4949
/**
5050
* Creates or finds a OperationStatus from its string representation.
51-
*
51+
*
5252
* @param name a name to look for.
5353
* @return the corresponding OperationStatus.
5454
*/
@@ -59,7 +59,7 @@ public static OperationStatus fromString(String name) {
5959

6060
/**
6161
* Gets known OperationStatus values.
62-
*
62+
*
6363
* @return known OperationStatus values.
6464
*/
6565
@Generated

sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/models/Permission.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33
// Code generated by Microsoft (R) TypeSpec Code Generator.
4+
45
package com.azure.security.keyvault.administration.implementation.models;
56

67
import com.azure.core.annotation.Fluent;
@@ -18,7 +19,6 @@
1819
*/
1920
@Fluent
2021
public final class Permission implements JsonSerializable<Permission> {
21-
2222
/*
2323
* Action permissions that are granted.
2424
*/
@@ -54,7 +54,7 @@ public Permission() {
5454

5555
/**
5656
* Get the actions property: Action permissions that are granted.
57-
*
57+
*
5858
* @return the actions value.
5959
*/
6060
@Generated
@@ -64,7 +64,7 @@ public List<String> getActions() {
6464

6565
/**
6666
* Set the actions property: Action permissions that are granted.
67-
*
67+
*
6868
* @param actions the actions value to set.
6969
* @return the Permission object itself.
7070
*/
@@ -77,7 +77,7 @@ public Permission setActions(List<String> actions) {
7777
/**
7878
* Get the notActions property: Action permissions that are excluded but not denied. They may be granted by other
7979
* role definitions assigned to a principal.
80-
*
80+
*
8181
* @return the notActions value.
8282
*/
8383
@Generated
@@ -88,7 +88,7 @@ public List<String> getNotActions() {
8888
/**
8989
* Set the notActions property: Action permissions that are excluded but not denied. They may be granted by other
9090
* role definitions assigned to a principal.
91-
*
91+
*
9292
* @param notActions the notActions value to set.
9393
* @return the Permission object itself.
9494
*/
@@ -100,7 +100,7 @@ public Permission setNotActions(List<String> notActions) {
100100

101101
/**
102102
* Get the dataActions property: Data action permissions that are granted.
103-
*
103+
*
104104
* @return the dataActions value.
105105
*/
106106
@Generated
@@ -110,7 +110,7 @@ public List<KeyVaultDataAction> getDataActions() {
110110

111111
/**
112112
* Set the dataActions property: Data action permissions that are granted.
113-
*
113+
*
114114
* @param dataActions the dataActions value to set.
115115
* @return the Permission object itself.
116116
*/
@@ -123,7 +123,7 @@ public Permission setDataActions(List<KeyVaultDataAction> dataActions) {
123123
/**
124124
* Get the notDataActions property: Data action permissions that are excluded but not denied. They may be granted by
125125
* other role definitions assigned to a principal.
126-
*
126+
*
127127
* @return the notDataActions value.
128128
*/
129129
@Generated
@@ -134,7 +134,7 @@ public List<KeyVaultDataAction> getNotDataActions() {
134134
/**
135135
* Set the notDataActions property: Data action permissions that are excluded but not denied. They may be granted by
136136
* other role definitions assigned to a principal.
137-
*
137+
*
138138
* @param notDataActions the notDataActions value to set.
139139
* @return the Permission object itself.
140140
*/
@@ -162,7 +162,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
162162

163163
/**
164164
* Reads an instance of Permission from the JsonReader.
165-
*
165+
*
166166
* @param jsonReader The JsonReader being read.
167167
* @return An instance of Permission if the JsonReader was pointing to an instance of it, or null if it was pointing
168168
* to JSON null.
@@ -175,6 +175,7 @@ public static Permission fromJson(JsonReader jsonReader) throws IOException {
175175
while (reader.nextToken() != JsonToken.END_OBJECT) {
176176
String fieldName = reader.getFieldName();
177177
reader.nextToken();
178+
178179
if ("actions".equals(fieldName)) {
179180
List<String> actions = reader.readArray(reader1 -> reader1.getString());
180181
deserializedPermission.actions = actions;
@@ -193,6 +194,7 @@ public static Permission fromJson(JsonReader jsonReader) throws IOException {
193194
reader.skipChildren();
194195
}
195196
}
197+
196198
return deserializedPermission;
197199
});
198200
}

0 commit comments

Comments
 (0)