Package au.com.dius.pact.consumer.dsl
Class LambdaDslJsonArray
- java.lang.Object
-
- au.com.dius.pact.consumer.dsl.LambdaDslJsonArray
-
public class LambdaDslJsonArray extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description LambdaDslJsonArrayand(java.lang.Object value, au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)Combine all the matchers using ANDLambdaDslJsonArrayarray(java.util.function.Consumer<LambdaDslJsonArray> a)Element that is a JSON arrayLambdaDslJsonArraybooleanType(java.lang.Boolean example)Element that must be a booleanLambdaDslJsonArraybooleanValue(java.lang.Boolean value)Element that must be the specified valueau.com.dius.pact.consumer.dsl.DslPartbuild()LambdaDslJsonArraydate()Element that must be formatted as an ISO dateLambdaDslJsonArraydate(java.lang.String format)Element that must match the provided date formatLambdaDslJsonArraydate(java.lang.String format, java.util.Date example)Element that must match the provided date formatLambdaDslJsonArraydateExpression(java.lang.String expression)Date value generated from the provided expression.LambdaDslJsonArraydateExpression(java.lang.String expression, java.lang.String format)Date value generated from the provided expressionLambdaDslJsonArraydatetimeExpression(java.lang.String expression)Datetime generated from the provided expression.LambdaDslJsonArraydatetimeExpression(java.lang.String expression, java.lang.String format)Datetime generated from the provided expressionLambdaDslJsonArraydecimalType()Element that must be a decimal valueLambdaDslJsonArraydecimalType(java.lang.Double example)Attribute that must be a decimalType valueLambdaDslJsonArraydecimalType(java.math.BigDecimal example)Element that must be a decimalType valueLambdaDslJsonArrayeachArrayLike(int numberExamples, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following objectLambdaDslJsonArrayeachArrayLike(java.util.function.Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following objectLambdaDslJsonArrayeachArrayWithMaxLike(int numberExamples, java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following objectLambdaDslJsonArrayeachArrayWithMaxLike(java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following object.LambdaDslJsonArrayeachArrayWithMinLike(int numberExamples, java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following objectLambdaDslJsonArrayeachArrayWithMinLike(java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following object.LambdaDslJsonArrayeachArrayWithMinMaxLike(java.lang.Integer minSize, java.lang.Integer maxSize, int numberExamples, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following objectLambdaDslJsonArrayeachArrayWithMinMaxLike(java.lang.Integer minSize, java.lang.Integer maxSize, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)Array element where each element of the array is an array and must match the following object.LambdaDslJsonArrayeachLike(int numberExamples, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)Element that is an array where each item must match the following exampleLambdaDslJsonArrayeachLike(au.com.dius.pact.consumer.dsl.PactDslJsonRootValue value)Element that is an array where each item must match the following exampleLambdaDslJsonArrayeachLike(au.com.dius.pact.consumer.dsl.PactDslJsonRootValue value, int numberExamples)Element that is an array where each item must match the following exampleLambdaDslJsonArrayeachLike(java.util.function.Consumer<LambdaDslJsonBody> nestedObject)Element that is an array where each item must match the following exampleau.com.dius.pact.consumer.dsl.PactDslJsonArraygetPactDslJsonArray()Get the rawPactDslJsonArraywhich is abstracted withPactDslJsonArrayLambdaDslJsonArrayhexValue()Element that must be encoded as a hexadecimal valueLambdaDslJsonArrayhexValue(java.lang.String example)Element that must be encoded as a hexadecimal valueLambdaDslJsonArrayid()Element that must be a numeric identifierLambdaDslJsonArrayid(java.lang.Long example)Element that must be a numeric identifierLambdaDslJsonArrayintegerType()Element that must be an integerLambdaDslJsonArrayintegerType(java.lang.Long example)Element that must be an integerLambdaDslJsonArrayipV4Address()Element that must be an IP4 addressLambdaDslJsonArraymaxArrayLike(java.lang.Integer size, int numberExamples, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)Element that is an array with a maximum size where each item must match the following exampleLambdaDslJsonArraymaxArrayLike(java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)Element that is an array with a maximum size where each item must match the following exampleLambdaDslJsonArrayminArrayLike(java.lang.Integer size, int numberExamples, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)Element that is an array with a minimum size where each item must match the following exampleLambdaDslJsonArrayminArrayLike(java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)Element that is an array with a minimum size where each item must match the following exampleLambdaDslJsonArrayminMaxArrayLike(java.lang.Integer minSize, java.lang.Integer maxSize, int numberExamples, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)Element that is an array with a minimum and maximum size where each item must match the following exampleLambdaDslJsonArrayminMaxArrayLike(java.lang.Integer minSize, java.lang.Integer maxSize, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)Element that is an array with a minimum and maximum size where each item must match the following exampleLambdaDslJsonArraynullValue()Adds a null value to the listLambdaDslJsonArraynumberType(java.lang.Number example)Element that can be any numberLambdaDslJsonArraynumberValue(java.lang.Number value)Element that must be the specified numberLambdaDslJsonArrayobject(java.util.function.Consumer<LambdaDslObject> o)Element that is a JSON objectLambdaDslJsonArrayor(java.lang.Object value, au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)Combine all the matchers using ORLambdaDslJsonArraystringMatcher(java.lang.String regex, java.lang.String example)Element that must match the regular expressionLambdaDslJsonArraystringType(java.lang.String example)Element that can be any stringLambdaDslJsonArraystringValue(java.lang.String value)Element that must be the specified valueLambdaDslJsonArraytime()Element that must be an ISO formatted timeLambdaDslJsonArraytime(java.lang.String format)Element that must match the given time formatLambdaDslJsonArraytime(java.lang.String format, java.util.Date example)Element that must match the given time formatLambdaDslJsonArraytimeExpression(java.lang.String expression)Time value generated from the provided expression.LambdaDslJsonArraytimeExpression(java.lang.String expression, java.lang.String format)Time value generated from the provided expressionLambdaDslJsonArraytimestamp()Deprecated.Use datetimeLambdaDslJsonArraytimestamp(java.lang.String format)Deprecated.Use datetimeLambdaDslJsonArraytimestamp(java.lang.String format, java.time.Instant example)Deprecated.Use datetimeLambdaDslJsonArraytimestamp(java.lang.String format, java.util.Date example)Deprecated.Use datetimeLambdaDslJsonArrayunorderedArray(java.util.function.Consumer<LambdaDslJsonArray> a)Array element where order is ignoredLambdaDslJsonArrayunorderedMaxArray(int size, java.util.function.Consumer<LambdaDslJsonArray> a)Array element of max size where order is ignoredLambdaDslJsonArrayunorderedMinArray(int size, java.util.function.Consumer<LambdaDslJsonArray> a)Array element of min size where order is ignoredLambdaDslJsonArrayunorderedMinMaxArray(int minSize, int maxSize, java.util.function.Consumer<LambdaDslJsonArray> a)Array element of min and max size where order is ignoredLambdaDslJsonArrayuuid()Element that must be encoded as an UUIDLambdaDslJsonArrayuuid(java.lang.String example)Element that must be encoded as an UUID
-
-
-
Method Detail
-
getPactDslJsonArray
public au.com.dius.pact.consumer.dsl.PactDslJsonArray getPactDslJsonArray()
Get the rawPactDslJsonArraywhich is abstracted withPactDslJsonArray
-
object
public LambdaDslJsonArray object(java.util.function.Consumer<LambdaDslObject> o)
Element that is a JSON object
-
array
public LambdaDslJsonArray array(java.util.function.Consumer<LambdaDslJsonArray> a)
Element that is a JSON array
-
unorderedArray
public LambdaDslJsonArray unorderedArray(java.util.function.Consumer<LambdaDslJsonArray> a)
Array element where order is ignored
-
unorderedMinArray
public LambdaDslJsonArray unorderedMinArray(int size, java.util.function.Consumer<LambdaDslJsonArray> a)
Array element of min size where order is ignored- Parameters:
size-
-
unorderedMaxArray
public LambdaDslJsonArray unorderedMaxArray(int size, java.util.function.Consumer<LambdaDslJsonArray> a)
Array element of max size where order is ignored- Parameters:
size-
-
unorderedMinMaxArray
public LambdaDslJsonArray unorderedMinMaxArray(int minSize, int maxSize, java.util.function.Consumer<LambdaDslJsonArray> a)
Array element of min and max size where order is ignored- Parameters:
minSize-maxSize-
-
stringValue
public LambdaDslJsonArray stringValue(java.lang.String value)
Element that must be the specified value- Parameters:
value- string value
-
stringType
public LambdaDslJsonArray stringType(java.lang.String example)
Element that can be any string- Parameters:
example- example value to use for generated bodies
-
stringMatcher
public LambdaDslJsonArray stringMatcher(java.lang.String regex, java.lang.String example)
Element that must match the regular expression- Parameters:
regex- regular expressionexample- example value to use for generated bodies
-
numberValue
public LambdaDslJsonArray numberValue(java.lang.Number value)
Element that must be the specified number- Parameters:
value- number value
-
numberType
public LambdaDslJsonArray numberType(java.lang.Number example)
Element that can be any number- Parameters:
example- example number to use for generated bodies
-
integerType
public LambdaDslJsonArray integerType()
Element that must be an integer
-
integerType
public LambdaDslJsonArray integerType(java.lang.Long example)
Element that must be an integer- Parameters:
example- example integer value to use for generated bodies
-
decimalType
public LambdaDslJsonArray decimalType()
Element that must be a decimal value
-
decimalType
public LambdaDslJsonArray decimalType(java.math.BigDecimal example)
Element that must be a decimalType value- Parameters:
example- example decimalType value
-
decimalType
public LambdaDslJsonArray decimalType(java.lang.Double example)
Attribute that must be a decimalType value- Parameters:
example- example decimalType value
-
booleanValue
public LambdaDslJsonArray booleanValue(java.lang.Boolean value)
Element that must be the specified value- Parameters:
value- boolean value
-
booleanType
public LambdaDslJsonArray booleanType(java.lang.Boolean example)
Element that must be a boolean- Parameters:
example- example boolean to use for generated bodies
-
date
public LambdaDslJsonArray date()
Element that must be formatted as an ISO date
-
date
public LambdaDslJsonArray date(java.lang.String format)
Element that must match the provided date format- Parameters:
format- date format to match
-
date
public LambdaDslJsonArray date(java.lang.String format, java.util.Date example)
Element that must match the provided date format- Parameters:
format- date format to matchexample- example date to use for generated values
-
time
public LambdaDslJsonArray time()
Element that must be an ISO formatted time
-
time
public LambdaDslJsonArray time(java.lang.String format)
Element that must match the given time format- Parameters:
format- time format to match
-
time
public LambdaDslJsonArray time(java.lang.String format, java.util.Date example)
Element that must match the given time format- Parameters:
format- time format to matchexample- example time to use for generated bodies
-
timestamp
@Deprecated public LambdaDslJsonArray timestamp()
Deprecated.Use datetimeElement that must be an ISO formatted timestamp
-
timestamp
@Deprecated public LambdaDslJsonArray timestamp(java.lang.String format)
Deprecated.Use datetimeElement that must match the given timestamp format- Parameters:
format- timestamp format
-
timestamp
@Deprecated public LambdaDslJsonArray timestamp(java.lang.String format, java.util.Date example)
Deprecated.Use datetimeElement that must match the given timestamp format- Parameters:
format- timestamp formatexample- example date and time to use for generated bodies
-
timestamp
@Deprecated public LambdaDslJsonArray timestamp(java.lang.String format, java.time.Instant example)
Deprecated.Use datetimeElement that must match the given timestamp format- Parameters:
format- timestamp formatexample- example date and time to use for generated bodies
-
id
public LambdaDslJsonArray id()
Element that must be a numeric identifier
-
id
public LambdaDslJsonArray id(java.lang.Long example)
Element that must be a numeric identifier- Parameters:
example- example id to use for generated bodies
-
uuid
public LambdaDslJsonArray uuid()
Element that must be encoded as an UUID
-
uuid
public LambdaDslJsonArray uuid(java.lang.String example)
Element that must be encoded as an UUID- Parameters:
example- example UUID to use for generated bodies
-
hexValue
public LambdaDslJsonArray hexValue()
Element that must be encoded as a hexadecimal value
-
hexValue
public LambdaDslJsonArray hexValue(java.lang.String example)
Element that must be encoded as a hexadecimal value- Parameters:
example- example value to use for generated bodies
-
ipV4Address
public LambdaDslJsonArray ipV4Address()
Element that must be an IP4 address
-
and
public LambdaDslJsonArray and(java.lang.Object value, au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)
Combine all the matchers using AND- Parameters:
value- Attribute example valuerules- Matching rules to apply
-
or
public LambdaDslJsonArray or(java.lang.Object value, au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)
Combine all the matchers using OR- Parameters:
value- Attribute example valuerules- Matching rules to apply
-
eachLike
public LambdaDslJsonArray eachLike(java.util.function.Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array where each item must match the following example
-
eachLike
public LambdaDslJsonArray eachLike(au.com.dius.pact.consumer.dsl.PactDslJsonRootValue value)
Element that is an array where each item must match the following example- Parameters:
value- Value that each item in the array must match
-
eachLike
public LambdaDslJsonArray eachLike(au.com.dius.pact.consumer.dsl.PactDslJsonRootValue value, int numberExamples)
Element that is an array where each item must match the following example- Parameters:
value- Value that each item in the array must matchnumberExamples- Number of examples to generate
-
eachLike
public LambdaDslJsonArray eachLike(int numberExamples, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array where each item must match the following example- Parameters:
numberExamples- Number of examples to generate
-
minArrayLike
public LambdaDslJsonArray minArrayLike(java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array with a minimum size where each item must match the following example- Parameters:
size- minimum size of the array
-
minArrayLike
public LambdaDslJsonArray minArrayLike(java.lang.Integer size, int numberExamples, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array with a minimum size where each item must match the following example- Parameters:
size- minimum size of the arraynumberExamples- number of examples to generate
-
maxArrayLike
public LambdaDslJsonArray maxArrayLike(java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array with a maximum size where each item must match the following example- Parameters:
size- maximum size of the array
-
maxArrayLike
public LambdaDslJsonArray maxArrayLike(java.lang.Integer size, int numberExamples, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array with a maximum size where each item must match the following example- Parameters:
size- maximum size of the arraynumberExamples- number of examples to generate
-
minMaxArrayLike
public LambdaDslJsonArray minMaxArrayLike(java.lang.Integer minSize, java.lang.Integer maxSize, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array with a minimum and maximum size where each item must match the following example- Parameters:
minSize- minimum size of the arraymaxSize- maximum size of the array
-
minMaxArrayLike
public LambdaDslJsonArray minMaxArrayLike(java.lang.Integer minSize, java.lang.Integer maxSize, int numberExamples, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array with a minimum and maximum size where each item must match the following example- Parameters:
minSize- minimum size of the arraymaxSize- maximum size of the arraynumberExamples- number of examples to generate
-
nullValue
public LambdaDslJsonArray nullValue()
Adds a null value to the list
-
eachArrayLike
public LambdaDslJsonArray eachArrayLike(java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object
-
eachArrayLike
public LambdaDslJsonArray eachArrayLike(int numberExamples, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object- Parameters:
numberExamples- number of examples to generate
-
eachArrayWithMaxLike
public LambdaDslJsonArray eachArrayWithMaxLike(java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object. This will generate 1 example value, if you want to change that number useeachArrayWithMaxLike(int, Integer, Consumer)- Parameters:
size- Maximum size of the outer array
-
eachArrayWithMaxLike
public LambdaDslJsonArray eachArrayWithMaxLike(int numberExamples, java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object- Parameters:
numberExamples- number of examples to generatesize- Maximum size of the outer array
-
eachArrayWithMinLike
public LambdaDslJsonArray eachArrayWithMinLike(java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object. This will generate 1 example value, if you want to change that number useeachArrayWithMinLike(int, Integer, Consumer)- Parameters:
size- Minimum size of the outer array
-
eachArrayWithMinLike
public LambdaDslJsonArray eachArrayWithMinLike(int numberExamples, java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object- Parameters:
numberExamples- number of examples to generatesize- Minimum size of the outer array
-
eachArrayWithMinMaxLike
public LambdaDslJsonArray eachArrayWithMinMaxLike(java.lang.Integer minSize, java.lang.Integer maxSize, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object. This will generate 1 example value, if you want to change that number useeachArrayWithMinMaxLike(Integer, Integer, int, Consumer)- Parameters:
minSize- minimum sizemaxSize- maximum size
-
eachArrayWithMinMaxLike
public LambdaDslJsonArray eachArrayWithMinMaxLike(java.lang.Integer minSize, java.lang.Integer maxSize, int numberExamples, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following object- Parameters:
minSize- minimum sizemaxSize- maximum size
-
dateExpression
public LambdaDslJsonArray dateExpression(java.lang.String expression)
Date value generated from the provided expression. Will use an ISO format.- Parameters:
expression- Date expression
-
dateExpression
public LambdaDslJsonArray dateExpression(java.lang.String expression, java.lang.String format)
Date value generated from the provided expression- Parameters:
expression- Date expressionformat- Date format to use for values
-
timeExpression
public LambdaDslJsonArray timeExpression(java.lang.String expression)
Time value generated from the provided expression. Will use an ISO format.- Parameters:
expression- Time expression
-
timeExpression
public LambdaDslJsonArray timeExpression(java.lang.String expression, java.lang.String format)
Time value generated from the provided expression- Parameters:
expression- Time expressionformat- Time format to use for values
-
datetimeExpression
public LambdaDslJsonArray datetimeExpression(java.lang.String expression)
Datetime generated from the provided expression. Will use an ISO format.- Parameters:
expression- Datetime expression
-
datetimeExpression
public LambdaDslJsonArray datetimeExpression(java.lang.String expression, java.lang.String format)
Datetime generated from the provided expression- Parameters:
expression- Datetime expressionformat- Datetime format to use for values
-
build
public au.com.dius.pact.consumer.dsl.DslPart build()
-
-