* Both type and ID are required. This is equivalent to {@code IamPrincipal.builder().type(principalType).id(principalId) * .build()}. */ static IamPrincipal create(IamPrincipalType principalType, String principalId) { return builder().type(principalType).id(principalId).build(); } /** * Create an {@link IamPrincipal} of the supplied type and ID (see {@link Builder#type(String)} and * {@link Builder#id(String)}). *
* Both type and ID are required. This is equivalent to {@link #create(IamPrincipalType, String)}, except you do not need * to call {@code IamPrincipalType.create()}. */ static IamPrincipal create(String principalType, String principalId) { return builder().type(principalType).id(principalId).build(); } /** * Create multiple {@link IamPrincipal}s with the same {@link IamPrincipalType} and different IDs (see * {@link Builder#type(IamPrincipalType)} and {@link Builder#id(String)}). *
* Type is required, and the IDs in the IDs list must not be null. This is equivalent to calling
* {@link #create(IamPrincipalType, String)} multiple times and collecting the results into a list.
*/
static List
* Type is required, and the IDs in the IDs list must not be null. This is equivalent to calling
* {@link #create(String, String)} multiple times and collecting the results into a list.
*/
static List
* This value is required.
*
* @see IamPrincipalType
* @see Principal
* user guide
*/
Builder type(IamPrincipalType type);
/**
* Set the {@link IamPrincipalType} associated with this principal.
*
* This is the same as {@link #type(IamPrincipalType)}, except you do not need to call {@code IamPrincipalType.create()}.
* This value is required.
*
* @see IamPrincipalType
* @see Principal
* user guide
*/
Builder type(String type);
/**
* Set the identifier of the principal.
*
* The identifiers that can be used depend on the {@link #type(IamPrincipalType)} of the principal.
*
* @see Principal
* user guide
*/
Builder id(String id);
}
}