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 LambdaDslJsonArray
and(java.lang.Object value, au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)
Combine all the matchers using ANDLambdaDslJsonArray
array(java.util.function.Consumer<LambdaDslJsonArray> a)
Element that is a JSON arrayLambdaDslJsonArray
booleanType(java.lang.Boolean example)
Element that must be a booleanLambdaDslJsonArray
booleanValue(java.lang.Boolean value)
Element that must be the specified valueau.com.dius.pact.consumer.dsl.DslPart
build()
LambdaDslJsonArray
date()
Element that must be formatted as an ISO dateLambdaDslJsonArray
date(java.lang.String format)
Element that must match the provided date formatLambdaDslJsonArray
date(java.lang.String format, java.util.Date example)
Element that must match the provided date formatLambdaDslJsonArray
dateExpression(java.lang.String expression)
Date value generated from the provided expression.LambdaDslJsonArray
dateExpression(java.lang.String expression, java.lang.String format)
Date value generated from the provided expressionLambdaDslJsonArray
datetimeExpression(java.lang.String expression)
Datetime generated from the provided expression.LambdaDslJsonArray
datetimeExpression(java.lang.String expression, java.lang.String format)
Datetime generated from the provided expressionLambdaDslJsonArray
decimalMatching(java.lang.String regex, java.lang.Double example)
Attribute that can be any number decimal number (has significant digits after the decimal point) and which must match the provided regular expressionLambdaDslJsonArray
decimalType()
Element that must be a decimal valueLambdaDslJsonArray
decimalType(java.lang.Double example)
Attribute that must be a decimalType valueLambdaDslJsonArray
decimalType(java.math.BigDecimal example)
Element that must be a decimalType valueLambdaDslJsonArray
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 objectLambdaDslJsonArray
eachArrayLike(java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
Array element where each element of the array is an array and must match the following objectLambdaDslJsonArray
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 objectLambdaDslJsonArray
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.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 objectLambdaDslJsonArray
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.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 objectLambdaDslJsonArray
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.LambdaDslJsonArray
eachLike(int numberExamples, java.util.function.Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array where each item must match the following exampleLambdaDslJsonArray
eachLike(au.com.dius.pact.consumer.dsl.PactDslJsonRootValue value)
Element that is an array where each item must match the following exampleLambdaDslJsonArray
eachLike(au.com.dius.pact.consumer.dsl.PactDslJsonRootValue value, int numberExamples)
Element that is an array where each item must match the following exampleLambdaDslJsonArray
eachLike(java.util.function.Consumer<LambdaDslJsonBody> nestedObject)
Element that is an array where each item must match the following exampleau.com.dius.pact.consumer.dsl.PactDslJsonArray
getPactDslJsonArray()
Get the rawPactDslJsonArray
which is abstracted withPactDslJsonArray
LambdaDslJsonArray
hexValue()
Element that must be encoded as a hexadecimal valueLambdaDslJsonArray
hexValue(java.lang.String example)
Element that must be encoded as a hexadecimal valueLambdaDslJsonArray
id()
Element that must be a numeric identifierLambdaDslJsonArray
id(java.lang.Long example)
Element that must be a numeric identifierLambdaDslJsonArray
integerMatching(java.lang.String regex, java.lang.Integer example)
Attribute that can be any integer and which must match the provided regular expressionLambdaDslJsonArray
integerType()
Element that must be an integerLambdaDslJsonArray
integerType(java.lang.Long example)
Element that must be an integerLambdaDslJsonArray
ipV4Address()
Element that must be an IP4 addressLambdaDslJsonArray
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 exampleLambdaDslJsonArray
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 exampleLambdaDslJsonArray
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 exampleLambdaDslJsonArray
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 exampleLambdaDslJsonArray
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 exampleLambdaDslJsonArray
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 exampleLambdaDslJsonArray
nullValue()
Adds a null value to the listLambdaDslJsonArray
numberMatching(java.lang.String regex, java.lang.Number example)
Attribute that can be any number and which must match the provided regular expressionLambdaDslJsonArray
numberType(java.lang.Number example)
Element that can be any numberLambdaDslJsonArray
numberValue(java.lang.Number value)
Element that must be the specified numberLambdaDslJsonArray
object(java.util.function.Consumer<LambdaDslObject> o)
Element that is a JSON objectLambdaDslJsonArray
or(java.lang.Object value, au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)
Combine all the matchers using ORLambdaDslJsonArray
stringMatcher(java.lang.String regex, java.lang.String example)
Element that must match the regular expressionLambdaDslJsonArray
stringType(java.lang.String example)
Element that can be any stringLambdaDslJsonArray
stringValue(java.lang.String value)
Element that must be the specified valueLambdaDslJsonArray
time()
Element that must be an ISO formatted timeLambdaDslJsonArray
time(java.lang.String format)
Element that must match the given time formatLambdaDslJsonArray
time(java.lang.String format, java.util.Date example)
Element that must match the given time formatLambdaDslJsonArray
timeExpression(java.lang.String expression)
Time value generated from the provided expression.LambdaDslJsonArray
timeExpression(java.lang.String expression, java.lang.String format)
Time value generated from the provided expressionLambdaDslJsonArray
timestamp()
Deprecated.Use datetimeLambdaDslJsonArray
timestamp(java.lang.String format)
Deprecated.Use datetimeLambdaDslJsonArray
timestamp(java.lang.String format, java.time.Instant example)
Deprecated.Use datetimeLambdaDslJsonArray
timestamp(java.lang.String format, java.util.Date example)
Deprecated.Use datetimeLambdaDslJsonArray
unorderedArray(java.util.function.Consumer<LambdaDslJsonArray> a)
Array element where order is ignoredLambdaDslJsonArray
unorderedMaxArray(int size, java.util.function.Consumer<LambdaDslJsonArray> a)
Array element of max size where order is ignoredLambdaDslJsonArray
unorderedMinArray(int size, java.util.function.Consumer<LambdaDslJsonArray> a)
Array element of min size where order is ignoredLambdaDslJsonArray
unorderedMinMaxArray(int minSize, int maxSize, java.util.function.Consumer<LambdaDslJsonArray> a)
Array element of min and max size where order is ignoredLambdaDslJsonArray
uuid()
Element that must be encoded as an UUIDLambdaDslJsonArray
uuid(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 rawPactDslJsonArray
which 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
-
numberMatching
public LambdaDslJsonArray numberMatching(java.lang.String regex, java.lang.Number example)
Attribute that can be any number and which must match the provided regular expression- Parameters:
regex
- Regular expression that the numbers string form must matchexample
- example number to use for generated bodies
-
decimalMatching
public LambdaDslJsonArray decimalMatching(java.lang.String regex, java.lang.Double example)
Attribute that can be any number decimal number (has significant digits after the decimal point) and which must match the provided regular expression- Parameters:
regex
- Regular expression that the numbers string form must matchexample
- example number to use for generated bodies
-
integerMatching
public LambdaDslJsonArray integerMatching(java.lang.String regex, java.lang.Integer example)
Attribute that can be any integer and which must match the provided regular expression- Parameters:
regex
- Regular expression that the numbers string form must matchexample
- example integer to use for generated bodies
-
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()
-
-