code: public void marshall(PollForTaskRequest pollForTaskRequest, ProtocolMarshaller protocolMarshaller) {
  
          if (pollForTaskRequest == null) {
              throw new SdkClientException("Invalid argument passed to marshall(...)");
          }
  
          try {
              protocolMarshaller.marshall(pollForTaskRequest.getWorkerGroup(), WORKERGROUP_BINDING);
              protocolMarshaller.marshall(pollForTaskRequest.getHostname(), HOSTNAME_BINDING);
              protocolMarshaller.marshall(pollForTaskRequest.getInstanceIdentity(), INSTANCEIDENTITY_BINDING);
          } catch (Exception e) {
              throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
          }
      }
docs: Marshall the given parameter object.