Skip to content

Commit

Permalink
Polishing.
Browse files Browse the repository at this point in the history
Rename GoogleCloudIamAuthenticationOptionsBuilder to GcpIamCredentialsAuthenticationOptionsBuilder.

See gh-600.
  • Loading branch information
mp911de committed Mar 10, 2021
1 parent 6053d75 commit e0bea23
Showing 1 changed file with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ private GcpIamCredentialsAuthenticationOptions(String path, GoogleCredentialsSup
}

/**
* @return a new {@link GoogleCloudIamAuthenticationOptionsBuilder}.
* @return a new {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
*/
public static GoogleCloudIamAuthenticationOptionsBuilder builder() {
return new GoogleCloudIamAuthenticationOptionsBuilder();
public static GcpIamCredentialsAuthenticationOptionsBuilder builder() {
return new GcpIamCredentialsAuthenticationOptionsBuilder();
}

/**
Expand All @@ -84,7 +84,7 @@ public GoogleCredentialsAccountIdAccessor getServiceAccountIdAccessor() {
/**
* Builder for {@link GcpIamCredentialsAuthenticationOptions}.
*/
public static class GoogleCloudIamAuthenticationOptionsBuilder {
public static class GcpIamCredentialsAuthenticationOptionsBuilder {

private String path = DEFAULT_GCP_AUTHENTICATION_PATH;

Expand All @@ -100,15 +100,15 @@ public static class GoogleCloudIamAuthenticationOptionsBuilder {

private GoogleCredentialsAccountIdAccessor serviceAccountIdAccessor = DefaultGoogleCredentialsAccessors.INSTANCE;

GoogleCloudIamAuthenticationOptionsBuilder() {
GcpIamCredentialsAuthenticationOptionsBuilder() {
}

/**
* Configure the mount path, defaults to {@literal aws}.
* @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");

Expand All @@ -121,10 +121,10 @@ public GoogleCloudIamAuthenticationOptionsBuilder path(String path) {
* use static credentials or provide a
* {@link #credentialsSupplier(GoogleCredentialsSupplier) credentials provider}.
* @param credentials must not be {@literal null}.
* @return {@code this} {@link GoogleCloudIamAuthenticationOptionsBuilder}.
* @return {@code this} {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
* @see #credentialsSupplier(GoogleCredentialsSupplier)
*/
public GoogleCloudIamAuthenticationOptionsBuilder credentials(GoogleCredentials credentials) {
public GcpIamCredentialsAuthenticationOptionsBuilder credentials(GoogleCredentials credentials) {

Assert.notNull(credentials, "ServiceAccountCredentials must not be null");

Expand All @@ -136,10 +136,10 @@ public GoogleCloudIamAuthenticationOptionsBuilder credentials(GoogleCredentials
* Alternatively, configure static {@link #credentials(GoogleCredentials)
* credentials}.
* @param credentialsSupplier must not be {@literal null}.
* @return {@code this} {@link GoogleCloudIamAuthenticationOptionsBuilder}.
* @return {@code this} {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
* @see #credentials(GoogleCredentials)
*/
public GoogleCloudIamAuthenticationOptionsBuilder credentialsSupplier(
public GcpIamCredentialsAuthenticationOptionsBuilder credentialsSupplier(
GoogleCredentialsSupplier credentialsSupplier) {

Assert.notNull(credentialsSupplier, "GcpServiceAccountCredentialsSupplier must not be null");
Expand All @@ -152,10 +152,10 @@ public GoogleCloudIamAuthenticationOptionsBuilder credentialsSupplier(
* Configure an explicit service account id to use in GCP IAM calls. If none is
* configured, falls back to using {@link ServiceAccountCredentials#getAccount()}.
* @param serviceAccountId the service account id (email) to use
* @return {@code this} {@link GoogleCloudIamAuthenticationOptionsBuilder}.
* @return {@code this} {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
* @since 2.1
*/
public GoogleCloudIamAuthenticationOptionsBuilder serviceAccountId(String serviceAccountId) {
public GcpIamCredentialsAuthenticationOptionsBuilder serviceAccountId(String serviceAccountId) {

Assert.notNull(serviceAccountId, "Service account id may not be null");

Expand All @@ -167,10 +167,10 @@ public GoogleCloudIamAuthenticationOptionsBuilder serviceAccountId(String servic
* account id used in GCP IAM calls. If none is configured, falls back to using
* {@link ServiceAccountCredentials#getAccount()}.
* @param serviceAccountIdAccessor the service account id provider to use
* @return {@code this} {@link GoogleCloudIamAuthenticationOptionsBuilder}.
* @return {@code this} {@link GcpIamCredentialsAuthenticationOptionsBuilder}.
* @see GoogleCredentialsAccountIdAccessor
*/
GoogleCloudIamAuthenticationOptionsBuilder serviceAccountIdAccessor(
GcpIamCredentialsAuthenticationOptionsBuilder serviceAccountIdAccessor(
GoogleCredentialsAccountIdAccessor serviceAccountIdAccessor) {

Assert.notNull(serviceAccountIdAccessor, "GcpServiceAccountIdAccessor must not be null");
Expand All @@ -182,9 +182,9 @@ GoogleCloudIamAuthenticationOptionsBuilder serviceAccountIdAccessor(
/**
* Configure the name of the role against which the login is being attempted.
* @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");

Expand All @@ -196,9 +196,9 @@ public GoogleCloudIamAuthenticationOptionsBuilder role(String role) {
* Configure the {@link Duration} for the JWT expiration. This defaults to 15
* minutes and cannot be more than a hour.
* @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");

Expand All @@ -210,9 +210,9 @@ public GoogleCloudIamAuthenticationOptionsBuilder jwtValidity(Duration jwtValidi
* Configure the {@link Clock} used to calculate epoch seconds until the JWT
* expiration.
* @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");

Expand Down

0 comments on commit e0bea23

Please sign in to comment.