public static Optional<? extends Trait> getOperationMqttTrait(Shape operation) {
        if (operation.hasTrait(PublishTrait.ID)) {
            return operation.getTrait(PublishTrait.class);
        } else if (operation.hasTrait(SubscribeTrait.ID)) {
            return operation.getTrait(SubscribeTrait.class);
        } else {
            return Optional.empty();
        }
    }
Finds the MQTT binding trait associated with an operation.

@param operation Operation to check.
@return Returns the optionally found MQTT binding trait.
smithy-mqtt-traits/src/main/java/software/amazon/smithy/mqtt/traits/TopicBinding.java