com.amazonaws.services.kinesis.model.Record.getEncryptionType()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(8.6k)|赞(0)|评价(0)|浏览(74)

本文整理了Java中com.amazonaws.services.kinesis.model.Record.getEncryptionType方法的一些代码示例,展示了Record.getEncryptionType的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Record.getEncryptionType方法的具体详情如下:
包路径:com.amazonaws.services.kinesis.model.Record
类名称:Record
方法名:getEncryptionType

Record.getEncryptionType介绍

[英]The encryption type used on the record. This parameter can be one of the following values:

  • NONE: Do not encrypt the records in the stream.
  • KMS: Use server-side encryption on the records in the stream using a customer-managed AWS KMS key.
    [中]记录上使用的加密类型。此参数可以是以下值之一:
    *NONE:不加密流中的记录。
    *KMS:使用客户管理的AWS KMS密钥对流中的记录使用服务器端加密。

代码示例

代码示例来源:origin: aws/aws-sdk-java

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getSequenceNumber() == null) ? 0 : getSequenceNumber().hashCode());
  hashCode = prime * hashCode + ((getApproximateArrivalTimestamp() == null) ? 0 : getApproximateArrivalTimestamp().hashCode());
  hashCode = prime * hashCode + ((getData() == null) ? 0 : getData().hashCode());
  hashCode = prime * hashCode + ((getPartitionKey() == null) ? 0 : getPartitionKey().hashCode());
  hashCode = prime * hashCode + ((getEncryptionType() == null) ? 0 : getEncryptionType().hashCode());
  return hashCode;
}

代码示例来源:origin: aws/aws-sdk-java

/**
 * 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 (getSequenceNumber() != null)
    sb.append("SequenceNumber: ").append(getSequenceNumber()).append(",");
  if (getApproximateArrivalTimestamp() != null)
    sb.append("ApproximateArrivalTimestamp: ").append(getApproximateArrivalTimestamp()).append(",");
  if (getData() != null)
    sb.append("Data: ").append(getData()).append(",");
  if (getPartitionKey() != null)
    sb.append("PartitionKey: ").append(getPartitionKey()).append(",");
  if (getEncryptionType() != null)
    sb.append("EncryptionType: ").append(getEncryptionType());
  sb.append("}");
  return sb.toString();
}

代码示例来源:origin: aws/aws-sdk-java

if (other.getPartitionKey() != null && other.getPartitionKey().equals(this.getPartitionKey()) == false)
  return false;
if (other.getEncryptionType() == null ^ this.getEncryptionType() == null)
  return false;
if (other.getEncryptionType() != null && other.getEncryptionType().equals(this.getEncryptionType()) == false)
  return false;
return true;

代码示例来源:origin: aws/aws-sdk-java

/**
 * Marshall the given parameter object.
 */
public void marshall(Record record, ProtocolMarshaller protocolMarshaller) {
  if (record == null) {
    throw new SdkClientException("Invalid argument passed to marshall(...)");
  }
  try {
    protocolMarshaller.marshall(record.getSequenceNumber(), SEQUENCENUMBER_BINDING);
    protocolMarshaller.marshall(record.getApproximateArrivalTimestamp(), APPROXIMATEARRIVALTIMESTAMP_BINDING);
    protocolMarshaller.marshall(record.getData(), DATA_BINDING);
    protocolMarshaller.marshall(record.getPartitionKey(), PARTITIONKEY_BINDING);
    protocolMarshaller.marshall(record.getEncryptionType(), ENCRYPTIONTYPE_BINDING);
  } catch (Exception e) {
    throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
  }
}

代码示例来源:origin: aws-amplify/aws-sdk-android

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode
      + ((getSequenceNumber() == null) ? 0 : getSequenceNumber().hashCode());
  hashCode = prime
      * hashCode
      + ((getApproximateArrivalTimestamp() == null) ? 0
          : getApproximateArrivalTimestamp().hashCode());
  hashCode = prime * hashCode + ((getData() == null) ? 0 : getData().hashCode());
  hashCode = prime * hashCode
      + ((getPartitionKey() == null) ? 0 : getPartitionKey().hashCode());
  hashCode = prime * hashCode
      + ((getEncryptionType() == null) ? 0 : getEncryptionType().hashCode());
  return hashCode;
}

代码示例来源:origin: aws-amplify/aws-sdk-android

/**
 * 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 (getSequenceNumber() != null)
    sb.append("SequenceNumber: " + getSequenceNumber() + ",");
  if (getApproximateArrivalTimestamp() != null)
    sb.append("ApproximateArrivalTimestamp: " + getApproximateArrivalTimestamp() + ",");
  if (getData() != null)
    sb.append("Data: " + getData() + ",");
  if (getPartitionKey() != null)
    sb.append("PartitionKey: " + getPartitionKey() + ",");
  if (getEncryptionType() != null)
    sb.append("EncryptionType: " + getEncryptionType());
  sb.append("}");
  return sb.toString();
}

代码示例来源:origin: aws-amplify/aws-sdk-android

&& other.getPartitionKey().equals(this.getPartitionKey()) == false)
  return false;
if (other.getEncryptionType() == null ^ this.getEncryptionType() == null)
  return false;
if (other.getEncryptionType() != null
    && other.getEncryptionType().equals(this.getEncryptionType()) == false)
  return false;
return true;

代码示例来源:origin: aws-amplify/aws-sdk-android

public void marshall(Record record, AwsJsonWriter jsonWriter) throws Exception {
  jsonWriter.beginObject();
  if (record.getSequenceNumber() != null) {
    String sequenceNumber = record.getSequenceNumber();
    jsonWriter.name("SequenceNumber");
    jsonWriter.value(sequenceNumber);
  }
  if (record.getApproximateArrivalTimestamp() != null) {
    java.util.Date approximateArrivalTimestamp = record.getApproximateArrivalTimestamp();
    jsonWriter.name("ApproximateArrivalTimestamp");
    jsonWriter.value(approximateArrivalTimestamp);
  }
  if (record.getData() != null) {
    java.nio.ByteBuffer data = record.getData();
    jsonWriter.name("Data");
    jsonWriter.value(data);
  }
  if (record.getPartitionKey() != null) {
    String partitionKey = record.getPartitionKey();
    jsonWriter.name("PartitionKey");
    jsonWriter.value(partitionKey);
  }
  if (record.getEncryptionType() != null) {
    String encryptionType = record.getEncryptionType();
    jsonWriter.name("EncryptionType");
    jsonWriter.value(encryptionType);
  }
  jsonWriter.endObject();
}

代码示例来源:origin: com.amazonaws/aws-java-sdk-kinesis

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getSequenceNumber() == null) ? 0 : getSequenceNumber().hashCode());
  hashCode = prime * hashCode + ((getApproximateArrivalTimestamp() == null) ? 0 : getApproximateArrivalTimestamp().hashCode());
  hashCode = prime * hashCode + ((getData() == null) ? 0 : getData().hashCode());
  hashCode = prime * hashCode + ((getPartitionKey() == null) ? 0 : getPartitionKey().hashCode());
  hashCode = prime * hashCode + ((getEncryptionType() == null) ? 0 : getEncryptionType().hashCode());
  return hashCode;
}

代码示例来源:origin: com.amazonaws/aws-java-sdk-kinesis

/**
 * 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 (getSequenceNumber() != null)
    sb.append("SequenceNumber: ").append(getSequenceNumber()).append(",");
  if (getApproximateArrivalTimestamp() != null)
    sb.append("ApproximateArrivalTimestamp: ").append(getApproximateArrivalTimestamp()).append(",");
  if (getData() != null)
    sb.append("Data: ").append(getData()).append(",");
  if (getPartitionKey() != null)
    sb.append("PartitionKey: ").append(getPartitionKey()).append(",");
  if (getEncryptionType() != null)
    sb.append("EncryptionType: ").append(getEncryptionType());
  sb.append("}");
  return sb.toString();
}

代码示例来源:origin: com.amazonaws/aws-java-sdk-kinesis

if (other.getPartitionKey() != null && other.getPartitionKey().equals(this.getPartitionKey()) == false)
  return false;
if (other.getEncryptionType() == null ^ this.getEncryptionType() == null)
  return false;
if (other.getEncryptionType() != null && other.getEncryptionType().equals(this.getEncryptionType()) == false)
  return false;
return true;

代码示例来源:origin: com.amazonaws/aws-java-sdk-kinesis

/**
 * Marshall the given parameter object.
 */
public void marshall(Record record, ProtocolMarshaller protocolMarshaller) {
  if (record == null) {
    throw new SdkClientException("Invalid argument passed to marshall(...)");
  }
  try {
    protocolMarshaller.marshall(record.getSequenceNumber(), SEQUENCENUMBER_BINDING);
    protocolMarshaller.marshall(record.getApproximateArrivalTimestamp(), APPROXIMATEARRIVALTIMESTAMP_BINDING);
    protocolMarshaller.marshall(record.getData(), DATA_BINDING);
    protocolMarshaller.marshall(record.getPartitionKey(), PARTITIONKEY_BINDING);
    protocolMarshaller.marshall(record.getEncryptionType(), ENCRYPTIONTYPE_BINDING);
  } catch (Exception e) {
    throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
  }
}

相关文章