@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStreamName() == null) ? 0 : getStreamName().hashCode()); hashCode = prime * hashCode + ((getEncryptionType() == null) ? 0 : getEncryptionType().hashCode()); hashCode = prime * hashCode + ((getKeyId() == null) ? 0 : getKeyId().hashCode()); return hashCode; }
/** * <p> * The encryption type to use. The only valid value is <code>KMS</code>. * </p> * * @param encryptionType * The encryption type to use. The only valid value is <code>KMS</code>. * @return Returns a reference to this object so that method calls can be chained together. * @see EncryptionType */ public StartStreamEncryptionRequest withEncryptionType(String encryptionType) { setEncryptionType(encryptionType); return this; }
setKeyId(keyId); return this;
/** * <p> * The encryption type to use. The only valid value is <code>KMS</code>. * </p> * * @param encryptionType * The encryption type to use. The only valid value is <code>KMS</code>. * @see EncryptionType */ public void setEncryptionType(EncryptionType encryptionType) { withEncryptionType(encryptionType); }
/** * <p> * The name of the stream for which to start encrypting records. * </p> * * @param streamName * The name of the stream for which to start encrypting records. * @return Returns a reference to this object so that method calls can be chained together. */ public StartStreamEncryptionRequest withStreamName(String streamName) { setStreamName(streamName); return this; }
/** * <p> * The encryption type to use. The only valid value is <code>KMS</code>. * </p> * * @param encryptionType * The encryption type to use. The only valid value is <code>KMS</code>. * @see EncryptionType */ public void setEncryptionType(EncryptionType encryptionType) { withEncryptionType(encryptionType); }
/** * <p> * The name of the stream for which to start encrypting records. * </p> * * @param streamName * The name of the stream for which to start encrypting records. * @return Returns a reference to this object so that method calls can be chained together. */ public StartStreamEncryptionRequest withStreamName(String streamName) { setStreamName(streamName); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartStreamEncryptionRequest == false) return false; StartStreamEncryptionRequest other = (StartStreamEncryptionRequest) obj; if (other.getStreamName() == null ^ this.getStreamName() == null) return false; if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == false) return false; if (other.getEncryptionType() == null ^ this.getEncryptionType() == null) return false; if (other.getEncryptionType() != null && other.getEncryptionType().equals(this.getEncryptionType()) == false) return false; if (other.getKeyId() == null ^ this.getKeyId() == null) return false; if (other.getKeyId() != null && other.getKeyId().equals(this.getKeyId()) == false) return false; return true; }
/** * <p> * The encryption type to use. The only valid value is <code>KMS</code>. * </p> * * @param encryptionType * The encryption type to use. The only valid value is <code>KMS</code>. * @return Returns a reference to this object so that method calls can be chained together. * @see EncryptionType */ public StartStreamEncryptionRequest withEncryptionType(String encryptionType) { setEncryptionType(encryptionType); return this; }
setKeyId(keyId); 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 (getStreamName() != null) sb.append("StreamName: ").append(getStreamName()).append(","); if (getEncryptionType() != null) sb.append("EncryptionType: ").append(getEncryptionType()).append(","); if (getKeyId() != null) sb.append("KeyId: ").append(getKeyId()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(StartStreamEncryptionRequest startStreamEncryptionRequest, ProtocolMarshaller protocolMarshaller) { if (startStreamEncryptionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(startStreamEncryptionRequest.getStreamName(), STREAMNAME_BINDING); protocolMarshaller.marshall(startStreamEncryptionRequest.getEncryptionType(), ENCRYPTIONTYPE_BINDING); protocolMarshaller.marshall(startStreamEncryptionRequest.getKeyId(), KEYID_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 + ((getStreamName() == null) ? 0 : getStreamName().hashCode()); hashCode = prime * hashCode + ((getEncryptionType() == null) ? 0 : getEncryptionType().hashCode()); hashCode = prime * hashCode + ((getKeyId() == null) ? 0 : getKeyId().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartStreamEncryptionRequest == false) return false; StartStreamEncryptionRequest other = (StartStreamEncryptionRequest) obj; if (other.getStreamName() == null ^ this.getStreamName() == null) return false; if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == false) return false; if (other.getEncryptionType() == null ^ this.getEncryptionType() == null) return false; if (other.getEncryptionType() != null && other.getEncryptionType().equals(this.getEncryptionType()) == false) return false; if (other.getKeyId() == null ^ this.getKeyId() == null) return false; if (other.getKeyId() != null && other.getKeyId().equals(this.getKeyId()) == 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 (getStreamName() != null) sb.append("StreamName: " + getStreamName() + ","); if (getEncryptionType() != null) sb.append("EncryptionType: " + getEncryptionType() + ","); if (getKeyId() != null) sb.append("KeyId: " + getKeyId()); sb.append("}"); return sb.toString(); }
jsonWriter.beginObject(); if (startStreamEncryptionRequest.getStreamName() != null) { String streamName = startStreamEncryptionRequest.getStreamName(); jsonWriter.name("StreamName"); jsonWriter.value(streamName); if (startStreamEncryptionRequest.getEncryptionType() != null) { String encryptionType = startStreamEncryptionRequest.getEncryptionType(); jsonWriter.name("EncryptionType"); jsonWriter.value(encryptionType); if (startStreamEncryptionRequest.getKeyId() != null) { String keyId = startStreamEncryptionRequest.getKeyId(); jsonWriter.name("KeyId"); jsonWriter.value(keyId);
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStreamName() == null) ? 0 : getStreamName().hashCode()); hashCode = prime * hashCode + ((getEncryptionType() == null) ? 0 : getEncryptionType().hashCode()); hashCode = prime * hashCode + ((getKeyId() == null) ? 0 : getKeyId().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartStreamEncryptionRequest == false) return false; StartStreamEncryptionRequest other = (StartStreamEncryptionRequest) obj; if (other.getStreamName() == null ^ this.getStreamName() == null) return false; if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == false) return false; if (other.getEncryptionType() == null ^ this.getEncryptionType() == null) return false; if (other.getEncryptionType() != null && other.getEncryptionType().equals(this.getEncryptionType()) == false) return false; if (other.getKeyId() == null ^ this.getKeyId() == null) return false; if (other.getKeyId() != null && other.getKeyId().equals(this.getKeyId()) == 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 (getStreamName() != null) sb.append("StreamName: ").append(getStreamName()).append(","); if (getEncryptionType() != null) sb.append("EncryptionType: ").append(getEncryptionType()).append(","); if (getKeyId() != null) sb.append("KeyId: ").append(getKeyId()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(StartStreamEncryptionRequest startStreamEncryptionRequest, ProtocolMarshaller protocolMarshaller) { if (startStreamEncryptionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(startStreamEncryptionRequest.getStreamName(), STREAMNAME_BINDING); protocolMarshaller.marshall(startStreamEncryptionRequest.getEncryptionType(), ENCRYPTIONTYPE_BINDING); protocolMarshaller.marshall(startStreamEncryptionRequest.getKeyId(), KEYID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }