private Optional<RequestBodyObject> createRequestDocument(
            String mediaType,
            Context<T> context,
            HttpBindingIndex bindingIndex,
            OperationShape operation
    ) {
        List<HttpBinding> bindings = bindingIndex.getRequestBindings(operation, HttpBinding.Location.DOCUMENT);

        // If nothing is bound to the document, then no schema needs to be synthesized.
        if (bindings.isEmpty()) {
            return Optional.empty();
        }

        // Synthesize a schema for the body of the request.
        Schema schema = createDocumentSchema(context, operation, bindings, MessageType.REQUEST);
        String contextName = context.getService().getContextualName(operation);
        String synthesizedName = stripNonAlphaNumericCharsIfNecessary(context, contextName) + "RequestContent";
        String pointer = context.putSynthesizedSchema(synthesizedName, schema);
        MediaTypeObject mediaTypeObject = MediaTypeObject.builder()
                .schema(Schema.builder().ref(pointer).build())
                .examples(createBodyExamples(operation, bindings, MessageType.REQUEST, null))
                .build();

        // If any of the top level bindings are required, then the body itself must be required.
        boolean required = false;
        for (HttpBinding binding : bindings) {
            if (binding.getMember().isRequired()) {
                required = true;
                break;
            }
        }

        return Optional.of(RequestBodyObject.builder()
                .putContent(mediaType, mediaTypeObject)
                .required(required)
                .build());
    }
Gets the media type of an event stream for the protocol.

<p>By default, this method returns the binary AWS event stream
media type, {@code application/vnd.amazon.eventstream}.

@param context Conversion context.
@param info Event stream info to provide the media type for.
@return Returns the media type of the event stream.
smithy-openapi/src/main/java/software/amazon/smithy/openapi/fromsmithy/protocols/AbstractRestProtocol.java