@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReplicaUpdate == false) return false; ReplicaUpdate other = (ReplicaUpdate) obj; if (other.getCreate() == null ^ this.getCreate() == null) return false; if (other.getCreate() != null && other.getCreate().equals(this.getCreate()) == false) return false; if (other.getDelete() == null ^ this.getDelete() == null) return false; if (other.getDelete() != null && other.getDelete().equals(this.getDelete()) == false) return false; return true; }
/** * <p> * The parameters required for creating a replica on an existing global table. * </p> * * @param create * The parameters required for creating a replica on an existing global table. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicaUpdate withCreate(CreateReplicaAction create) { setCreate(create); return this; }
/** * <p> * The name of the existing replica to be removed. * </p> * * @param delete * The name of the existing replica to be removed. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicaUpdate withDelete(DeleteReplicaAction delete) { setDelete(delete); return this; }
public ReplicaUpdate unmarshall(JsonUnmarshallerContext context) throws Exception { ReplicaUpdate replicaUpdate = new ReplicaUpdate(); if (context.testExpression("Create", targetDepth)) { context.nextToken(); replicaUpdate.setCreate(CreateReplicaActionJsonUnmarshaller.getInstance().unmarshall(context)); replicaUpdate.setDelete(DeleteReplicaActionJsonUnmarshaller.getInstance().unmarshall(context));
public ReplicaUpdate unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } ReplicaUpdate replicaUpdate = new ReplicaUpdate(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Create")) { replicaUpdate.setCreate(CreateReplicaActionJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Delete")) { replicaUpdate.setDelete(DeleteReplicaActionJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return replicaUpdate; }
public ReplicaUpdate unmarshall(JsonUnmarshallerContext context) throws Exception { ReplicaUpdate replicaUpdate = new ReplicaUpdate(); if (context.testExpression("Create", targetDepth)) { context.nextToken(); replicaUpdate.setCreate(CreateReplicaActionJsonUnmarshaller.getInstance().unmarshall(context)); replicaUpdate.setDelete(DeleteReplicaActionJsonUnmarshaller.getInstance().unmarshall(context));
/** * <p> * The name of the existing replica to be removed. * </p> * * @param delete * The name of the existing replica to be removed. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicaUpdate withDelete(DeleteReplicaAction delete) { setDelete(delete); return this; }
/** * <p> * The parameters required for creating a replica on an existing global table. * </p> * * @param create * The parameters required for creating a replica on an existing global table. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicaUpdate withCreate(CreateReplicaAction create) { setCreate(create); 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 (getCreate() != null) sb.append("Create: ").append(getCreate()).append(","); if (getDelete() != null) sb.append("Delete: ").append(getDelete()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(ReplicaUpdate replicaUpdate, ProtocolMarshaller protocolMarshaller) { if (replicaUpdate == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(replicaUpdate.getCreate(), CREATE_BINDING); protocolMarshaller.marshall(replicaUpdate.getDelete(), DELETE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReplicaUpdate == false) return false; ReplicaUpdate other = (ReplicaUpdate) obj; if (other.getCreate() == null ^ this.getCreate() == null) return false; if (other.getCreate() != null && other.getCreate().equals(this.getCreate()) == false) return false; if (other.getDelete() == null ^ this.getDelete() == null) return false; if (other.getDelete() != null && other.getDelete().equals(this.getDelete()) == 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 (getCreate() != null) sb.append("Create: " + getCreate() + ","); if (getDelete() != null) sb.append("Delete: " + getDelete()); sb.append("}"); return sb.toString(); }
public void marshall(ReplicaUpdate replicaUpdate, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (replicaUpdate.getCreate() != null) { CreateReplicaAction create = replicaUpdate.getCreate(); jsonWriter.name("Create"); CreateReplicaActionJsonMarshaller.getInstance().marshall(create, jsonWriter); } if (replicaUpdate.getDelete() != null) { DeleteReplicaAction delete = replicaUpdate.getDelete(); jsonWriter.name("Delete"); DeleteReplicaActionJsonMarshaller.getInstance().marshall(delete, jsonWriter); } jsonWriter.endObject(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReplicaUpdate == false) return false; ReplicaUpdate other = (ReplicaUpdate) obj; if (other.getCreate() == null ^ this.getCreate() == null) return false; if (other.getCreate() != null && other.getCreate().equals(this.getCreate()) == false) return false; if (other.getDelete() == null ^ this.getDelete() == null) return false; if (other.getDelete() != null && other.getDelete().equals(this.getDelete()) == 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 (getCreate() != null) sb.append("Create: ").append(getCreate()).append(","); if (getDelete() != null) sb.append("Delete: ").append(getDelete()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(ReplicaUpdate replicaUpdate, ProtocolMarshaller protocolMarshaller) { if (replicaUpdate == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(replicaUpdate.getCreate(), CREATE_BINDING); protocolMarshaller.marshall(replicaUpdate.getDelete(), DELETE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }