private List<ValidationEvent> validateResource(Model model, ResourceShape resource) {
        List<ValidationEvent> events = new ArrayList<>();

        // Note: Whether or not these use a valid bindings is validated in ResourceIdentifierBindingValidator.
        resource.getPut().flatMap(model::getShape).flatMap(Shape::asOperationShape).ifPresent(operation -> {
            validateReadonly(resource, operation, "put", false).ifPresent(events::add);
            validateIdempotent(resource, operation, "put", "").ifPresent(events::add);
        });

        resource.getCreate().flatMap(model::getShape).flatMap(Shape::asOperationShape).ifPresent(operation -> {
            validateReadonly(resource, operation, "create", false).ifPresent(events::add);
        });

        resource.getRead().flatMap(model::getShape).flatMap(Shape::asOperationShape).ifPresent(operation -> {
            validateReadonly(resource, operation, "read", true).ifPresent(events::add);
        });

        resource.getUpdate().flatMap(model::getShape).flatMap(Shape::asOperationShape).ifPresent(operation -> {
            validateReadonly(resource, operation, "update", false).ifPresent(events::add);
        });

        resource.getDelete().flatMap(model::getShape).flatMap(Shape::asOperationShape).ifPresent(operation -> {
            validateReadonly(resource, operation, "delete", false).ifPresent(events::add);
            validateIdempotent(resource, operation, "delete", "").ifPresent(events::add);
        });

        resource.getList().flatMap(model::getShape).flatMap(Shape::asOperationShape).ifPresent(operation -> {
            validateReadonly(resource, operation, "list", true).ifPresent(events::add);
        });

        return events;
    }
Validates that resource are applied appropriately to resources.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/ResourceLifecycleValidator.java