Пример #1
0
  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;

    if (obj instanceof InitiateJobResult == false) return false;
    InitiateJobResult other = (InitiateJobResult) obj;

    if (other.getLocation() == null ^ this.getLocation() == null) return false;
    if (other.getLocation() != null && other.getLocation().equals(this.getLocation()) == false)
      return false;
    if (other.getJobId() == null ^ this.getJobId() == null) return false;
    if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == false) return false;
    return true;
  }
  public InitiateJobResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    InitiateJobResult initiateJobResult = new InitiateJobResult();

    if (context.isStartOfDocument()) {
      if (context.getHeader("Location") != null) {
        context.setCurrentHeader("Location");
        initiateJobResult.setLocation(context.getUnmarshaller(String.class).unmarshall(context));
      }
      if (context.getHeader("x-amz-job-id") != null) {
        context.setCurrentHeader("x-amz-job-id");
        initiateJobResult.setJobId(context.getUnmarshaller(String.class).unmarshall(context));
      }
    }

    return initiateJobResult;
  }