Class Event
- All Implemented Interfaces:
ToSmithyBuilder<Event>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Event.Builderbuilder()booleangetBody()Gets the optional expected event body.Gets the optional media type of thebody.Optional<byte[]>getBytes()Gets an optional binary representation of the entire event.Gets a map of expected headers.Gets the optional parameters used to generate the event.Gets a list of header field names that MUST appear in the serialized event.getType()Gets vendor-specific params used to influence the request.inthashCode()Take this object and create a builder that contains all of the current property values of this object.
-
Method Details
-
getType
- Returns:
- Returns the type of event.
-
getParams
Gets the optional parameters used to generate the event.If set, these parameters MUST be compatible with a modeled event. If not set, this event represents an unmodeled event.
- Returns:
- Returns the optional parameters used to generate the event.
-
getHeaders
Gets a map of expected headers.Headers that are not listed in this map are ignored unless they are explicitly forbidden through
forbidHeaders.- Returns:
- Returns a map of expected headers.
-
getForbidHeaders
- Returns:
- Returns a list of headers field names that MUST NOT appear in the serialized event.
-
getRequireHeaders
Gets a list of header field names that MUST appear in the serialized event.No assertion is made on the value of the headers.
Headers listed in
headersdo not need to appear in this list.- Returns:
- Returns a list of required header keys.
-
getBody
Gets the optional expected event body.If no request body is defined, then no assertions are made about the body of the event.
- Returns:
- Returns the optional expected event body.
-
getBodyMediaType
Gets the optional media type of thebody.This is used to help test runners parse and validate the expected data against generated data.
- Returns:
- Returns the optional media type of the event body.
-
getBytes
Gets an optional binary representation of the entire event.This is used to test deserialization. If set, implementations SHOULD use this value to represent the binary value of received events rather than constructing that binary value from the other properties of the event.
This value SHOULD NOT be used to make assertions about serialized events as such assertions likely would not be reliable. They would suffer from the same problems of making
bodyassertions without abodyMediaTypewhere nonspecified ordering and optional whitespace can cause semantically equivalent values to have different bytes. This is made worse by headers having no defined order, and is likely made even worse by common event framing features such as checksums.- Returns:
- Returns an optional binary representation of the entire event.
-
getVendorParams
Gets vendor-specific params used to influence the request.For example, some vendors might utilize environment variables, configuration files on disk, or other means to influence the serialization formats used by clients or servers.
If
vendorParamsShapeis set, this MUST be compatible with that shape's definition.- Returns:
- Returns a map of vendor-specific params used to influence the request.
-
getVendorParamsShape
- Returns:
- Returns an optional shape used to validate
vendorParams.
-
toBuilder
Description copied from interface:ToSmithyBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToSmithyBuilder<Event>- Returns:
- a builder for type T
-
builder
- Returns:
- Returns a newly-created builder for
Event.
-
equals
-
hashCode
public int hashCode()
-