Skip to content

Commit 26ace32

Browse files
mgmt keyvault fix checkstyle (#9962)
* auto format * manual fix * clean up code
1 parent 113d753 commit 26ace32

File tree

80 files changed

+2283
-2382
lines changed

Some content is hidden

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

80 files changed

+2283
-2382
lines changed

sdk/keyvault/mgmt/src/main/java/com/azure/management/keyvault/AccessPolicy.java

Lines changed: 68 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,23 @@
1111
import com.azure.management.resources.fluentcore.model.Attachable;
1212
import com.azure.management.resources.fluentcore.model.HasInner;
1313
import com.azure.management.resources.fluentcore.model.Settable;
14-
1514
import java.util.List;
1615

17-
/**
18-
* An immutable client-side representation of a key vault access policy.
19-
*/
16+
/** An immutable client-side representation of a key vault access policy. */
2017
@Fluent
21-
public interface AccessPolicy extends
22-
ChildResource<Vault>,
23-
HasInner<AccessPolicyEntry> {
18+
public interface AccessPolicy extends ChildResource<Vault>, HasInner<AccessPolicyEntry> {
2419
/**
25-
* @return The Azure Active Directory tenant ID that should be used for
26-
* authenticating requests to the key vault.
20+
* @return The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
2721
*/
2822
String tenantId();
2923

30-
/**
31-
* @return The object ID of a user or service principal in the Azure Active
32-
* Directory tenant for the vault.
33-
*/
24+
/** @return The object ID of a user or service principal in the Azure Active Directory tenant for the vault. */
3425
String objectId();
3526

36-
/**
37-
* @return Application ID of the client making request on behalf of a principal.
38-
*/
27+
/** @return Application ID of the client making request on behalf of a principal. */
3928
String applicationId();
4029

41-
/**
42-
* @return Permissions the identity has for keys and secrets.
43-
*/
30+
/** @return Permissions the identity has for keys and secrets. */
4431
Permissions permissions();
4532

4633
/**************************************************************
@@ -49,16 +36,13 @@ public interface AccessPolicy extends
4936

5037
/**
5138
* The entirety of an access policy definition.
39+
*
5240
* @param <ParentT> the return type of the final {@link Attachable#attach()}
5341
*/
54-
interface Definition<ParentT> extends
55-
DefinitionStages.Blank<ParentT>,
56-
DefinitionStages.WithAttach<ParentT> {
42+
interface Definition<ParentT> extends DefinitionStages.Blank<ParentT>, DefinitionStages.WithAttach<ParentT> {
5743
}
5844

59-
/**
60-
* Grouping of access policy definition stages applicable as part of a key vault creation.
61-
*/
45+
/** Grouping of access policy definition stages applicable as part of a key vault creation. */
6246
interface DefinitionStages {
6347
/**
6448
* The first stage of an access policy definition.
@@ -70,6 +54,7 @@ interface Blank<ParentT> extends WithIdentity<ParentT> {
7054

7155
/**
7256
* The access policy definition stage allowing the Active Directory identity to be specified.
57+
*
7358
* @param <ParentT> the stage of the parent definition to return to after attaching this definition
7459
*/
7560
interface WithIdentity<ParentT> {
@@ -88,27 +73,27 @@ interface WithIdentity<ParentT> {
8873
* @return the next stage of access policy definition
8974
*/
9075
WithAttach<ParentT> forUser(ActiveDirectoryUser user);
91-
76+
9277
/**
9378
* Specifies the Active Directory user this access policy is for.
9479
*
9580
* @param userPrincipalName the user principal name of the AD user
9681
* @return the next stage of access policy definition
9782
*/
9883
WithAttach<ParentT> forUser(String userPrincipalName);
99-
84+
10085
/**
10186
* Application ID of the client making request on behalf of a principal.
102-
*
87+
*
10388
* @param applicationId the application ID
10489
* @return the next stage of access policy definition
10590
*/
10691
WithAttach<ParentT> forApplicationId(String applicationId);
107-
92+
10893
/**
109-
* Specifies the Azure Active Directory tenant ID that should be used for
110-
* authenticating requests to the key vault.
111-
*
94+
* Specifies the Azure Active Directory tenant ID that should be used for authenticating requests to the key
95+
* vault.
96+
*
11297
* @param tenantId the tenant ID for the key vault.
11398
* @return the next stage of access policy definition
11499
*/
@@ -141,6 +126,7 @@ interface WithIdentity<ParentT> {
141126

142127
/**
143128
* The access policy definition stage allowing permissions to be added.
129+
*
144130
* @param <ParentT> the stage of the parent definition to return to after attaching this definition
145131
*/
146132
interface WithPermissions<ParentT> {
@@ -212,22 +198,22 @@ interface WithPermissions<ParentT> {
212198
* @return the next stage of access policy definition
213199
*/
214200
WithAttach<ParentT> allowCertificatePermissions(List<CertificatePermissions> permissions);
215-
201+
216202
/**
217203
* Allow all permissions for the Ad identity to access storage.
218-
*
204+
*
219205
* @return the next stage of access policy definition
220206
*/
221207
WithAttach<ParentT> allowStorageAllPermissions();
222-
208+
223209
/**
224210
* Allow a list of permissions for the AD identity to access storage.
225211
*
226212
* @param permissions the list of permissions allowed
227213
* @return the next stage of access policy definition
228214
*/
229-
WithAttach<ParentT> allowStoragePermissions(StoragePermissions...permissions);
230-
215+
WithAttach<ParentT> allowStoragePermissions(StoragePermissions... permissions);
216+
231217
/**
232218
* Allow a list of permissions for the AD identity to access storage.
233219
*
@@ -237,31 +223,28 @@ interface WithPermissions<ParentT> {
237223
WithAttach<ParentT> allowStoragePermissions(List<StoragePermissions> permissions);
238224
}
239225

240-
/** The final stage of the access policy definition.
241-
* <p>
242-
* At this stage, more permissions can be added or application ID can be specified,
243-
* or the access policy definition can be attached to the parent key vault definition
244-
* using {@link WithAttach#attach()}.
226+
/**
227+
* The final stage of the access policy definition.
228+
*
229+
* <p>At this stage, more permissions can be added or application ID can be specified, or the access policy
230+
* definition can be attached to the parent key vault definition using {@link WithAttach#attach()}.
231+
*
245232
* @param <ParentT> the return type of {@link WithAttach#attach()}
246233
*/
247-
interface WithAttach<ParentT> extends
248-
Attachable.InUpdate<ParentT>,
249-
WithPermissions<ParentT> {
234+
interface WithAttach<ParentT> extends Attachable.InUpdate<ParentT>, WithPermissions<ParentT> {
250235
}
251236
}
252237

253238
/**
254239
* The entirety of an access policy definition as part of a key vault update.
240+
*
255241
* @param <ParentT> the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()}
256242
*/
257-
interface UpdateDefinition<ParentT> extends
258-
UpdateDefinitionStages.Blank<ParentT>,
259-
UpdateDefinitionStages.WithAttach<ParentT> {
243+
interface UpdateDefinition<ParentT>
244+
extends UpdateDefinitionStages.Blank<ParentT>, UpdateDefinitionStages.WithAttach<ParentT> {
260245
}
261246

262-
/**
263-
* Grouping of access policy definition stages applicable as part of a key vault update.
264-
*/
247+
/** Grouping of access policy definition stages applicable as part of a key vault update. */
265248
interface UpdateDefinitionStages {
266249
/**
267250
* The first stage of an access policy definition.
@@ -273,6 +256,7 @@ interface Blank<ParentT> extends WithIdentity<ParentT> {
273256

274257
/**
275258
* The access policy definition stage allowing the Active Directory identity to be specified.
259+
*
276260
* @param <ParentT> the stage of the parent definition to return to after attaching this definition
277261
*/
278262
interface WithIdentity<ParentT> {
@@ -299,19 +283,19 @@ interface WithIdentity<ParentT> {
299283
* @return the next stage of access policy definition
300284
*/
301285
WithAttach<ParentT> forUser(String userPrincipalName);
302-
286+
303287
/**
304288
* Application ID of the client making request on behalf of a principal.
305-
*
289+
*
306290
* @param applicationId the application ID
307291
* @return the next stage of access policy definition
308292
*/
309293
WithAttach<ParentT> forApplicationId(String applicationId);
310-
294+
311295
/**
312-
* Specifies the Azure Active Directory tenant ID that should be used for
313-
* authenticating requests to the key vault.
314-
*
296+
* Specifies the Azure Active Directory tenant ID that should be used for authenticating requests to the key
297+
* vault.
298+
*
315299
* @param tenantId the tenant ID for the key vault.
316300
* @return the next stage of access policy definition
317301
*/
@@ -344,6 +328,7 @@ interface WithIdentity<ParentT> {
344328

345329
/**
346330
* The access policy definition stage allowing permissions to be added.
331+
*
347332
* @param <ParentT> the stage of the parent definition to return to after attaching this definition
348333
*/
349334
interface WithPermissions<ParentT> {
@@ -392,22 +377,22 @@ interface WithPermissions<ParentT> {
392377
* @return the next stage of access policy definition
393378
*/
394379
WithAttach<ParentT> allowSecretPermissions(List<SecretPermissions> permissions);
395-
380+
396381
/**
397382
* Allow all permissions for the Ad identity to access storage.
398-
*
383+
*
399384
* @return the next stage of access policy definition
400385
*/
401386
WithAttach<ParentT> allowStorageAllPermissions();
402-
387+
403388
/**
404389
* Allow a list of permissions for the AD identity to access storage.
405390
*
406391
* @param permissions the list of permissions allowed
407392
* @return the next stage of access policy definition
408393
*/
409-
WithAttach<ParentT> allowStoragePermissions(StoragePermissions...permissions);
410-
394+
WithAttach<ParentT> allowStoragePermissions(StoragePermissions... permissions);
395+
411396
/**
412397
* Allow a list of permissions for the AD identity to access storage.
413398
*
@@ -417,26 +402,21 @@ interface WithPermissions<ParentT> {
417402
WithAttach<ParentT> allowStoragePermissions(List<StoragePermissions> permissions);
418403
}
419404

420-
/** The final stage of the access policy definition.
421-
* <p>
422-
* At this stage, more permissions can be added or application ID can be specified,
423-
* or the access policy definition can be attached to the parent key vault update
424-
* using {@link WithAttach#attach()}.
405+
/**
406+
* The final stage of the access policy definition.
407+
*
408+
* <p>At this stage, more permissions can be added or application ID can be specified, or the access policy
409+
* definition can be attached to the parent key vault update using {@link WithAttach#attach()}.
410+
*
425411
* @param <ParentT> the return type of {@link WithAttach#attach()}
426412
*/
427-
interface WithAttach<ParentT> extends
428-
Attachable.InDefinition<ParentT>,
429-
WithPermissions<ParentT> {
413+
interface WithAttach<ParentT> extends Attachable.InDefinition<ParentT>, WithPermissions<ParentT> {
430414
}
431415
}
432416

433-
/**
434-
* Grouping of all the key vault update stages.
435-
*/
417+
/** Grouping of all the key vault update stages. */
436418
interface UpdateStages {
437-
/**
438-
* The access policy update stage allowing permissions to be added or removed.
439-
*/
419+
/** The access policy update stage allowing permissions to be added or removed. */
440420
interface WithPermissions {
441421
/**
442422
* Allow all permissions for the AD identity to access keys.
@@ -575,45 +555,45 @@ interface WithPermissions {
575555
* @return the next stage of access policy update
576556
*/
577557
Update disallowCertificatePermissions(List<CertificatePermissions> permissions);
578-
558+
579559
/**
580560
* Allow all permissions for the Ad identity to access storage.
581-
*
561+
*
582562
* @return the next stage of access policy definition
583563
*/
584564
Update allowStorageAllPermissions();
585-
565+
586566
/**
587567
* Allow a list of permissions for the AD identity to access storage.
588568
*
589569
* @param permissions the list of permissions allowed
590570
* @return the next stage of access policy definition
591571
*/
592-
Update allowStoragePermissions(StoragePermissions...permissions);
593-
572+
Update allowStoragePermissions(StoragePermissions... permissions);
573+
594574
/**
595575
* Allow a list of permissions for the AD identity to access storage.
596576
*
597577
* @param permissions the list of permissions allowed
598578
* @return the next stage of access policy definition
599579
*/
600580
Update allowStoragePermissions(List<StoragePermissions> permissions);
601-
581+
602582
/**
603583
* Revoke all permissions for the Ad identity to access storage.
604-
*
584+
*
605585
* @return the next stage of access policy definition
606586
*/
607587
Update disallowStorageAllPermissions();
608-
588+
609589
/**
610590
* Revoke a list of permissions for the AD identity to access storage.
611591
*
612592
* @param permissions the list of permissions allowed
613593
* @return the next stage of access policy definition
614594
*/
615-
Update disallowStoragePermissions(StoragePermissions...permissions);
616-
595+
Update disallowStoragePermissions(StoragePermissions... permissions);
596+
617597
/**
618598
* Revoke a list of permissions for the AD identity to access storage.
619599
*
@@ -624,12 +604,7 @@ interface WithPermissions {
624604
}
625605
}
626606

627-
/**
628-
* The entirety of an access policy update as part of a key vault update.
629-
*/
630-
interface Update extends
631-
UpdateStages.WithPermissions,
632-
Settable<Vault.Update> {
607+
/** The entirety of an access policy update as part of a key vault update. */
608+
interface Update extends UpdateStages.WithPermissions, Settable<Vault.Update> {
633609
}
634610
}
635-

0 commit comments

Comments
 (0)