code: public void marshall(Rule rule, ProtocolMarshaller protocolMarshaller) {
  
          if (rule == null) {
              throw new SdkClientException("Invalid argument passed to marshall(...)");
          }
  
          try {
              protocolMarshaller.marshall(rule.getName(), NAME_BINDING);
              protocolMarshaller.marshall(rule.getArn(), ARN_BINDING);
              protocolMarshaller.marshall(rule.getEventPattern(), EVENTPATTERN_BINDING);
              protocolMarshaller.marshall(rule.getState(), STATE_BINDING);
              protocolMarshaller.marshall(rule.getDescription(), DESCRIPTION_BINDING);
              protocolMarshaller.marshall(rule.getScheduleExpression(), SCHEDULEEXPRESSION_BINDING);
              protocolMarshaller.marshall(rule.getRoleArn(), ROLEARN_BINDING);
              protocolMarshaller.marshall(rule.getManagedBy(), MANAGEDBY_BINDING);
          } catch (Exception e) {
              throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
          }
      }
docs: Marshall the given parameter object.