/** * 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 (getLayerDigest() != null) sb.append("LayerDigest: ").append(getLayerDigest()).append(","); if (getLayerAvailability() != null) sb.append("LayerAvailability: ").append(getLayerAvailability()).append(","); if (getLayerSize() != null) sb.append("LayerSize: ").append(getLayerSize()).append(","); if (getMediaType() != null) sb.append("MediaType: ").append(getMediaType()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLayerDigest() == null) ? 0 : getLayerDigest().hashCode()); hashCode = prime * hashCode + ((getLayerAvailability() == null) ? 0 : getLayerAvailability().hashCode()); hashCode = prime * hashCode + ((getLayerSize() == null) ? 0 : getLayerSize().hashCode()); hashCode = prime * hashCode + ((getMediaType() == null) ? 0 : getMediaType().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Layer == false) return false; Layer other = (Layer) obj; if (other.getLayerDigest() == null ^ this.getLayerDigest() == null) return false; if (other.getLayerDigest() != null && other.getLayerDigest().equals(this.getLayerDigest()) == false) return false; if (other.getLayerAvailability() == null ^ this.getLayerAvailability() == null) return false; if (other.getLayerAvailability() != null && other.getLayerAvailability().equals(this.getLayerAvailability()) == false) return false; if (other.getLayerSize() == null ^ this.getLayerSize() == null) return false; if (other.getLayerSize() != null && other.getLayerSize().equals(this.getLayerSize()) == false) return false; if (other.getMediaType() == null ^ this.getMediaType() == null) return false; if (other.getMediaType() != null && other.getMediaType().equals(this.getMediaType()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(Layer layer, ProtocolMarshaller protocolMarshaller) { if (layer == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(layer.getLayerDigest(), LAYERDIGEST_BINDING); protocolMarshaller.marshall(layer.getLayerAvailability(), LAYERAVAILABILITY_BINDING); protocolMarshaller.marshall(layer.getLayerSize(), LAYERSIZE_BINDING); protocolMarshaller.marshall(layer.getMediaType(), MEDIATYPE_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 + ((getLayerDigest() == null) ? 0 : getLayerDigest().hashCode()); hashCode = prime * hashCode + ((getLayerAvailability() == null) ? 0 : getLayerAvailability().hashCode()); hashCode = prime * hashCode + ((getLayerSize() == null) ? 0 : getLayerSize().hashCode()); hashCode = prime * hashCode + ((getMediaType() == null) ? 0 : getMediaType().hashCode()); return hashCode; }
/** * 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 (getLayerDigest() != null) sb.append("LayerDigest: ").append(getLayerDigest()).append(","); if (getLayerAvailability() != null) sb.append("LayerAvailability: ").append(getLayerAvailability()).append(","); if (getLayerSize() != null) sb.append("LayerSize: ").append(getLayerSize()).append(","); if (getMediaType() != null) sb.append("MediaType: ").append(getMediaType()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Layer == false) return false; Layer other = (Layer) obj; if (other.getLayerDigest() == null ^ this.getLayerDigest() == null) return false; if (other.getLayerDigest() != null && other.getLayerDigest().equals(this.getLayerDigest()) == false) return false; if (other.getLayerAvailability() == null ^ this.getLayerAvailability() == null) return false; if (other.getLayerAvailability() != null && other.getLayerAvailability().equals(this.getLayerAvailability()) == false) return false; if (other.getLayerSize() == null ^ this.getLayerSize() == null) return false; if (other.getLayerSize() != null && other.getLayerSize().equals(this.getLayerSize()) == false) return false; if (other.getMediaType() == null ^ this.getMediaType() == null) return false; if (other.getMediaType() != null && other.getMediaType().equals(this.getMediaType()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(Layer layer, ProtocolMarshaller protocolMarshaller) { if (layer == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(layer.getLayerDigest(), LAYERDIGEST_BINDING); protocolMarshaller.marshall(layer.getLayerAvailability(), LAYERAVAILABILITY_BINDING); protocolMarshaller.marshall(layer.getLayerSize(), LAYERSIZE_BINDING); protocolMarshaller.marshall(layer.getMediaType(), MEDIATYPE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }