public Request<CreateRuleRequest> marshall(CreateRuleRequest createRuleRequest) { if (createRuleRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { final ProtocolRequestMarshaller<CreateRuleRequest> protocolMarshaller = protocolFactory.createProtocolMarshaller(SDK_OPERATION_BINDING, createRuleRequest); protocolMarshaller.startMarshalling(); CreateRuleRequestMarshaller.getInstance().marshall(createRuleRequest, protocolMarshaller); return protocolMarshaller.finishMarshalling(); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }