/** * Builds a new {@link IntegrationDeploymentOverview IntegrationDeploymentOverview}. * @return An immutable instance of IntegrationDeploymentOverview * @throws java.lang.IllegalStateException if any required attributes are missing */ public IntegrationDeploymentOverview build() { return ImmutableIntegrationDeploymentOverview.validate(new ImmutableIntegrationDeploymentOverview(this)); }
/** * Construct a new immutable {@code IntegrationDeploymentOverview} instance. * @param userId The value for the {@code userId} attribute * @param currentState The value for the {@code currentState} attribute * @param targetState The value for the {@code targetState} attribute * @param stepsDone The value for the {@code stepsDone} attribute * @param statusMessage The value for the {@code statusMessage} attribute * @param id The value for the {@code id} attribute * @param version The value for the {@code version} attribute * @param createdAt The value for the {@code createdAt} attribute * @param updatedAt The value for the {@code updatedAt} attribute * @return An immutable IntegrationDeploymentOverview instance */ public static IntegrationDeploymentOverview of(Optional<String> userId, IntegrationDeploymentState currentState, IntegrationDeploymentState targetState, Map<String, ? extends String> stepsDone, Optional<String> statusMessage, Optional<String> id, int version, long createdAt, long updatedAt) { return validate(new ImmutableIntegrationDeploymentOverview(userId, currentState, targetState, stepsDone, statusMessage, id, version, createdAt, updatedAt)); }
/** * Copy the current immutable object by setting a value for the {@link IntegrationDeploymentOverview#getCreatedAt() createdAt} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for createdAt * @return A modified copy of the {@code this} object */ public final ImmutableIntegrationDeploymentOverview withCreatedAt(long value) { if (this.createdAt == value) return this; return validate(new ImmutableIntegrationDeploymentOverview( this, this.userId, this.currentState, this.targetState, this.stepsDone, this.statusMessage, this.id, this.version, value, this.updatedAt)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link IntegrationDeploymentOverview#getStatusMessage() statusMessage} attribute. * @param value The value for statusMessage * @return A modified copy of {@code this} object */ public final ImmutableIntegrationDeploymentOverview withStatusMessage(String value) { @Nullable String newValue = Objects.requireNonNull(value, "statusMessage"); if (Objects.equals(this.statusMessage, newValue)) return this; return validate(new ImmutableIntegrationDeploymentOverview( this, this.userId, this.currentState, this.targetState, this.stepsDone, newValue, this.id, this.version, this.createdAt, this.updatedAt)); }
/** * Copy the current immutable object by setting a value for the {@link IntegrationDeploymentOverview#getUpdatedAt() updatedAt} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for updatedAt * @return A modified copy of the {@code this} object */ public final ImmutableIntegrationDeploymentOverview withUpdatedAt(long value) { if (this.updatedAt == value) return this; return validate(new ImmutableIntegrationDeploymentOverview( this, this.userId, this.currentState, this.targetState, this.stepsDone, this.statusMessage, this.id, this.version, this.createdAt, value)); }
/** * Copy the current immutable object by setting an optional value for the {@link IntegrationDeploymentOverview#getUserId() userId} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for userId * @return A modified copy of {@code this} object */ public final ImmutableIntegrationDeploymentOverview withUserId(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.userId, value)) return this; return validate(new ImmutableIntegrationDeploymentOverview( this, value, this.currentState, this.targetState, this.stepsDone, this.statusMessage, this.id, this.version, this.createdAt, this.updatedAt)); }
/** * Copy the current immutable object by setting a value for the {@link IntegrationDeploymentOverview#getCurrentState() currentState} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for currentState * @return A modified copy of the {@code this} object */ public final ImmutableIntegrationDeploymentOverview withCurrentState(IntegrationDeploymentState value) { if (this.currentState == value) return this; IntegrationDeploymentState newValue = Objects.requireNonNull(value, "currentState"); return validate(new ImmutableIntegrationDeploymentOverview( this, this.userId, newValue, this.targetState, this.stepsDone, this.statusMessage, this.id, this.version, this.createdAt, this.updatedAt)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link IntegrationDeploymentOverview#getUserId() userId} attribute. * @param value The value for userId * @return A modified copy of {@code this} object */ public final ImmutableIntegrationDeploymentOverview withUserId(String value) { @Nullable String newValue = Objects.requireNonNull(value, "userId"); if (Objects.equals(this.userId, newValue)) return this; return validate(new ImmutableIntegrationDeploymentOverview( this, newValue, this.currentState, this.targetState, this.stepsDone, this.statusMessage, this.id, this.version, this.createdAt, this.updatedAt)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link IntegrationDeploymentOverview#getId() id} attribute. * @param value The value for id * @return A modified copy of {@code this} object */ public final ImmutableIntegrationDeploymentOverview withId(String value) { @Nullable String newValue = Objects.requireNonNull(value, "id"); if (Objects.equals(this.id, newValue)) return this; return validate(new ImmutableIntegrationDeploymentOverview( this, this.userId, this.currentState, this.targetState, this.stepsDone, this.statusMessage, newValue, this.version, this.createdAt, this.updatedAt)); }
/** * Copy the current immutable object by setting a value for the {@link IntegrationDeploymentOverview#getVersion() version} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for version * @return A modified copy of the {@code this} object */ public final ImmutableIntegrationDeploymentOverview withVersion(int value) { if (this.version == value) return this; return validate(new ImmutableIntegrationDeploymentOverview( this, this.userId, this.currentState, this.targetState, this.stepsDone, this.statusMessage, this.id, value, this.createdAt, this.updatedAt)); }
/** * Copy the current immutable object by setting a value for the {@link IntegrationDeploymentOverview#getTargetState() targetState} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for targetState * @return A modified copy of the {@code this} object */ public final ImmutableIntegrationDeploymentOverview withTargetState(IntegrationDeploymentState value) { if (this.targetState == value) return this; IntegrationDeploymentState newValue = Objects.requireNonNull(value, "targetState"); return validate(new ImmutableIntegrationDeploymentOverview( this, this.userId, this.currentState, newValue, this.stepsDone, this.statusMessage, this.id, this.version, this.createdAt, this.updatedAt)); }
/** * Copy the current immutable object by setting an optional value for the {@link IntegrationDeploymentOverview#getStatusMessage() statusMessage} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for statusMessage * @return A modified copy of {@code this} object */ public final ImmutableIntegrationDeploymentOverview withStatusMessage(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.statusMessage, value)) return this; return validate(new ImmutableIntegrationDeploymentOverview( this, this.userId, this.currentState, this.targetState, this.stepsDone, value, this.id, this.version, this.createdAt, this.updatedAt)); }
/** * Copy the current immutable object by setting an optional value for the {@link IntegrationDeploymentOverview#getId() id} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for id * @return A modified copy of {@code this} object */ public final ImmutableIntegrationDeploymentOverview withId(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.id, value)) return this; return validate(new ImmutableIntegrationDeploymentOverview( this, this.userId, this.currentState, this.targetState, this.stepsDone, this.statusMessage, value, this.version, this.createdAt, this.updatedAt)); }
/** * Copy the current immutable object by replacing the {@link IntegrationDeploymentOverview#getStepsDone() stepsDone} map with the specified map. * Nulls are not permitted as keys or values. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param entries The entries to be added to the stepsDone map * @return A modified copy of {@code this} object */ public final ImmutableIntegrationDeploymentOverview withStepsDone(Map<String, ? extends String> entries) { if (this.stepsDone == entries) return this; Map<String, String> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableIntegrationDeploymentOverview( this, this.userId, this.currentState, this.targetState, newValue, this.statusMessage, this.id, this.version, this.createdAt, this.updatedAt)); }