Class LambdaDslObject

  • Direct Known Subclasses:
    LambdaDslJsonBody

    public class LambdaDslObject
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      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
      LambdaDslObject array​(java.lang.String name, java.util.function.Consumer<LambdaDslJsonArray> array)
      Attribute that is an array
      LambdaDslObject arrayContaining​(java.lang.String name, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Matches the items in an array against a number of variants.
      LambdaDslObject booleanType​(java.lang.String... names)
      Attributes that must be a boolean
      LambdaDslObject booleanType​(java.lang.String name, java.lang.Boolean example)
      Attribute that must be a boolean
      LambdaDslObject booleanValue​(java.lang.String name, java.lang.Boolean value)
      Attribute that must be the specified boolean
      LambdaDslObject date()
      Attribute named 'date' that must be formatted as an ISO date
      LambdaDslObject date​(java.lang.String name)
      Attribute that must be formatted as an ISO date
      LambdaDslObject date​(java.lang.String name, java.lang.String format)
      Attribute that must match the provided date format
      LambdaDslObject date​(java.lang.String name, java.lang.String format, java.time.LocalDate example)
      Attribute that must match the provided date format
      LambdaDslObject date​(java.lang.String name, java.lang.String format, java.time.ZonedDateTime example)
      Attribute that must match the provided date format
      LambdaDslObject date​(java.lang.String name, java.lang.String format, java.util.Date example)
      Attribute that must match the provided date format
      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
      LambdaDslObject dateExpression​(java.lang.String name, java.lang.String expression)
      Attribute whose values are generated from the provided expression.
      LambdaDslObject dateExpression​(java.lang.String name, java.lang.String expression, java.lang.String format)
      Attribute whose values are generated from the provided expression
      LambdaDslObject datetime​(java.lang.String name)
      Deprecated.
      Use datetime
      LambdaDslObject datetime​(java.lang.String name, java.lang.String format)
      Attribute that must match the given datetime format
      LambdaDslObject datetime​(java.lang.String name, java.lang.String format, java.time.Instant example)
      Attribute that must match the given datetime format
      LambdaDslObject datetime​(java.lang.String name, java.lang.String format, java.time.ZonedDateTime example)
      Attribute that must match the given timestamp format
      LambdaDslObject datetime​(java.lang.String name, java.lang.String format, java.util.Date example)
      Attribute that must match the given datetime format
      LambdaDslObject datetime​(java.lang.String name, java.lang.String format, java.util.Date example, java.util.TimeZone timeZone)
      Attribute that must match the given datetime format
      LambdaDslObject datetimeExpression​(java.lang.String name, java.lang.String expression)
      Attribute whose values are generated from the provided expression.
      LambdaDslObject datetimeExpression​(java.lang.String name, java.lang.String expression, java.lang.String format)
      Attribute whose values are generated from the provided expression
      LambdaDslObject decimalMatching​(java.lang.String name, 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
      LambdaDslObject decimalType​(java.lang.String... names)
      Attributes that must be decimal values (have significant digits after the decimal point)
      LambdaDslObject decimalType​(java.lang.String name, java.lang.Double example)
      Attribute that must be a decimalType value (has significant digits after the decimal point)
      LambdaDslObject decimalType​(java.lang.String name, java.math.BigDecimal example)
      Attribute that must be a decimalType value (has significant digits after the decimal point)
      LambdaDslObject eachArrayLike​(java.lang.String name, int numberExamples, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Array field where each element is an array and must match the following object
      LambdaDslObject eachArrayLike​(java.lang.String name, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Array field where each element is an array and must match the following object
      LambdaDslObject eachArrayWithMaxLike​(java.lang.String name, int numberExamples, java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Array field where each element is an array and must match the following object
      LambdaDslObject eachArrayWithMaxLike​(java.lang.String name, java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Array field where each element is an array and must match the following object.
      LambdaDslObject eachArrayWithMinLike​(java.lang.String name, int numberExamples, java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Array field where each element is an array and must match the following object
      LambdaDslObject eachArrayWithMinLike​(java.lang.String name, java.lang.Integer size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Array field where each element is an array and must match the following object.
      LambdaDslObject eachArrayWithMinMaxLike​(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize, int numberExamples, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Array field where each element is an array and must match the following object
      LambdaDslObject eachArrayWithMinMaxLike​(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Array field where each element is an array and must match the following object.
      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
      LambdaDslObject eachKeyLike​(java.lang.String exampleKey, java.util.function.Consumer<LambdaDslObject> nestedObject)
      Accepts any key, and each key is mapped to a map that must match the following object definition.
      LambdaDslObject eachKeyMappedToAnArrayLike​(java.lang.String exampleKey, java.util.function.Consumer<LambdaDslObject> nestedObject)
      Accepts any key, and each key is mapped to a list of items that must match the following object definition.
      LambdaDslObject eachLike​(java.lang.String name, int numberExamples, java.util.function.Consumer<LambdaDslObject> nestedObject)
      Attribute that is an array where each item must match the following example
      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
      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
      LambdaDslObject eachLike​(java.lang.String name, java.util.function.Consumer<LambdaDslObject> nestedObject)
      Attribute that is an array where each item must match the following example
      au.com.dius.pact.consumer.dsl.PactDslJsonBody getPactDslObject()
      Get the raw PactDslJsonBody which is abstracted with LambdaDslObject
      LambdaDslObject id()
      Attribute named 'id' that must be a numeric identifier
      LambdaDslObject id​(java.lang.String name)
      Attribute that must be a numeric identifier
      LambdaDslObject id​(java.lang.String name, java.lang.Long example)
      Attribute that must be a numeric identifier
      LambdaDslObject integerMatching​(java.lang.String name, java.lang.String regex, java.lang.Integer example)
      Attribute that can be any integer and which must match the provided regular expression
      LambdaDslObject integerType​(java.lang.String... names)
      Attributes that must be an integer
      LambdaDslObject integerType​(java.lang.String name, java.lang.Integer example)
      Attribute that must be an integer
      LambdaDslObject ipV4Address​(java.lang.String name)
      Attribute that must be an IP4 address
      LambdaDslObject matchUrl​(java.lang.String name, java.lang.String basePath, java.lang.Object... pathFragments)
      Matches a URL that is composed of a base path and a sequence of path expressions
      LambdaDslObject matchUrl2​(java.lang.String name, java.lang.Object... pathFragments)
      Matches a URL that is composed of a base path and a sequence of path expressions.
      LambdaDslObject maxArrayLike​(java.lang.String name, java.lang.Integer size, int numberExamples, java.util.function.Consumer<LambdaDslObject> nestedObject)
      Attribute that is an array with a maximum size where each item must match the following example
      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
      LambdaDslObject maxArrayLike​(java.lang.String name, java.lang.Integer size, java.util.function.Consumer<LambdaDslObject> nestedObject)
      Attribute that is an array with a maximum size where each item must match the following example
      LambdaDslObject minArrayLike​(java.lang.String name, java.lang.Integer size, int numberExamples, java.util.function.Consumer<LambdaDslObject> nestedObject)
      Attribute that is an array with a minimum size where each item must match the following example
      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
      LambdaDslObject minArrayLike​(java.lang.String name, java.lang.Integer size, java.util.function.Consumer<LambdaDslObject> nestedObject)
      Attribute that is an array with a minimum size where each item must match the following example
      LambdaDslObject minMaxArrayLike​(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize, int numberExamples, java.util.function.Consumer<LambdaDslObject> nestedObject)
      Attribute that is an array with a minimum and maximum size where each item must match the following example
      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
      LambdaDslObject minMaxArrayLike​(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize, java.util.function.Consumer<LambdaDslObject> nestedObject)
      Attribute that is an array with a minimum and maximum size where each item must match the following example
      LambdaDslObject nullValue​(java.lang.String fieldName)
      Sets the field to a null value
      LambdaDslObject numberMatching​(java.lang.String name, java.lang.String regex, java.lang.Number example)
      Attribute that can be any number and which must match the provided regular expression
      LambdaDslObject numberType​(java.lang.String... names)
      Attributes that can be any number
      LambdaDslObject numberType​(java.lang.String name, java.lang.Number example)
      Attribute that can be any number
      LambdaDslObject numberValue​(java.lang.String name, java.lang.Number value)
      Attribute that must be the specified number
      LambdaDslObject object​(java.lang.String name, java.util.function.Consumer<LambdaDslObject> nestedObject)
      Attribute that is a JSON object
      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
      LambdaDslObject stringMatcher​(java.lang.String name, java.lang.String regex)
      Attribute that must match the regular expression
      LambdaDslObject stringMatcher​(java.lang.String name, java.lang.String regex, java.lang.String example)
      Attribute that must match the regular expression
      LambdaDslObject stringType​(java.lang.String name)
      Attribute that can be any string
      LambdaDslObject stringType​(java.lang.String... names)
      Attributes that can be any string
      LambdaDslObject stringType​(java.lang.String name, java.lang.String example)
      Attribute that can be any string
      LambdaDslObject stringValue​(java.lang.String name, java.lang.String value)
      Attribute that must be the specified value
      LambdaDslObject time()
      Attribute named 'time' that must be an ISO formatted time
      LambdaDslObject time​(java.lang.String name)
      Attribute that must be an ISO formatted time
      LambdaDslObject time​(java.lang.String name, java.lang.String format)
      Attribute that must match the provided time format
      LambdaDslObject time​(java.lang.String name, java.lang.String format, java.time.ZonedDateTime example)
      Attribute that must match the provided time format
      LambdaDslObject time​(java.lang.String name, java.lang.String format, java.util.Date example)
      Attribute that must match the provided time format
      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
      LambdaDslObject timeExpression​(java.lang.String name, java.lang.String expression)
      Attribute whose values are generated from the provided expression.
      LambdaDslObject timeExpression​(java.lang.String name, java.lang.String expression, java.lang.String format)
      Attribute whose values are generated from the provided expression
      LambdaDslObject timestamp()
      Deprecated.
      Use datetime
      LambdaDslObject unorderedArray​(java.lang.String name, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Array field where order is ignored
      LambdaDslObject unorderedMaxArray​(java.lang.String name, int size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Array field of max size where order is ignored
      LambdaDslObject unorderedMinArray​(java.lang.String name, int size, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Array field of min size where order is ignored
      LambdaDslObject unorderedMinMaxArray​(java.lang.String name, int minSize, int maxSize, java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
      Array field of min and max size where order is ignored
      LambdaDslObject uuid​(java.lang.String name)
      Attribute that must be encoded as an UUID
      LambdaDslObject uuid​(java.lang.String name, java.util.UUID example)
      Attribute that must be encoded as an UUID
      LambdaDslObject valueFromProviderState​(java.lang.String name, java.lang.String expression, java.lang.Object example)
      Attribute that will have its value injected from the provider state
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPactDslObject

        public au.com.dius.pact.consumer.dsl.PactDslJsonBody getPactDslObject()
        Get the raw PactDslJsonBody which is abstracted with LambdaDslObject
      • stringValue

        public LambdaDslObject stringValue​(java.lang.String name,
                                           java.lang.String value)
        Attribute that must be the specified value
        Parameters:
        name - attribute name
        value - string value
      • stringType

        public LambdaDslObject stringType​(java.lang.String name,
                                          java.lang.String example)
        Attribute that can be any string
        Parameters:
        name - attribute name
        example - example value to use for generated bodies
      • stringType

        public LambdaDslObject stringType​(java.lang.String name)
        Attribute that can be any string
        Parameters:
        name - attribute name
      • stringType

        public LambdaDslObject stringType​(java.lang.String... names)
        Attributes that can be any string
        Parameters:
        names - attribute names
      • stringMatcher

        public LambdaDslObject stringMatcher​(java.lang.String name,
                                             java.lang.String regex)
        Attribute that must match the regular expression
        Parameters:
        name - attribute name
        regex - regular expression
      • stringMatcher

        public LambdaDslObject stringMatcher​(java.lang.String name,
                                             java.lang.String regex,
                                             java.lang.String example)
        Attribute that must match the regular expression
        Parameters:
        name - attribute name
        regex - regular expression
        example - example value to use for generated bodies
      • numberValue

        public LambdaDslObject numberValue​(java.lang.String name,
                                           java.lang.Number value)
        Attribute that must be the specified number
        Parameters:
        name - attribute name
        value - number value
      • numberType

        public LambdaDslObject numberType​(java.lang.String name,
                                          java.lang.Number example)
        Attribute that can be any number
        Parameters:
        name - attribute name
        example - example number to use for generated bodies
      • numberType

        public LambdaDslObject numberType​(java.lang.String... names)
        Attributes that can be any number
        Parameters:
        names - attribute names
      • integerType

        public LambdaDslObject integerType​(java.lang.String name,
                                           java.lang.Integer example)
        Attribute that must be an integer
        Parameters:
        name - attribute name
        example - example integer value to use for generated bodies
      • integerType

        public LambdaDslObject integerType​(java.lang.String... names)
        Attributes that must be an integer
        Parameters:
        names - attribute names
      • decimalType

        public LambdaDslObject decimalType​(java.lang.String name,
                                           java.math.BigDecimal example)
        Attribute that must be a decimalType value (has significant digits after the decimal point)
        Parameters:
        name - attribute name
        example - example decimalType value
      • decimalType

        public LambdaDslObject decimalType​(java.lang.String name,
                                           java.lang.Double example)
        Attribute that must be a decimalType value (has significant digits after the decimal point)
        Parameters:
        name - attribute name
        example - example decimalType value
      • decimalType

        public LambdaDslObject decimalType​(java.lang.String... names)
        Attributes that must be decimal values (have significant digits after the decimal point)
        Parameters:
        names - attribute names
      • numberMatching

        public LambdaDslObject numberMatching​(java.lang.String name,
                                              java.lang.String regex,
                                              java.lang.Number example)
        Attribute that can be any number and which must match the provided regular expression
        Parameters:
        name - attribute name
        regex - Regular expression that the numbers string form must match
        example - example number to use for generated bodies
      • decimalMatching

        public LambdaDslObject decimalMatching​(java.lang.String name,
                                               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:
        name - attribute name
        regex - Regular expression that the numbers string form must match
        example - example number to use for generated bodies
      • integerMatching

        public LambdaDslObject integerMatching​(java.lang.String name,
                                               java.lang.String regex,
                                               java.lang.Integer example)
        Attribute that can be any integer and which must match the provided regular expression
        Parameters:
        name - attribute name
        regex - Regular expression that the numbers string form must match
        example - example integer to use for generated bodies
      • booleanValue

        public LambdaDslObject booleanValue​(java.lang.String name,
                                            java.lang.Boolean value)
        Attribute that must be the specified boolean
        Parameters:
        name - attribute name
        value - boolean value
      • booleanType

        public LambdaDslObject booleanType​(java.lang.String name,
                                           java.lang.Boolean example)
        Attribute that must be a boolean
        Parameters:
        name - attribute name
        example - example boolean to use for generated bodies
      • booleanType

        public LambdaDslObject booleanType​(java.lang.String... names)
        Attributes that must be a boolean
        Parameters:
        names - attribute names
      • id

        public LambdaDslObject id()
        Attribute named 'id' that must be a numeric identifier
      • id

        public LambdaDslObject id​(java.lang.String name)
        Attribute that must be a numeric identifier
        Parameters:
        name - attribute name
      • id

        public LambdaDslObject id​(java.lang.String name,
                                  java.lang.Long example)
        Attribute that must be a numeric identifier
        Parameters:
        name - attribute name
        example - example id to use for generated bodies
      • uuid

        public LambdaDslObject uuid​(java.lang.String name)
        Attribute that must be encoded as an UUID
        Parameters:
        name - attribute name
      • uuid

        public LambdaDslObject uuid​(java.lang.String name,
                                    java.util.UUID example)
        Attribute that must be encoded as an UUID
        Parameters:
        name - attribute name
        example - example UUID to use for generated bodies
      • date

        public LambdaDslObject date()
        Attribute named 'date' that must be formatted as an ISO date
      • date

        public LambdaDslObject date​(java.lang.String name)
        Attribute that must be formatted as an ISO date
        Parameters:
        name - attribute name
      • date

        public LambdaDslObject date​(java.lang.String name,
                                    java.lang.String format)
        Attribute that must match the provided date format
        Parameters:
        name - attribute date
        format - date format to match
      • date

        public LambdaDslObject date​(java.lang.String name,
                                    java.lang.String format,
                                    java.util.Date example)
        Attribute that must match the provided date format
        Parameters:
        name - attribute date
        format - date format to match
        example - example date to use for generated values
      • date

        public 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
        Parameters:
        name - attribute date
        format - date format to match
        example - example date to use for generated values
        timeZone - time zone used for formatting of example date
      • date

        public LambdaDslObject date​(java.lang.String name,
                                    java.lang.String format,
                                    java.time.ZonedDateTime example)
        Attribute that must match the provided date format
        Parameters:
        name - attribute date
        format - date format to match
        example - example date to use for generated values
      • date

        public LambdaDslObject date​(java.lang.String name,
                                    java.lang.String format,
                                    java.time.LocalDate example)
        Attribute that must match the provided date format
        Parameters:
        name - attribute date
        format - date format to match
        example - example date to use for generated values
      • time

        public LambdaDslObject time()
        Attribute named 'time' that must be an ISO formatted time
      • time

        public LambdaDslObject time​(java.lang.String name)
        Attribute that must be an ISO formatted time
        Parameters:
        name - attribute name
      • time

        public LambdaDslObject time​(java.lang.String name,
                                    java.lang.String format)
        Attribute that must match the provided time format
        Parameters:
        name - attribute time
        format - time format to match
      • time

        public LambdaDslObject time​(java.lang.String name,
                                    java.lang.String format,
                                    java.util.Date example)
        Attribute that must match the provided time format
        Parameters:
        name - attribute name
        format - time format to match
        example - example time to use for generated values
      • time

        public 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
        Parameters:
        name - attribute name
        format - time format to match
        example - example time to use for generated values
        timeZone - time zone used for formatting of example time
      • time

        public LambdaDslObject time​(java.lang.String name,
                                    java.lang.String format,
                                    java.time.ZonedDateTime example)
        Attribute that must match the provided time format
        Parameters:
        name - attribute name
        format - time format to match
        example - example time to use for generated values
      • timestamp

        @Deprecated
        public LambdaDslObject timestamp()
        Deprecated.
        Use datetime
        Attribute named 'timestamp' that must be an ISO formatted timestamp
      • datetime

        @Deprecated
        public LambdaDslObject datetime​(java.lang.String name)
        Deprecated.
        Use datetime
        Attribute that must be an ISO formatted datetime
        Parameters:
        name - attribute name
      • datetime

        public LambdaDslObject datetime​(java.lang.String name,
                                        java.lang.String format)
        Attribute that must match the given datetime format
        Parameters:
        name - attribute name
        format - datetime format
      • datetime

        public LambdaDslObject datetime​(java.lang.String name,
                                        java.lang.String format,
                                        java.util.Date example)
        Attribute that must match the given datetime format
        Parameters:
        name - attribute name
        format - datetime format
        example - example date and time to use for generated bodies
      • datetime

        public LambdaDslObject datetime​(java.lang.String name,
                                        java.lang.String format,
                                        java.time.Instant example)
        Attribute that must match the given datetime format
        Parameters:
        name - attribute name
        format - datetime format
        example - example date and time to use for generated bodies
      • datetime

        public LambdaDslObject datetime​(java.lang.String name,
                                        java.lang.String format,
                                        java.util.Date example,
                                        java.util.TimeZone timeZone)
        Attribute that must match the given datetime format
        Parameters:
        name - attribute name
        format - datetime format
        example - example date and time to use for generated bodies
        timeZone - time zone used for formatting of example date and time
      • datetime

        public LambdaDslObject datetime​(java.lang.String name,
                                        java.lang.String format,
                                        java.time.ZonedDateTime example)
        Attribute that must match the given timestamp format
        Parameters:
        name - attribute name
        format - datetime format
        example - example date and time to use for generated bodies
      • ipV4Address

        public LambdaDslObject ipV4Address​(java.lang.String name)
        Attribute that must be an IP4 address
        Parameters:
        name - attribute name
      • valueFromProviderState

        public LambdaDslObject valueFromProviderState​(java.lang.String name,
                                                      java.lang.String expression,
                                                      java.lang.Object example)
        Attribute that will have its value injected from the provider state
        Parameters:
        name - Attribute name
        expression - Expression to be evaluated from the provider state
        example - Example value to be used in the consumer test
      • and

        public 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
        Parameters:
        name - Attribute name
        value - Attribute example value
        rules - Matching rules to apply
      • or

        public 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
        Parameters:
        name - Attribute name
        value - Attribute example value
        rules - Matching rules to apply
      • array

        public LambdaDslObject array​(java.lang.String name,
                                     java.util.function.Consumer<LambdaDslJsonArray> array)
        Attribute that is an array
        Parameters:
        name - field name
      • object

        public LambdaDslObject object​(java.lang.String name,
                                      java.util.function.Consumer<LambdaDslObject> nestedObject)
        Attribute that is a JSON object
        Parameters:
        name - field name
      • eachLike

        public LambdaDslObject eachLike​(java.lang.String name,
                                        java.util.function.Consumer<LambdaDslObject> nestedObject)
        Attribute that is an array where each item must match the following example
        Parameters:
        name - field name
      • eachLike

        public LambdaDslObject eachLike​(java.lang.String name,
                                        int numberExamples,
                                        java.util.function.Consumer<LambdaDslObject> nestedObject)
        Attribute that is an array where each item must match the following example
        Parameters:
        name - field name
        numberExamples - number of examples to generate
      • eachLike

        public 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
        Parameters:
        name - field name
        value - Value that each item in the array must match
      • eachLike

        public 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
        Parameters:
        name - field name
        value - Value that each item in the array must match
        numberExamples - Number of examples to generate
      • minArrayLike

        public LambdaDslObject minArrayLike​(java.lang.String name,
                                            java.lang.Integer size,
                                            java.util.function.Consumer<LambdaDslObject> nestedObject)
        Attribute that is an array with a minimum size where each item must match the following example
        Parameters:
        name - field name
        size - minimum size of the array
      • minArrayLike

        public LambdaDslObject minArrayLike​(java.lang.String name,
                                            java.lang.Integer size,
                                            int numberExamples,
                                            java.util.function.Consumer<LambdaDslObject> nestedObject)
        Attribute that is an array with a minimum size where each item must match the following example
        Parameters:
        name - field name
        size - minimum size of the array
        numberExamples - number of examples to generate
      • minArrayLike

        public 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
        Parameters:
        name - field name
        size - minimum size of the array
        value - Value to use to match each item
        numberExamples - number of examples to generate
      • maxArrayLike

        public LambdaDslObject maxArrayLike​(java.lang.String name,
                                            java.lang.Integer size,
                                            java.util.function.Consumer<LambdaDslObject> nestedObject)
        Attribute that is an array with a maximum size where each item must match the following example
        Parameters:
        name - field name
        size - maximum size of the array
      • maxArrayLike

        public LambdaDslObject maxArrayLike​(java.lang.String name,
                                            java.lang.Integer size,
                                            int numberExamples,
                                            java.util.function.Consumer<LambdaDslObject> nestedObject)
        Attribute that is an array with a maximum size where each item must match the following example
        Parameters:
        name - field name
        size - maximum size of the array
        numberExamples - number of examples to generate
      • maxArrayLike

        public 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
        Parameters:
        name - field name
        size - maximum size of the array
        value - Value to use to match each item
        numberExamples - number of examples to generate
      • minMaxArrayLike

        public LambdaDslObject minMaxArrayLike​(java.lang.String name,
                                               java.lang.Integer minSize,
                                               java.lang.Integer maxSize,
                                               java.util.function.Consumer<LambdaDslObject> nestedObject)
        Attribute that is an array with a minimum and maximum size where each item must match the following example
        Parameters:
        name - field name
        minSize - minimum size of the array
        maxSize - maximum size of the array
      • minMaxArrayLike

        public LambdaDslObject minMaxArrayLike​(java.lang.String name,
                                               java.lang.Integer minSize,
                                               java.lang.Integer maxSize,
                                               int numberExamples,
                                               java.util.function.Consumer<LambdaDslObject> nestedObject)
        Attribute that is an array with a minimum and maximum size where each item must match the following example
        Parameters:
        name - field name
        minSize - minimum size of the array
        maxSize - maximum size of the array
        numberExamples - number of examples to generate
      • minMaxArrayLike

        public 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
        Parameters:
        name - field name
        minSize - minimum size of the array
        maxSize - maximum size of the array
        value - Value to use to match each item
        numberExamples - number of examples to generate
      • nullValue

        public LambdaDslObject nullValue​(java.lang.String fieldName)
        Sets the field to a null value
        Parameters:
        fieldName - field name
      • eachArrayLike

        public LambdaDslObject eachArrayLike​(java.lang.String name,
                                             java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Array field where each element is an array and must match the following object
        Parameters:
        name - field name
      • eachArrayLike

        public LambdaDslObject eachArrayLike​(java.lang.String name,
                                             int numberExamples,
                                             java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Array field where each element is an array and must match the following object
        Parameters:
        name - field name
        numberExamples - number of examples to generate
      • eachArrayWithMaxLike

        public LambdaDslObject eachArrayWithMaxLike​(java.lang.String name,
                                                    java.lang.Integer size,
                                                    java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Array field where each element is an array and must match the following object. This will generate 1 example value, if you want to change that number use eachArrayWithMaxLike(String, int, Integer, Consumer)
        Parameters:
        name - field name
        size - Maximum size of the outer array
      • eachArrayWithMaxLike

        public LambdaDslObject eachArrayWithMaxLike​(java.lang.String name,
                                                    int numberExamples,
                                                    java.lang.Integer size,
                                                    java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Array field where each element is an array and must match the following object
        Parameters:
        name - field name
        numberExamples - number of examples to generate
        size - Maximum size of the outer array
      • eachArrayWithMinLike

        public LambdaDslObject eachArrayWithMinLike​(java.lang.String name,
                                                    java.lang.Integer size,
                                                    java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Array field where each element is an array and must match the following object. This will generate 1 example value, if you want to change that number use eachArrayWithMinLike(String, int, Integer, Consumer)
        Parameters:
        name - field name
        size - Minimum size of the outer array
      • eachArrayWithMinLike

        public LambdaDslObject eachArrayWithMinLike​(java.lang.String name,
                                                    int numberExamples,
                                                    java.lang.Integer size,
                                                    java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Array field where each element is an array and must match the following object
        Parameters:
        name - field name
        numberExamples - number of examples to generate
        size - Minimum size of the outer array
      • eachArrayWithMinMaxLike

        public LambdaDslObject eachArrayWithMinMaxLike​(java.lang.String name,
                                                       java.lang.Integer minSize,
                                                       java.lang.Integer maxSize,
                                                       java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Array field where each element is an array and must match the following object. This will generate 1 example value, if you want to change that number use eachArrayWithMinMaxLike(String, Integer, Integer, int, Consumer)
        Parameters:
        name - field name
        minSize - minimum size
        maxSize - maximum size
      • eachArrayWithMinMaxLike

        public LambdaDslObject eachArrayWithMinMaxLike​(java.lang.String name,
                                                       java.lang.Integer minSize,
                                                       java.lang.Integer maxSize,
                                                       int numberExamples,
                                                       java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Array field where each element is an array and must match the following object
        Parameters:
        name - field name
        numberExamples - number of examples to generate
        minSize - minimum size
        maxSize - maximum size
      • eachKeyMappedToAnArrayLike

        public LambdaDslObject eachKeyMappedToAnArrayLike​(java.lang.String exampleKey,
                                                          java.util.function.Consumer<LambdaDslObject> nestedObject)
        Accepts any key, and each key is mapped to a list of items that must match the following object definition.
        Parameters:
        exampleKey - Example key to use for generating bodies
      • eachKeyLike

        public LambdaDslObject eachKeyLike​(java.lang.String exampleKey,
                                           java.util.function.Consumer<LambdaDslObject> nestedObject)
        Accepts any key, and each key is mapped to a map that must match the following object definition.
        Parameters:
        exampleKey - Example key to use for generating bodies
      • eachKeyLike

        public 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
        Parameters:
        exampleKey - Example key to use for generating bodies
        value - Value to use for matching and generated bodies
      • dateExpression

        public LambdaDslObject dateExpression​(java.lang.String name,
                                              java.lang.String expression)
        Attribute whose values are generated from the provided expression. Will use an ISO format.
        Parameters:
        name - Attribute name
        expression - Date expression
      • dateExpression

        public LambdaDslObject dateExpression​(java.lang.String name,
                                              java.lang.String expression,
                                              java.lang.String format)
        Attribute whose values are generated from the provided expression
        Parameters:
        name - Attribute name
        expression - Date expression
        format - Date format to use for values
      • timeExpression

        public LambdaDslObject timeExpression​(java.lang.String name,
                                              java.lang.String expression)
        Attribute whose values are generated from the provided expression. Will use an ISO format.
        Parameters:
        name - Attribute name
        expression - Time expression
      • timeExpression

        public LambdaDslObject timeExpression​(java.lang.String name,
                                              java.lang.String expression,
                                              java.lang.String format)
        Attribute whose values are generated from the provided expression
        Parameters:
        name - Attribute name
        expression - Time expression
        format - Time format to use for values
      • datetimeExpression

        public LambdaDslObject datetimeExpression​(java.lang.String name,
                                                  java.lang.String expression)
        Attribute whose values are generated from the provided expression. Will use an ISO format.
        Parameters:
        name - Attribute name
        expression - Datetime expression
      • datetimeExpression

        public LambdaDslObject datetimeExpression​(java.lang.String name,
                                                  java.lang.String expression,
                                                  java.lang.String format)
        Attribute whose values are generated from the provided expression
        Parameters:
        name - Attribute name
        expression - Datetime expression
        format - Datetime format to use for values
      • unorderedArray

        public LambdaDslObject unorderedArray​(java.lang.String name,
                                              java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Array field where order is ignored
        Parameters:
        name - field name
      • unorderedMinArray

        public LambdaDslObject unorderedMinArray​(java.lang.String name,
                                                 int size,
                                                 java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Array field of min size where order is ignored
        Parameters:
        name - field name
        size - minimum size
      • unorderedMaxArray

        public LambdaDslObject unorderedMaxArray​(java.lang.String name,
                                                 int size,
                                                 java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Array field of max size where order is ignored
        Parameters:
        name - field name
        size - maximum size
      • unorderedMinMaxArray

        public LambdaDslObject unorderedMinMaxArray​(java.lang.String name,
                                                    int minSize,
                                                    int maxSize,
                                                    java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Array field of min and max size where order is ignored
        Parameters:
        name - field name
        minSize - minimum size
        maxSize - maximum size
      • matchUrl

        public LambdaDslObject matchUrl​(java.lang.String name,
                                        java.lang.String basePath,
                                        java.lang.Object... pathFragments)
        Matches a URL that is composed of a base path and a sequence of path expressions
        Parameters:
        name - Attribute name
        basePath - The base path for the URL (like "http://localhost:8080/") which will be excluded from the matching
        pathFragments - Series of path fragments to match on. These can be strings or regular expressions.
      • matchUrl2

        public LambdaDslObject matchUrl2​(java.lang.String name,
                                         java.lang.Object... pathFragments)
        Matches a URL that is composed of a base path and a sequence of path expressions. The base path of the mock server will be used.
        Parameters:
        name - Attribute name
        pathFragments - Series of path fragments to match on. These can be strings or regular expressions.
      • arrayContaining

        public LambdaDslObject arrayContaining​(java.lang.String name,
                                               java.util.function.Consumer<LambdaDslJsonArray> nestedArray)
        Matches the items in an array against a number of variants. Matching is successful if each variant occurs once in the array. Variants may be objects containing matching rules.
        Parameters:
        name - Attribute name