/** * Copy the current immutable object with elements that replace the content of {@link PostTextRequest#getValidators() validators}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withValidators(Validator... elements) { ImmutableList<Validator> newValue = ImmutableList.copyOf(elements); return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, this.httpMethod, this.parameters, this.extractors, newValue, this.headers, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object with elements that replace the content of {@link PostTextRequest#getHeaders() headers}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withHeaders(Header... elements) { ImmutableList<Header> newValue = ImmutableList.copyOf(elements); return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, this.httpMethod, this.parameters, this.extractors, this.validators, newValue, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object with elements that replace the content of {@link PostTextRequest#getPostParameters() postParameters}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of postParameters elements to set * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withPostParameters(Iterable<? extends Parameter> elements) { if (this.postParameters == elements) return this; ImmutableList<Parameter> newValue = ImmutableList.copyOf(elements); return new ImmutablePostTextRequest( this.data, newValue, this.path, this.server, this.httpMethod, this.parameters, this.extractors, this.validators, this.headers, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object with elements that replace the content of {@link PostTextRequest#getValidators() validators}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of validators elements to set * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withValidators(Iterable<? extends Validator> elements) { if (this.validators == elements) return this; ImmutableList<Validator> newValue = ImmutableList.copyOf(elements); return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, this.httpMethod, this.parameters, this.extractors, newValue, this.headers, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object by setting a value for the {@link PostTextRequest#getHttpMethod() httpMethod} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for httpMethod * @return A modified copy of the {@code this} object */ public final ImmutablePostTextRequest withHttpMethod(Request.HttpMethod value) { if (this.httpMethod == value) return this; Request.HttpMethod newValue = Objects.requireNonNull(value, "httpMethod"); return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, newValue, this.parameters, this.extractors, this.validators, this.headers, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object with elements that replace the content of {@link PostTextRequest#getParameters() parameters}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of parameters elements to set * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withParameters(Iterable<? extends Parameter> elements) { if (this.parameters == elements) return this; ImmutableList<Parameter> newValue = ImmutableList.copyOf(elements); return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, this.httpMethod, newValue, this.extractors, this.validators, this.headers, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object with elements that replace the content of {@link PostTextRequest#getHeaders() headers}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of headers elements to set * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withHeaders(Iterable<? extends Header> elements) { if (this.headers == elements) return this; ImmutableList<Header> newValue = ImmutableList.copyOf(elements); return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, this.httpMethod, this.parameters, this.extractors, this.validators, newValue, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object with elements that replace the content of {@link PostTextRequest#getPostParameters() postParameters}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withPostParameters(Parameter... elements) { ImmutableList<Parameter> newValue = ImmutableList.copyOf(elements); return new ImmutablePostTextRequest( this.data, newValue, this.path, this.server, this.httpMethod, this.parameters, this.extractors, this.validators, this.headers, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object with elements that replace the content of {@link PostTextRequest#getParameters() parameters}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withParameters(Parameter... elements) { ImmutableList<Parameter> newValue = ImmutableList.copyOf(elements); return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, this.httpMethod, newValue, this.extractors, this.validators, this.headers, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object with elements that replace the content of {@link PostTextRequest#getExtractors() extractors}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withExtractors(VariableExtractor... elements) { ImmutableList<VariableExtractor> newValue = ImmutableList.copyOf(elements); return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, this.httpMethod, this.parameters, newValue, this.validators, this.headers, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link PostTextRequest#getRecordedFiles() recordedFiles} attribute. * @param value The value for recordedFiles * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withRecordedFiles(RecordedFiles value) { @Nullable RecordedFiles newValue = Objects.requireNonNull(value, "recordedFiles"); if (this.recordedFiles == newValue) return this; return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, this.httpMethod, this.parameters, this.extractors, this.validators, this.headers, this.contentType, newValue, this.name, this.description); }
/** * Copy the current immutable object by setting a value for the {@link PostTextRequest#getName() name} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for name * @return A modified copy of the {@code this} object */ public final ImmutablePostTextRequest withName(String value) { if (this.name.equals(value)) return this; String newValue = Objects.requireNonNull(value, "name"); return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, this.httpMethod, this.parameters, this.extractors, this.validators, this.headers, this.contentType, this.recordedFiles, newValue, this.description); }
/** * Copy the current immutable object by setting a value for the {@link PostTextRequest#getData() data} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for data * @return A modified copy of the {@code this} object */ public final ImmutablePostTextRequest withData(String value) { if (this.data.equals(value)) return this; String newValue = Objects.requireNonNull(value, "data"); return new ImmutablePostTextRequest( newValue, this.postParameters, this.path, this.server, this.httpMethod, this.parameters, this.extractors, this.validators, this.headers, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object by setting an optional value for the {@link PostTextRequest#getServer() server} attribute. * A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning {@code this}. * @param optional A value for server * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withServer(Optional<? extends Server> optional) { @Nullable Server value = optional.orElse(null); if (this.server == value) return this; return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, value, this.httpMethod, this.parameters, this.extractors, this.validators, this.headers, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object by setting an optional value for the {@link PostTextRequest#getRecordedFiles() recordedFiles} attribute. * A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning {@code this}. * @param optional A value for recordedFiles * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withRecordedFiles(Optional<? extends RecordedFiles> optional) { @Nullable RecordedFiles value = optional.orElse(null); if (this.recordedFiles == value) return this; return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, this.httpMethod, this.parameters, this.extractors, this.validators, this.headers, this.contentType, value, this.name, this.description); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link PostTextRequest#getPath() path} attribute. * @param value The value for path * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withPath(String value) { @Nullable String newValue = Objects.requireNonNull(value, "path"); if (Objects.equals(this.path, newValue)) return this; return new ImmutablePostTextRequest( this.data, this.postParameters, newValue, this.server, this.httpMethod, this.parameters, this.extractors, this.validators, this.headers, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object by setting an optional value for the {@link PostTextRequest#getPath() path} 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 path * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withPath(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.path, value)) return this; return new ImmutablePostTextRequest( this.data, this.postParameters, value, this.server, this.httpMethod, this.parameters, this.extractors, this.validators, this.headers, this.contentType, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object by setting an optional value for the {@link PostTextRequest#getContentType() contentType} 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 contentType * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withContentType(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.contentType, value)) return this; return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, this.httpMethod, this.parameters, this.extractors, this.validators, this.headers, value, this.recordedFiles, this.name, this.description); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link PostTextRequest#getDescription() description} attribute. * @param value The value for description * @return A modified copy of {@code this} object */ public final ImmutablePostTextRequest withDescription(String value) { @Nullable String newValue = Objects.requireNonNull(value, "description"); if (Objects.equals(this.description, newValue)) return this; return new ImmutablePostTextRequest( this.data, this.postParameters, this.path, this.server, this.httpMethod, this.parameters, this.extractors, this.validators, this.headers, this.contentType, this.recordedFiles, this.name, newValue); }
/** * Builds a new {@link ImmutablePostTextRequest ImmutablePostTextRequest}. * @return An immutable instance of PostTextRequest * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutablePostTextRequest build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new ImmutablePostTextRequest( data, postParameters.build(), path, server, httpMethod, parameters.build(), extractors.build(), validators.build(), headers.build(), contentType, recordedFiles, name, description); }