public Request<DeletePipelineRequest> marshall(DeletePipelineRequest deletePipelineRequest) { if (deletePipelineRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<DeletePipelineRequest> request = new DefaultRequest<DeletePipelineRequest>(deletePipelineRequest, "AWSCodePipeline"); request.addHeader("X-Amz-Target", "CodePipeline_20150709.DeletePipeline"); request.setHttpMethod(HttpMethodName.POST); request.setResourcePath(""); try { final StructuredJsonGenerator jsonGenerator = protocolFactory.createGenerator(); jsonGenerator.writeStartObject(); if (deletePipelineRequest.getName() != null) { jsonGenerator.writeFieldName("name").writeValue(deletePipelineRequest.getName()); } jsonGenerator.writeEndObject(); byte[] content = jsonGenerator.getBytes(); request.setContent(new ByteArrayInputStream(content)); request.addHeader("Content-Length", Integer.toString(content.length)); request.addHeader("Content-Type", protocolFactory.getContentType()); } catch (Throwable t) { throw new SdkClientException("Unable to marshall request to JSON: " + t.getMessage(), t); } return request; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeletePipelineRequest == false) return false; DeletePipelineRequest other = (DeletePipelineRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; return true; }