Class LambdaDslJsonArray


  • public class LambdaDslJsonArray
    extends java.lang.Object
    • Method Detail

      • getPactDslJsonArray

        public au.com.dius.pact.consumer.dsl.PactDslJsonArray getPactDslJsonArray()
        Get the raw PactDslJsonArray which is abstracted with PactDslJsonArray
      • 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 expression
        example - 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​(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 match
        example - 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 match
        example - 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 match
        example - 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​(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 match
        example - example date to use for generated values
      • 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 match
        example - example time to use for generated bodies
      • timestamp

        @Deprecated
        public LambdaDslJsonArray timestamp()
        Deprecated.
        Use datetime
        Element that must be an ISO formatted timestamp
      • timestamp

        @Deprecated
        public LambdaDslJsonArray timestamp​(java.lang.String format)
        Deprecated.
        Use datetime
        Element 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 datetime
        Element that must match the given timestamp format
        Parameters:
        format - timestamp format
        example - example date and time to use for generated bodies
      • timestamp

        @Deprecated
        public LambdaDslJsonArray timestamp​(java.lang.String format,
                                            java.time.Instant example)
        Deprecated.
        Use datetime
        Element that must match the given timestamp format
        Parameters:
        format - timestamp format
        example - example date and time to use for generated bodies
      • 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​(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 value
        rules - 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 value
        rules - 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 match
        numberExamples - 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 array
        numberExamples - 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 array
        numberExamples - 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 array
        maxSize - 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 array
        maxSize - maximum size of the array
        numberExamples - number of examples to generate
      • 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 use eachArrayWithMaxLike(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 generate
        size - 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 use eachArrayWithMinLike(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 generate
        size - 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 use eachArrayWithMinMaxLike(Integer, Integer, int, Consumer)
        Parameters:
        minSize - minimum size
        maxSize - 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 size
        maxSize - 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 expression
        format - 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 expression
        format - 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 expression
        format - Datetime format to use for values
      • build

        public au.com.dius.pact.consumer.dsl.DslPart build()