public Optional<String> determineResponseContentType(
            ToShapeId operationOrError,
            String documentContentType,
            String eventStreamContentType
    ) {
        Collection<HttpBinding> bindings = getResponseBindings(operationOrError).values();
        return Optional.ofNullable(determineContentType(bindings, documentContentType, eventStreamContentType));
    }
Returns the expected response Content-Type of the given operation
or error.

<p>If members are sent in the "document" body, then the default
{@code documentContentType} value is returned. If a member is bound
to the payload, then the following checks are made:

<ul>
    <li>If the payload has the {@link StreamingTrait}, then the
    {@code eventStreamContentType} is returned.</li>
    <li>If the targeted shape is a structure or document type, then
    the {@code documentContentType} is returned.</li>
    <li>If the targeted shape has the {@link MediaTypeTrait}, then
    the value of the trait is returned.</li>
    <li>If the targeted shape is a blob, then "application/octet-stream"
    is returned.</li>
    <li>If the targeted shape is a string, then "text/plain" is
    returned.</li>
</ul>

<p>If no members are sent in the payload, an empty Optional is
returned.

@param operationOrError Operation or error to determine the content-type of.
@param documentContentType Content-Type to use for protocol documents.
@param eventStreamContentType Content-Type used for event streams.
@return Returns the optionally resolved content-type of the response.
smithy-model/src/main/java/software/amazon/smithy/model/knowledge/HttpBindingIndex.java