Polishing.

Rename GoogleCloudIamAuthenticationOptionsBuilder to GcpIamCredentialsAuthenticationOptionsBuilder.

See gh-600.
This commit is contained in:
Mark Paluch
2021-03-10 11:27:04 +01:00
parent 7bd07302b1
commit 20c1d743c6

View File

@@ -61,10 +61,10 @@ public class GcpIamCredentialsAuthenticationOptions extends GcpIamAuthentication
} }
/** /**
* @return a new {@link GoogleCloudIamAuthenticationOptionsBuilder}. * @return a new {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
*/ */
public static GoogleCloudIamAuthenticationOptionsBuilder builder() { public static GcpIamCredentialsAuthenticationOptionsBuilder builder() {
return new GoogleCloudIamAuthenticationOptionsBuilder(); return new GcpIamCredentialsAuthenticationOptionsBuilder();
} }
/** /**
@@ -84,7 +84,7 @@ public class GcpIamCredentialsAuthenticationOptions extends GcpIamAuthentication
/** /**
* Builder for {@link GcpIamCredentialsAuthenticationOptions}. * Builder for {@link GcpIamCredentialsAuthenticationOptions}.
*/ */
public static class GoogleCloudIamAuthenticationOptionsBuilder { public static class GcpIamCredentialsAuthenticationOptionsBuilder {
private String path = DEFAULT_GCP_AUTHENTICATION_PATH; private String path = DEFAULT_GCP_AUTHENTICATION_PATH;
@@ -100,15 +100,15 @@ public class GcpIamCredentialsAuthenticationOptions extends GcpIamAuthentication
private GoogleCredentialsAccountIdAccessor serviceAccountIdAccessor = DefaultGoogleCredentialsAccessors.INSTANCE; private GoogleCredentialsAccountIdAccessor serviceAccountIdAccessor = DefaultGoogleCredentialsAccessors.INSTANCE;
GoogleCloudIamAuthenticationOptionsBuilder() { GcpIamCredentialsAuthenticationOptionsBuilder() {
} }
/** /**
* Configure the mount path, defaults to {@literal aws}. * Configure the mount path, defaults to {@literal aws}.
* @param path must not be empty or {@literal null}. * @param path must not be empty or {@literal null}.
* @return {@code this} {@link GoogleCloudIamAuthenticationOptionsBuilder}. * @return {@code this} {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
*/ */
public GoogleCloudIamAuthenticationOptionsBuilder path(String path) { public GcpIamCredentialsAuthenticationOptionsBuilder path(String path) {
Assert.hasText(path, "Path must not be empty"); Assert.hasText(path, "Path must not be empty");
@@ -121,10 +121,10 @@ public class GcpIamCredentialsAuthenticationOptions extends GcpIamAuthentication
* use static credentials or provide a * use static credentials or provide a
* {@link #credentialsSupplier(GoogleCredentialsSupplier) credentials provider}. * {@link #credentialsSupplier(GoogleCredentialsSupplier) credentials provider}.
* @param credentials must not be {@literal null}. * @param credentials must not be {@literal null}.
* @return {@code this} {@link GoogleCloudIamAuthenticationOptionsBuilder}. * @return {@code this} {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
* @see #credentialsSupplier(GoogleCredentialsSupplier) * @see #credentialsSupplier(GoogleCredentialsSupplier)
*/ */
public GoogleCloudIamAuthenticationOptionsBuilder credentials(GoogleCredentials credentials) { public GcpIamCredentialsAuthenticationOptionsBuilder credentials(GoogleCredentials credentials) {
Assert.notNull(credentials, "ServiceAccountCredentials must not be null"); Assert.notNull(credentials, "ServiceAccountCredentials must not be null");
@@ -136,10 +136,10 @@ public class GcpIamCredentialsAuthenticationOptions extends GcpIamAuthentication
* Alternatively, configure static {@link #credentials(GoogleCredentials) * Alternatively, configure static {@link #credentials(GoogleCredentials)
* credentials}. * credentials}.
* @param credentialsSupplier must not be {@literal null}. * @param credentialsSupplier must not be {@literal null}.
* @return {@code this} {@link GoogleCloudIamAuthenticationOptionsBuilder}. * @return {@code this} {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
* @see #credentials(GoogleCredentials) * @see #credentials(GoogleCredentials)
*/ */
public GoogleCloudIamAuthenticationOptionsBuilder credentialsSupplier( public GcpIamCredentialsAuthenticationOptionsBuilder credentialsSupplier(
GoogleCredentialsSupplier credentialsSupplier) { GoogleCredentialsSupplier credentialsSupplier) {
Assert.notNull(credentialsSupplier, "GcpServiceAccountCredentialsSupplier must not be null"); Assert.notNull(credentialsSupplier, "GcpServiceAccountCredentialsSupplier must not be null");
@@ -152,10 +152,10 @@ public class GcpIamCredentialsAuthenticationOptions extends GcpIamAuthentication
* Configure an explicit service account id to use in GCP IAM calls. If none is * Configure an explicit service account id to use in GCP IAM calls. If none is
* configured, falls back to using {@link ServiceAccountCredentials#getAccount()}. * configured, falls back to using {@link ServiceAccountCredentials#getAccount()}.
* @param serviceAccountId the service account id (email) to use * @param serviceAccountId the service account id (email) to use
* @return {@code this} {@link GoogleCloudIamAuthenticationOptionsBuilder}. * @return {@code this} {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
* @since 2.1 * @since 2.1
*/ */
public GoogleCloudIamAuthenticationOptionsBuilder serviceAccountId(String serviceAccountId) { public GcpIamCredentialsAuthenticationOptionsBuilder serviceAccountId(String serviceAccountId) {
Assert.notNull(serviceAccountId, "Service account id may not be null"); Assert.notNull(serviceAccountId, "Service account id may not be null");
@@ -167,10 +167,10 @@ public class GcpIamCredentialsAuthenticationOptions extends GcpIamAuthentication
* account id used in GCP IAM calls. If none is configured, falls back to using * account id used in GCP IAM calls. If none is configured, falls back to using
* {@link ServiceAccountCredentials#getAccount()}. * {@link ServiceAccountCredentials#getAccount()}.
* @param serviceAccountIdAccessor the service account id provider to use * @param serviceAccountIdAccessor the service account id provider to use
* @return {@code this} {@link GoogleCloudIamAuthenticationOptionsBuilder}. * @return {@code this} {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
* @see GoogleCredentialsAccountIdAccessor * @see GoogleCredentialsAccountIdAccessor
*/ */
GoogleCloudIamAuthenticationOptionsBuilder serviceAccountIdAccessor( GcpIamCredentialsAuthenticationOptionsBuilder serviceAccountIdAccessor(
GoogleCredentialsAccountIdAccessor serviceAccountIdAccessor) { GoogleCredentialsAccountIdAccessor serviceAccountIdAccessor) {
Assert.notNull(serviceAccountIdAccessor, "GcpServiceAccountIdAccessor must not be null"); Assert.notNull(serviceAccountIdAccessor, "GcpServiceAccountIdAccessor must not be null");
@@ -182,9 +182,9 @@ public class GcpIamCredentialsAuthenticationOptions extends GcpIamAuthentication
/** /**
* Configure the name of the role against which the login is being attempted. * Configure the name of the role against which the login is being attempted.
* @param role must not be empty or {@literal null}. * @param role must not be empty or {@literal null}.
* @return {@code this} {@link GoogleCloudIamAuthenticationOptionsBuilder}. * @return {@code this} {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
*/ */
public GoogleCloudIamAuthenticationOptionsBuilder role(String role) { public GcpIamCredentialsAuthenticationOptionsBuilder role(String role) {
Assert.hasText(role, "Role must not be null or empty"); Assert.hasText(role, "Role must not be null or empty");
@@ -196,9 +196,9 @@ public class GcpIamCredentialsAuthenticationOptions extends GcpIamAuthentication
* Configure the {@link Duration} for the JWT expiration. This defaults to 15 * Configure the {@link Duration} for the JWT expiration. This defaults to 15
* minutes and cannot be more than a hour. * minutes and cannot be more than a hour.
* @param jwtValidity must not be {@literal null}. * @param jwtValidity must not be {@literal null}.
* @return {@code this} {@link GoogleCloudIamAuthenticationOptionsBuilder}. * @return {@code this} {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
*/ */
public GoogleCloudIamAuthenticationOptionsBuilder jwtValidity(Duration jwtValidity) { public GcpIamCredentialsAuthenticationOptionsBuilder jwtValidity(Duration jwtValidity) {
Assert.hasText(this.role, "JWT validity duration must not be null"); Assert.hasText(this.role, "JWT validity duration must not be null");
@@ -210,9 +210,9 @@ public class GcpIamCredentialsAuthenticationOptions extends GcpIamAuthentication
* Configure the {@link Clock} used to calculate epoch seconds until the JWT * Configure the {@link Clock} used to calculate epoch seconds until the JWT
* expiration. * expiration.
* @param clock must not be {@literal null}. * @param clock must not be {@literal null}.
* @return {@code this} {@link GoogleCloudIamAuthenticationOptionsBuilder}. * @return {@code this} {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
*/ */
public GoogleCloudIamAuthenticationOptionsBuilder clock(Clock clock) { public GcpIamCredentialsAuthenticationOptionsBuilder clock(Clock clock) {
Assert.hasText(this.role, "Clock must not be null"); Assert.hasText(this.role, "Clock must not be null");