public class FormPostBuilder implements BodyBuilder
Builder for constructing application/x-www-form-urlencoded bodies
@NotNull public static java.lang.String ROOT
public static au.com.dius.pact.consumer.dsl.FormPostBuilder.Companion Companion
public FormPostBuilder(@NotNull
java.util.Map<java.lang.String,java.util.List> body,
@NotNull
au.com.dius.pact.core.model.ContentType contentType,
@NotNull
au.com.dius.pact.core.model.matchingrules.Category matchers,
@NotNull
au.com.dius.pact.core.model.generators.Generators generators)
Builder for constructing application/x-www-form-urlencoded bodies
public FormPostBuilder()
Builder for constructing application/x-www-form-urlencoded bodies
public FormPostBuilder(@NotNull
au.com.dius.pact.core.model.ContentType contentType)
@NotNull public FormPostBuilder stringValue(@NotNull java.lang.String name, @NotNull java.lang.String value)
Attribute that must be have the specified value
name - attribute namevalue - string value@NotNull public FormPostBuilder stringValue(@NotNull java.lang.String name, @NotNull java.lang.String... values)
Attribute that must be have the specified values
name - attribute namevalues - string values@NotNull public FormPostBuilder stringMatcher(@NotNull java.lang.String name, @NotNull java.lang.String regex, @NotNull java.lang.String value)
Attribute that must match the regular expression
name - attribute nameregex - regular expressionvalue - example value to use for generated bodies@NotNull public FormPostBuilder stringMatcher(@NotNull java.lang.String name, @NotNull java.lang.String regex, @NotNull java.lang.String... values)
Attribute that must match the regular expression
name - attribute nameregex - regular expressionvalues - example values to use for generated bodies@NotNull public FormPostBuilder stringMatcher(@NotNull java.lang.String name, @NotNull java.lang.String regex)
Attribute that must match the regular expression
name - attribute nameregex - regular expression@NotNull public FormPostBuilder datetime(@NotNull java.lang.String name)
Attribute that must be an ISO formatted datetime
name - @NotNull public FormPostBuilder datetime(@NotNull java.lang.String name, @NotNull java.lang.String format)
Attribute that must match the given datetime format
name - attribute nameformat - datetime format@NotNull public FormPostBuilder datetime(@NotNull java.lang.String name, @NotNull java.lang.String format, @NotNull java.util.Date example)
Attribute that must match the given datetime format
name - attribute nameformat - datetime formatexample - example date and time to use for generated bodies@NotNull public FormPostBuilder datetime(@NotNull java.lang.String name, @NotNull java.lang.String format, @NotNull java.util.Date example, @NotNull java.util.TimeZone timeZone)
Attribute that must match the given datetime format
name - attribute nameformat - datetime formatexample - example date and time to use for generated bodiestimeZone - time zone used for formatting of example date and time@NotNull public FormPostBuilder datetime(@NotNull java.lang.String name, @NotNull java.lang.String format, @NotNull java.time.Instant example)
Attribute that must match the given datetime format
name - attribute nameformat - datetime formatexample - example date and time to use for generated bodies@NotNull public FormPostBuilder datetime(@NotNull java.lang.String name, @NotNull java.lang.String format, @NotNull java.time.Instant example, @NotNull java.util.TimeZone timeZone)
Attribute that must match the given datetime format
name - attribute nameformat - timestamp formatexample - example date and time to use for generated bodiestimeZone - time zone used for formatting of example date and time@NotNull public FormPostBuilder date(@NotNull java.lang.String name)
Attribute that must be formatted as an ISO date
name - attribute name@NotNull public FormPostBuilder date(@NotNull java.lang.String name, @NotNull java.lang.String format)
Attribute that must match the provided date format
name - attribute dateformat - date format to match@NotNull public FormPostBuilder date(@NotNull java.lang.String name, @NotNull java.lang.String format, @NotNull java.util.Date example)
Attribute that must match the provided date format
name - attribute dateformat - date format to matchexample - example date to use for generated values@NotNull public FormPostBuilder date(@NotNull java.lang.String name, @NotNull java.lang.String format, @NotNull java.util.Date example, @NotNull java.util.TimeZone timeZone)
Attribute that must match the provided date format
name - attribute dateformat - date format to matchexample - example date to use for generated valuestimeZone - time zone used for formatting of example date@NotNull public FormPostBuilder time(@NotNull java.lang.String name)
Attribute that must be an ISO formatted time
name - attribute name@NotNull public FormPostBuilder time(@NotNull java.lang.String name, @NotNull java.lang.String format)
Attribute that must match the given time format
name - attribute nameformat - time format to match@NotNull public FormPostBuilder time(@NotNull java.lang.String name, @NotNull java.lang.String format, @NotNull java.util.Date example)
Attribute that must match the given time format
name - attribute nameformat - time format to matchexample - example time to use for generated bodies@NotNull public FormPostBuilder time(@NotNull java.lang.String name, @NotNull java.lang.String format, @NotNull java.util.Date example, @NotNull java.util.TimeZone timeZone)
Attribute that must match the given time format
name - attribute nameformat - time format to matchexample - example time to use for generated bodiestimeZone - time zone used for formatting of example time@NotNull public FormPostBuilder hexValue(@NotNull java.lang.String name)
Attribute that must be encoded as a hexadecimal value
name - attribute name@NotNull public FormPostBuilder hexValue(@NotNull java.lang.String name, @NotNull java.lang.String hexValue)
Attribute that must be encoded as a hexadecimal value
name - attribute namehexValue - example value to use for generated bodies@NotNull public FormPostBuilder uuid(@NotNull java.lang.String name)
Attribute that must be encoded as an UUID
name - attribute name@NotNull public FormPostBuilder uuid(@NotNull java.lang.String name, @NotNull java.util.UUID uuid)
Attribute that must be encoded as an UUID
name - attribute nameuuid - example UUID to use for generated bodies@NotNull public FormPostBuilder uuid(@NotNull java.lang.String name, @NotNull java.lang.String uuid)
Attribute that must be encoded as an UUID
name - attribute nameuuid - example UUID to use for generated bodies@NotNull public FormPostBuilder includesString(@NotNull java.lang.String name, @NotNull java.lang.String value)
Attribute that must include the provided string value
name - attribute namevalue - Value that must be included@NotNull public FormPostBuilder parameterFromProviderState(@NotNull java.lang.String name, @NotNull java.lang.String expression, @NotNull java.lang.String example)
Adds an attribute that will have it's value injected from the provider state
name - Attribute nameexpression - Expression to be evaluated from the provider stateexample - Example value to be used in the consumer test@NotNull public FormPostBuilder dateExpression(@NotNull java.lang.String name, @NotNull java.lang.String expression)
Adds a date attribute formatted as an ISO date with the value generated by the date expression
name - Attribute nameexpression - Date expression to use to generate the values@NotNull public FormPostBuilder dateExpression(@NotNull java.lang.String name, @NotNull java.lang.String expression, @NotNull java.lang.String format)
Adds a date attribute with the value generated by the date expression
name - Attribute nameexpression - Date expression to use to generate the valuesformat - Date format to use@NotNull public FormPostBuilder timeExpression(@NotNull java.lang.String name, @NotNull java.lang.String expression)
Adds a time attribute formatted as an ISO time with the value generated by the time expression
name - Attribute nameexpression - Time expression to use to generate the values@NotNull public FormPostBuilder timeExpression(@NotNull java.lang.String name, @NotNull java.lang.String expression, @NotNull java.lang.String format)
Adds a time attribute with the value generated by the time expression
name - Attribute nameexpression - Time expression to use to generate the valuesformat - Time format to use@NotNull public FormPostBuilder datetimeExpression(@NotNull java.lang.String name, @NotNull java.lang.String expression)
Adds a datetime attribute formatted as an ISO datetime with the value generated by the expression
name - Attribute nameexpression - Datetime expression to use to generate the values@NotNull public FormPostBuilder datetimeExpression(@NotNull java.lang.String name, @NotNull java.lang.String expression, @NotNull java.lang.String format)
Adds a datetime attribute with the value generated by the expression
name - Attribute nameexpression - Datetime expression to use to generate the valuesformat - Datetime format to use@NotNull public au.com.dius.pact.core.model.matchingrules.Category getMatchers()
@NotNull public au.com.dius.pact.core.model.generators.Generators getGenerators()
@NotNull public au.com.dius.pact.core.model.ContentType getContentType()
@NotNull public kotlin.Array[] buildBody()
@NotNull public java.util.Map<java.lang.String,java.util.List> getBody()