/** * Builds a new {@link IntegrationEndpoint IntegrationEndpoint}. * @return An immutable instance of IntegrationEndpoint * @throws java.lang.IllegalStateException if any required attributes are missing */ public IntegrationEndpoint build() { return ImmutableIntegrationEndpoint.validate(new ImmutableIntegrationEndpoint(null, protocol, host, contextPath, id)); } }
/** * Copy the current immutable object by setting an optional value for the {@link IntegrationEndpoint#getHost() host} 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 host * @return A modified copy of {@code this} object */ public final ImmutableIntegrationEndpoint withHost(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.host, value)) return this; return validate(new ImmutableIntegrationEndpoint(this, this.protocol, value, this.contextPath, this.id)); }
/** * Copy the current immutable object by setting an optional value for the {@link IntegrationEndpoint#getContextPath() contextPath} 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 contextPath * @return A modified copy of {@code this} object */ public final ImmutableIntegrationEndpoint withContextPath(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.contextPath, value)) return this; return validate(new ImmutableIntegrationEndpoint(this, this.protocol, this.host, value, this.id)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link IntegrationEndpoint#getHost() host} attribute. * @param value The value for host * @return A modified copy of {@code this} object */ public final ImmutableIntegrationEndpoint withHost(String value) { @Nullable String newValue = Objects.requireNonNull(value, "host"); if (Objects.equals(this.host, newValue)) return this; return validate(new ImmutableIntegrationEndpoint(this, this.protocol, newValue, this.contextPath, this.id)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link IntegrationEndpoint#getContextPath() contextPath} attribute. * @param value The value for contextPath * @return A modified copy of {@code this} object */ public final ImmutableIntegrationEndpoint withContextPath(String value) { @Nullable String newValue = Objects.requireNonNull(value, "contextPath"); if (Objects.equals(this.contextPath, newValue)) return this; return validate(new ImmutableIntegrationEndpoint(this, this.protocol, this.host, newValue, this.id)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link IntegrationEndpoint#getProtocol() protocol} attribute. * @param value The value for protocol * @return A modified copy of {@code this} object */ public final ImmutableIntegrationEndpoint withProtocol(String value) { @Nullable String newValue = Objects.requireNonNull(value, "protocol"); if (Objects.equals(this.protocol, newValue)) return this; return validate(new ImmutableIntegrationEndpoint(this, newValue, this.host, this.contextPath, this.id)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link IntegrationEndpoint#getId() id} attribute. * @param value The value for id * @return A modified copy of {@code this} object */ public final ImmutableIntegrationEndpoint withId(String value) { @Nullable String newValue = Objects.requireNonNull(value, "id"); if (Objects.equals(this.id, newValue)) return this; return validate(new ImmutableIntegrationEndpoint(this, this.protocol, this.host, this.contextPath, newValue)); }
/** * Construct a new immutable {@code IntegrationEndpoint} instance. * @param protocol The value for the {@code protocol} attribute * @param host The value for the {@code host} attribute * @param contextPath The value for the {@code contextPath} attribute * @param id The value for the {@code id} attribute * @return An immutable IntegrationEndpoint instance */ public static IntegrationEndpoint of(Optional<String> protocol, Optional<String> host, Optional<String> contextPath, Optional<String> id) { return validate(new ImmutableIntegrationEndpoint(protocol, host, contextPath, id)); }
/** * Copy the current immutable object by setting an optional value for the {@link IntegrationEndpoint#getProtocol() protocol} 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 protocol * @return A modified copy of {@code this} object */ public final ImmutableIntegrationEndpoint withProtocol(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.protocol, value)) return this; return validate(new ImmutableIntegrationEndpoint(this, value, this.host, this.contextPath, this.id)); }
/** * Copy the current immutable object by setting an optional value for the {@link IntegrationEndpoint#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 ImmutableIntegrationEndpoint withId(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.id, value)) return this; return validate(new ImmutableIntegrationEndpoint(this, this.protocol, this.host, this.contextPath, value)); }