@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPolicyName() == null) ? 0 : getPolicyName().hashCode()); hashCode = prime * hashCode + ((getPolicyVersionId() == null) ? 0 : getPolicyVersionId().hashCode()); return hashCode; }
/** * <p> * The name of the policy. * </p> * * @param policyName * The name of the policy. * @return Returns a reference to this object so that method calls can be chained together. */ public DeletePolicyVersionRequest withPolicyName(String policyName) { setPolicyName(policyName); return this; }
/** * <p> * The policy version ID. * </p> * * @param policyVersionId * The policy version ID. * @return Returns a reference to this object so that method calls can be chained together. */ public DeletePolicyVersionRequest withPolicyVersionId(String policyVersionId) { setPolicyVersionId(policyVersionId); return this; }
withPolicyName(policy)).getPolicyVersions()) { if (!p.isDefaultVersion()) { getClient().deletePolicyVersion(new DeletePolicyVersionRequest(). withPolicyName(policy).withPolicyVersionId(p.getVersionId()));
withPolicyName(policy)).getPolicyVersions()) { if (!p.isDefaultVersion()) { getClient().deletePolicyVersion(new DeletePolicyVersionRequest(). withPolicyName(policy).withPolicyVersionId(p.getVersionId()));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeletePolicyVersionRequest == false) return false; DeletePolicyVersionRequest other = (DeletePolicyVersionRequest) obj; if (other.getPolicyName() == null ^ this.getPolicyName() == null) return false; if (other.getPolicyName() != null && other.getPolicyName().equals(this.getPolicyName()) == false) return false; if (other.getPolicyVersionId() == null ^ this.getPolicyVersionId() == null) return false; if (other.getPolicyVersionId() != null && other.getPolicyVersionId().equals(this.getPolicyVersionId()) == false) return false; return true; }
/** * <p> * The name of the policy. * </p> * * @param policyName * The name of the policy. * @return Returns a reference to this object so that method calls can be chained together. */ public DeletePolicyVersionRequest withPolicyName(String policyName) { setPolicyName(policyName); return this; }
/** * <p> * The policy version ID. * </p> * * @param policyVersionId * The policy version ID. * @return Returns a reference to this object so that method calls can be chained together. */ public DeletePolicyVersionRequest withPolicyVersionId(String policyVersionId) { setPolicyVersionId(policyVersionId); return this; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPolicyName() != null) sb.append("PolicyName: ").append(getPolicyName()).append(","); if (getPolicyVersionId() != null) sb.append("PolicyVersionId: ").append(getPolicyVersionId()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(DeletePolicyVersionRequest deletePolicyVersionRequest, ProtocolMarshaller protocolMarshaller) { if (deletePolicyVersionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deletePolicyVersionRequest.getPolicyName(), POLICYNAME_BINDING); protocolMarshaller.marshall(deletePolicyVersionRequest.getPolicyVersionId(), POLICYVERSIONID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPolicyName() == null) ? 0 : getPolicyName().hashCode()); hashCode = prime * hashCode + ((getPolicyVersionId() == null) ? 0 : getPolicyVersionId().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeletePolicyVersionRequest == false) return false; DeletePolicyVersionRequest other = (DeletePolicyVersionRequest) obj; if (other.getPolicyName() == null ^ this.getPolicyName() == null) return false; if (other.getPolicyName() != null && other.getPolicyName().equals(this.getPolicyName()) == false) return false; if (other.getPolicyVersionId() == null ^ this.getPolicyVersionId() == null) return false; if (other.getPolicyVersionId() != null && other.getPolicyVersionId().equals(this.getPolicyVersionId()) == false) return false; return true; } }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPolicyName() != null) sb.append("policyName: " + getPolicyName() + ","); if (getPolicyVersionId() != null) sb.append("policyVersionId: " + getPolicyVersionId()); sb.append("}"); return sb.toString(); }
public Request<DeletePolicyVersionRequest> marshall( DeletePolicyVersionRequest deletePolicyVersionRequest) { if (deletePolicyVersionRequest == null) { throw new AmazonClientException( "Invalid argument passed to marshall(DeletePolicyVersionRequest)"); } Request<DeletePolicyVersionRequest> request = new DefaultRequest<DeletePolicyVersionRequest>( deletePolicyVersionRequest, "AWSIot"); request.setHttpMethod(HttpMethodName.DELETE); String uriResourcePath = "/policies/{policyName}/version/{policyVersionId}"; uriResourcePath = uriResourcePath.replace( "{policyName}", (deletePolicyVersionRequest.getPolicyName() == null) ? "" : StringUtils .fromString(deletePolicyVersionRequest.getPolicyName())); uriResourcePath = uriResourcePath.replace( "{policyVersionId}", (deletePolicyVersionRequest.getPolicyVersionId() == null) ? "" : StringUtils .fromString(deletePolicyVersionRequest.getPolicyVersionId())); request.setResourcePath(uriResourcePath); if (!request.getHeaders().containsKey("Content-Type")) { request.addHeader("Content-Type", "application/x-amz-json-1.0"); } return request; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPolicyName() == null) ? 0 : getPolicyName().hashCode()); hashCode = prime * hashCode + ((getPolicyVersionId() == null) ? 0 : getPolicyVersionId().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPolicyName() == null) ? 0 : getPolicyName().hashCode()); hashCode = prime * hashCode + ((getPolicyVersionId() == null) ? 0 : getPolicyVersionId().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeletePolicyVersionRequest == false) return false; DeletePolicyVersionRequest other = (DeletePolicyVersionRequest) obj; if (other.getPolicyName() == null ^ this.getPolicyName() == null) return false; if (other.getPolicyName() != null && other.getPolicyName().equals(this.getPolicyName()) == false) return false; if (other.getPolicyVersionId() == null ^ this.getPolicyVersionId() == null) return false; if (other.getPolicyVersionId() != null && other.getPolicyVersionId().equals(this.getPolicyVersionId()) == false) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeletePolicyVersionRequest == false) return false; DeletePolicyVersionRequest other = (DeletePolicyVersionRequest) obj; if (other.getPolicyName() == null ^ this.getPolicyName() == null) return false; if (other.getPolicyName() != null && other.getPolicyName().equals(this.getPolicyName()) == false) return false; if (other.getPolicyVersionId() == null ^ this.getPolicyVersionId() == null) return false; if (other.getPolicyVersionId() != null && other.getPolicyVersionId().equals(this.getPolicyVersionId()) == false) return false; return true; } }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPolicyName() != null) sb.append("policyName: " + getPolicyName() + ","); if (getPolicyVersionId() != null) sb.append("policyVersionId: " + getPolicyVersionId()); sb.append("}"); return sb.toString(); }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPolicyName() != null) sb.append("PolicyName: ").append(getPolicyName()).append(","); if (getPolicyVersionId() != null) sb.append("PolicyVersionId: ").append(getPolicyVersionId()); sb.append("}"); return sb.toString(); }