public class LambdaDslObject
public au.com.dius.pact.consumer.dsl.PactDslJsonBody getPactDslObject()
public LambdaDslObject stringValue(java.lang.String name, java.lang.String value)
public LambdaDslObject stringType(java.lang.String name, java.lang.String example)
public LambdaDslObject stringType(java.lang.String name)
public LambdaDslObject stringType(java.lang.String... names)
public LambdaDslObject stringMatcher(java.lang.String name, java.lang.String example)
public LambdaDslObject stringMatcher(java.lang.String name, java.lang.String regex, java.lang.String value)
public LambdaDslObject numberValue(java.lang.String name, java.lang.Number value)
public LambdaDslObject numberType(java.lang.String name, java.lang.Number example)
public LambdaDslObject numberType(java.lang.String... names)
public LambdaDslObject decimalType(java.lang.String name, java.math.BigDecimal value)
public LambdaDslObject decimalType(java.lang.String name, java.lang.Double example)
public LambdaDslObject decimalType(java.lang.String... names)
public LambdaDslObject booleanValue(java.lang.String name, java.lang.Boolean value)
public LambdaDslObject booleanType(java.lang.String name, java.lang.Boolean example)
public LambdaDslObject booleanType(java.lang.String... names)
public LambdaDslObject id()
public LambdaDslObject id(java.lang.String name)
public LambdaDslObject id(java.lang.String name, java.lang.Long id)
public LambdaDslObject uuid(java.lang.String name)
public LambdaDslObject uuid(java.lang.String name, java.util.UUID id)
public LambdaDslObject date()
Attribute named 'date' that must be formatted as an ISO date
public LambdaDslObject date(java.lang.String name)
Attribute that must be formatted as an ISO date
name - attribute namepublic LambdaDslObject date(java.lang.String name, java.lang.String format)
Attribute that must match the provided date format
name - attribute dateformat - date format to matchpublic LambdaDslObject date(java.lang.String name, java.lang.String format, 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 valuespublic LambdaDslObject date(java.lang.String name, java.lang.String format, java.util.Date example, 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 datepublic LambdaDslObject date(java.lang.String name, java.lang.String format, java.time.ZonedDateTime example)
Attribute that must match the provided date format
name - attribute dateformat - date format to matchexample - example date to use for generated valuespublic LambdaDslObject time()
Attribute named 'time' that must be an ISO formatted time
public LambdaDslObject time(java.lang.String name)
Attribute that must be an ISO formatted time
name - attribute namepublic LambdaDslObject time(java.lang.String name, java.lang.String format)
Attribute that must match the provided time format
name - attribute timeformat - time format to matchpublic LambdaDslObject time(java.lang.String name, java.lang.String format, java.util.Date example)
Attribute that must match the provided time format
name - attribute nameformat - time format to matchexample - example time to use for generated valuespublic LambdaDslObject time(java.lang.String name, java.lang.String format, java.util.Date example, java.util.TimeZone timeZone)
Attribute that must match the provided time format
name - attribute nameformat - time format to matchexample - example time to use for generated valuestimeZone - time zone used for formatting of example timepublic LambdaDslObject time(java.lang.String name, java.lang.String format, java.time.ZonedDateTime example)
Attribute that must match the provided time format
name - attribute nameformat - time format to matchexample - example time to use for generated valuespublic LambdaDslObject timestamp()
Attribute named 'timestamp' that must be an ISO formatted timestamp
public LambdaDslObject timestamp(java.lang.String name)
Attribute that must be an ISO formatted timestamp
name - attribute namepublic LambdaDslObject timestamp(java.lang.String name, java.lang.String format)
Attribute that must match the given timestamp format
name - attribute nameformat - timestamp formatpublic LambdaDslObject timestamp(java.lang.String name, java.lang.String format, java.util.Date example)
Attribute that must match the given timestamp format
name - attribute nameformat - timestamp formatexample - example date and time to use for generated bodiespublic LambdaDslObject timestamp(java.lang.String name, java.lang.String format, java.time.Instant example)
Attribute that must match the given timestamp format
name - attribute nameformat - timestamp formatexample - example date and time to use for generated bodiespublic LambdaDslObject timestamp(java.lang.String name, java.lang.String format, java.util.Date example, java.util.TimeZone timeZone)
Attribute that must match the given timestamp format
name - attribute nameformat - timestamp formatexample - example date and time to use for generated bodiestimeZone - time zone used for formatting of example date and timepublic LambdaDslObject timestamp(java.lang.String name, java.lang.String format, java.time.ZonedDateTime example)
Attribute that must match the given timestamp format
name - attribute nameformat - timestamp formatexample - example date and time to use for generated bodiespublic LambdaDslObject ipV4Address(java.lang.String name)
Attribute that must be an IP4 address
name - attribute namepublic LambdaDslObject and(java.lang.String name, java.lang.Object value, au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)
Combine all the matchers using AND
name - Attribute namevalue - Attribute example valuerules - Matching rules to applypublic LambdaDslObject or(java.lang.String name, java.lang.Object value, au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)
Combine all the matchers using OR
name - Attribute namevalue - Attribute example valuerules - Matching rules to applypublic LambdaDslObject array(java.lang.String name, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslJsonArray> array)
public LambdaDslObject object(java.lang.String name, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslObject> nestedObject)
public LambdaDslObject eachLike(java.lang.String name, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslObject> nestedObject)
Attribute that is an array where each item must match the following example
name - field namepublic LambdaDslObject eachLike(java.lang.String name, int numberExamples, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslObject> nestedObject)
Attribute that is an array where each item must match the following example
name - field namenumberExamples - number of examples to generatepublic LambdaDslObject eachLike(java.lang.String name, au.com.dius.pact.consumer.dsl.PactDslJsonRootValue value)
Attribute that is an array where each item is a primitive that must match the provided value
name - field namevalue - Value that each item in the array must matchpublic LambdaDslObject eachLike(java.lang.String name, au.com.dius.pact.consumer.dsl.PactDslJsonRootValue value, int numberExamples)
Attribute that is an array where each item is a primitive that must match the provided value
name - field namevalue - Value that each item in the array must matchnumberExamples - Number of examples to generatepublic LambdaDslObject minArrayLike(java.lang.String name, java.lang.Integer size, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslObject> nestedObject)
Attribute that is an array with a minimum size where each item must match the following example
name - field namesize - minimum size of the arraypublic LambdaDslObject minArrayLike(java.lang.String name, java.lang.Integer size, int numberExamples, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslObject> nestedObject)
Attribute that is an array with a minimum size where each item must match the following example
name - field namesize - minimum size of the arraynumberExamples - number of examples to generatepublic LambdaDslObject minArrayLike(java.lang.String name, java.lang.Integer size, au.com.dius.pact.consumer.dsl.PactDslJsonRootValue value, int numberExamples)
Attribute that is an array of values with a minimum size that are not objects where each item must match the following example
name - field namesize - minimum size of the arrayvalue - Value to use to match each itemnumberExamples - number of examples to generatepublic LambdaDslObject maxArrayLike(java.lang.String name, java.lang.Integer size, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslObject> nestedObject)
Attribute that is an array with a maximum size where each item must match the following example
name - field namesize - maximum size of the arraypublic LambdaDslObject maxArrayLike(java.lang.String name, java.lang.Integer size, int numberExamples, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslObject> nestedObject)
Attribute that is an array with a maximum size where each item must match the following example
name - field namesize - maximum size of the arraynumberExamples - number of examples to generatepublic LambdaDslObject maxArrayLike(java.lang.String name, java.lang.Integer size, au.com.dius.pact.consumer.dsl.PactDslJsonRootValue value, int numberExamples)
Attribute that is an array of values with a maximum size that are not objects where each item must match the following example
name - field namesize - maximum size of the arrayvalue - Value to use to match each itemnumberExamples - number of examples to generatepublic LambdaDslObject minMaxArrayLike(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslObject> nestedObject)
Attribute that is an array with a minimum and maximum size where each item must match the following example
name - field nameminSize - minimum size of the arraymaxSize - maximum size of the arraypublic LambdaDslObject minMaxArrayLike(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize, int numberExamples, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslObject> nestedObject)
Attribute that is an array with a minimum and maximum size where each item must match the following example
name - field nameminSize - minimum size of the arraymaxSize - maximum size of the arraynumberExamples - number of examples to generatepublic LambdaDslObject minMaxArrayLike(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize, au.com.dius.pact.consumer.dsl.PactDslJsonRootValue value, int numberExamples)
Attribute that is an array of values with a minimum and maximum size that are not objects where each item must match the following example
name - field nameminSize - minimum size of the arraymaxSize - maximum size of the arrayvalue - Value to use to match each itemnumberExamples - number of examples to generatepublic LambdaDslObject nullValue(java.lang.String fieldName)
Sets the field to a null value
fieldName - field namepublic LambdaDslObject eachArrayLike(java.lang.String name, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslJsonArray> nestedArray)
public LambdaDslObject eachArrayLike(java.lang.String name, int numberExamples, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslJsonArray> nestedArray)
public LambdaDslObject eachArrayWithMaxLike(java.lang.String name, java.lang.Integer size, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslJsonArray> nestedArray)
public LambdaDslObject eachArrayWithMaxLike(java.lang.String name, int numberExamples, java.lang.Integer size, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslJsonArray> nestedArray)
public LambdaDslObject eachArrayWithMinLike(java.lang.String name, java.lang.Integer size, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslJsonArray> nestedArray)
public LambdaDslObject eachArrayWithMinLike(java.lang.String name, int numberExamples, java.lang.Integer size, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslJsonArray> nestedArray)
public LambdaDslObject eachArrayWithMinMaxLike(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslJsonArray> nestedArray)
public LambdaDslObject eachArrayWithMinMaxLike(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize, int numberExamples, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslJsonArray> nestedArray)
public LambdaDslObject eachKeyMappedToAnArrayLike(java.lang.String exampleKey, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslObject> nestedObject)
Accepts any key, and each key is mapped to a list of items that must match the following object definition. Note: this needs the Java system property "pact.matching.wildcard" set to value "true" when the pact file is verified.
exampleKey - Example key to use for generating bodiespublic LambdaDslObject eachKeyLike(java.lang.String exampleKey, java.util.function.Consumer<io.pactfoundation.consumer.dsl.LambdaDslObject> nestedObject)
Accepts any key, and each key is mapped to a map that must match the following object definition. Note: this needs the Java system property "pact.matching.wildcard" set to value "true" when the pact file is verified.
exampleKey - Example key to use for generating bodiespublic LambdaDslObject eachKeyLike(java.lang.String exampleKey, au.com.dius.pact.consumer.dsl.PactDslJsonRootValue value)
Accepts any key, and each key is mapped to a map that must match the provided object definition Note: this needs the Java system property "pact.matching.wildcard" set to value "true" when the pact file is verified.
exampleKey - Example key to use for generating bodiesvalue - Value to use for matching and generated bodiespublic LambdaDslObject dateExpression(java.lang.String name, java.lang.String expression)
Attribute whose values are generated from the provided expression. Will use an ISO format.
name - Attribute nameexpression - Date expressionpublic LambdaDslObject dateExpression(java.lang.String name, java.lang.String expression, java.lang.String format)
Attribute whose values are generated from the provided expression
name - Attribute nameexpression - Date expressionformat - Date format to use for valuespublic LambdaDslObject timeExpression(java.lang.String name, java.lang.String expression)
Attribute whose values are generated from the provided expression. Will use an ISO format.
name - Attribute nameexpression - Time expressionpublic LambdaDslObject timeExpression(java.lang.String name, java.lang.String expression, java.lang.String format)
Attribute whose values are generated from the provided expression
name - Attribute nameexpression - Time expressionformat - Time format to use for valuespublic LambdaDslObject datetimeExpression(java.lang.String name, java.lang.String expression)
Attribute whose values are generated from the provided expression. Will use an ISO format.
name - Attribute nameexpression - Datetime expressionpublic LambdaDslObject datetimeExpression(java.lang.String name, java.lang.String expression, java.lang.String format)
Attribute whose values are generated from the provided expression
name - Attribute nameexpression - Datetime expressionformat - Datetime format to use for values