Class MockIntegrationTrait.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • build

        public MockIntegrationTrait build()
        Description copied from interface: SmithyBuilder
        Creates an immutable object that is created from the properties that have been set on the builder.
        Returns:
        an instance of T
      • contentHandling

        public MockIntegrationTrait.Builder contentHandling​(java.lang.String contentHandling)
        Set the Request payload encoding conversion types.

        Valid values are:

        • CONVERT_TO_TEXT, for converting a binary payload into a Base64-encoded string or converting a text payload into a utf-8-encoded string or passing through the text payload natively without modification
        • CONVERT_TO_BINARY, for converting a text payload into Base64-decoded blob or passing through a binary payload natively without modification.
        Parameters:
        contentHandling - Content handling property.
        Returns:
        Returns the builder.
      • removeRequestParameter

        public MockIntegrationTrait.Builder removeRequestParameter​(java.lang.String expression)
        Remove a request parameter by expression.
        Parameters:
        expression - Expression to remove.
        Returns:
        Returns the builder.
      • putRequestTemplate

        public MockIntegrationTrait.Builder putRequestTemplate​(java.lang.String mimeType,
                                                               java.lang.String template)
        Adds a request template.
        Parameters:
        mimeType - MIME type of the request template to set.
        template - Request template to set.
        Returns:
        Returns the builder.
        See Also:
        IntegrationTrait.getRequestTemplates()
      • requestTemplates

        public MockIntegrationTrait.Builder requestTemplates​(java.util.Map<java.lang.String,​java.lang.String> requestTemplates)
        Sets request templates.
        Parameters:
        requestTemplates - Map of MIME types to the corresponding template.
        Returns:
        Returns the builder.
        See Also:
        IntegrationTrait.getRequestTemplates()
      • removeRequestTemplate

        public MockIntegrationTrait.Builder removeRequestTemplate​(java.lang.String mimeType)
        Removes a request template by MIME type.
        Parameters:
        mimeType - MIME type to remove.
        Returns:
        Returns the builder.
      • removeResponse

        public MockIntegrationTrait.Builder removeResponse​(java.lang.String statusCodeRegex)
        Removes a response by status code regex.
        Parameters:
        statusCodeRegex - Status code regular expression to remove.
        Returns:
        Returns the builder.