/** * Builds a new {@link OAuth2CredentialFlowState OAuth2CredentialFlowState}. * @return An immutable instance of OAuth2CredentialFlowState * @throws java.lang.IllegalStateException if any required attributes are missing */ public OAuth2CredentialFlowState build() { return ImmutableOAuth2CredentialFlowState.validate(new ImmutableOAuth2CredentialFlowState(this)); } }
/** * Construct a new immutable {@code OAuth2CredentialFlowState} instance. * @param accessGrant The value for the {@code accessGrant} attribute * @param code The value for the {@code code} attribute * @param state The value for the {@code state} attribute * @param connectorId The value for the {@code connectorId} attribute * @param key The value for the {@code key} attribute * @param providerId The value for the {@code providerId} attribute * @param redirectUrl The value for the {@code redirectUrl} attribute * @param returnUrl The value for the {@code returnUrl} attribute * @return An immutable OAuth2CredentialFlowState instance */ public static OAuth2CredentialFlowState of(AccessGrant accessGrant, String code, String state, String connectorId, String key, String providerId, String redirectUrl, URI returnUrl) { return validate(new ImmutableOAuth2CredentialFlowState(accessGrant, code, state, connectorId, key, providerId, redirectUrl, returnUrl)); }
/** * Copy the current immutable object by setting a value for the {@link OAuth2CredentialFlowState#getState() state} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for state (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableOAuth2CredentialFlowState withState(String value) { if (Objects.equals(this.state, value)) return this; return validate(new ImmutableOAuth2CredentialFlowState( this, this.accessGrant, this.code, value, this.connectorId, this.key, this.providerId, this.redirectUrl, this.returnUrl)); }
/** * Copy the current immutable object by setting a value for the {@link OAuth2CredentialFlowState#getProviderId() providerId} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for providerId (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableOAuth2CredentialFlowState withProviderId(String value) { if (Objects.equals(this.providerId, value)) return this; return validate(new ImmutableOAuth2CredentialFlowState( this, this.accessGrant, this.code, this.state, this.connectorId, this.key, value, this.redirectUrl, this.returnUrl)); }
/** * Copy the current immutable object by setting a value for the {@link OAuth2CredentialFlowState#getKey() key} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for key (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableOAuth2CredentialFlowState withKey(String value) { if (Objects.equals(this.key, value)) return this; return validate(new ImmutableOAuth2CredentialFlowState( this, this.accessGrant, this.code, this.state, this.connectorId, value, this.providerId, this.redirectUrl, this.returnUrl)); }
/** * Copy the current immutable object by setting a value for the {@link OAuth2CredentialFlowState#getAccessGrant() accessGrant} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for accessGrant (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableOAuth2CredentialFlowState withAccessGrant(AccessGrant value) { if (this.accessGrant == value) return this; return validate(new ImmutableOAuth2CredentialFlowState( this, value, this.code, this.state, this.connectorId, this.key, this.providerId, this.redirectUrl, this.returnUrl)); }
/** * Copy the current immutable object by setting a value for the {@link OAuth2CredentialFlowState#getRedirectUrl() redirectUrl} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for redirectUrl (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableOAuth2CredentialFlowState withRedirectUrl(String value) { if (Objects.equals(this.redirectUrl, value)) return this; return validate(new ImmutableOAuth2CredentialFlowState( this, this.accessGrant, this.code, this.state, this.connectorId, this.key, this.providerId, value, this.returnUrl)); }
/** * Copy the current immutable object by setting a value for the {@link OAuth2CredentialFlowState#getReturnUrl() returnUrl} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for returnUrl (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableOAuth2CredentialFlowState withReturnUrl(URI value) { if (this.returnUrl == value) return this; return validate(new ImmutableOAuth2CredentialFlowState( this, this.accessGrant, this.code, this.state, this.connectorId, this.key, this.providerId, this.redirectUrl, value)); }
/** * Copy the current immutable object by setting a value for the {@link OAuth2CredentialFlowState#getCode() code} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for code (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableOAuth2CredentialFlowState withCode(String value) { if (Objects.equals(this.code, value)) return this; return validate(new ImmutableOAuth2CredentialFlowState( this, this.accessGrant, value, this.state, this.connectorId, this.key, this.providerId, this.redirectUrl, this.returnUrl)); }
/** * Copy the current immutable object by setting a value for the {@link OAuth2CredentialFlowState#getConnectorId() connectorId} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for connectorId * @return A modified copy of the {@code this} object */ public final ImmutableOAuth2CredentialFlowState withConnectorId(String value) { if (this.connectorId.equals(value)) return this; String newValue = Objects.requireNonNull(value, "connectorId"); return validate(new ImmutableOAuth2CredentialFlowState( this, this.accessGrant, this.code, this.state, newValue, this.key, this.providerId, this.redirectUrl, this.returnUrl)); }