@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreatePolicyResult == false) return false; CreatePolicyResult other = (CreatePolicyResult) obj; if (other.getPolicy() == null ^ this.getPolicy() == null) return false; if (other.getPolicy() != null && other.getPolicy().equals(this.getPolicy()) == false) return false; return true; }
/** * <p> * A structure containing details about the new policy. * </p> * * @param policy * A structure containing details about the new policy. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePolicyResult withPolicy(Policy policy) { setPolicy(policy); return this; }
public CreatePolicyResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreatePolicyResult createPolicyResult = new CreatePolicyResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createPolicyResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Policy", targetDepth)) { createPolicyResult.setPolicy(PolicyStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createPolicyResult; } } } }
public CreatePolicyResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreatePolicyResult createPolicyResult = new CreatePolicyResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createPolicyResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Policy", targetDepth)) { createPolicyResult.setPolicy(PolicyStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createPolicyResult; } } } }
/** * <p> * A structure containing details about the new policy. * </p> * * @param policy * A structure containing details about the new policy. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePolicyResult withPolicy(Policy policy) { setPolicy(policy); 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 (getPolicy() != null) sb.append("Policy: ").append(getPolicy()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreatePolicyResult == false) return false; CreatePolicyResult other = (CreatePolicyResult) obj; if (other.getPolicy() == null ^ this.getPolicy() == null) return false; if (other.getPolicy() != null && other.getPolicy().equals(this.getPolicy()) == false) return false; return true; }
/** * 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 (getPolicy() != null) sb.append("Policy: ").append(getPolicy()); sb.append("}"); return sb.toString(); }
.withPolicyName(policyName)); log_.debug("Created policy " + result.getPolicy().getArn());