All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.crypto.tink.proto.Keyset Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: proto/tink.proto

package com.google.crypto.tink.proto;

/**
 * 
 * A Tink user works usually not with single keys, but with keysets,
 * to enable key rotation.  The keys in a keyset can belong to different
 * implementations/key types, but must all implement the same primitive.
 * Any given keyset (and any given key) can be used for one primitive only.
 * 
* * Protobuf type {@code google.crypto.tink.Keyset} */ public final class Keyset extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.crypto.tink.Keyset) KeysetOrBuilder { private static final long serialVersionUID = 0L; // Use Keyset.newBuilder() to construct. private Keyset(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Keyset() { primaryKeyId_ = 0; key_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Keyset( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { primaryKeyId_ = input.readUInt32(); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { key_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } key_.add( input.readMessage(com.google.crypto.tink.proto.Keyset.Key.parser(), extensionRegistry)); break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { key_ = java.util.Collections.unmodifiableList(key_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_Keyset_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_Keyset_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.crypto.tink.proto.Keyset.class, com.google.crypto.tink.proto.Keyset.Builder.class); } public interface KeyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.crypto.tink.Keyset.Key) com.google.protobuf.MessageOrBuilder { /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; */ boolean hasKeyData(); /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; */ com.google.crypto.tink.proto.KeyData getKeyData(); /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; */ com.google.crypto.tink.proto.KeyDataOrBuilder getKeyDataOrBuilder(); /** * .google.crypto.tink.KeyStatusType status = 2; */ int getStatusValue(); /** * .google.crypto.tink.KeyStatusType status = 2; */ com.google.crypto.tink.proto.KeyStatusType getStatus(); /** *
     * Identifies a key within a keyset, is a part of metadata
     * of a ciphertext/signature.
     * 
* * uint32 key_id = 3; */ int getKeyId(); /** *
     * Determines the prefix of the ciphertexts/signatures produced by this key.
     * This value is copied verbatim from the key template.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; */ int getOutputPrefixTypeValue(); /** *
     * Determines the prefix of the ciphertexts/signatures produced by this key.
     * This value is copied verbatim from the key template.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; */ com.google.crypto.tink.proto.OutputPrefixType getOutputPrefixType(); } /** * Protobuf type {@code google.crypto.tink.Keyset.Key} */ public static final class Key extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.crypto.tink.Keyset.Key) KeyOrBuilder { private static final long serialVersionUID = 0L; // Use Key.newBuilder() to construct. private Key(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Key() { status_ = 0; keyId_ = 0; outputPrefixType_ = 0; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Key( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { com.google.crypto.tink.proto.KeyData.Builder subBuilder = null; if (keyData_ != null) { subBuilder = keyData_.toBuilder(); } keyData_ = input.readMessage(com.google.crypto.tink.proto.KeyData.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(keyData_); keyData_ = subBuilder.buildPartial(); } break; } case 16: { int rawValue = input.readEnum(); status_ = rawValue; break; } case 24: { keyId_ = input.readUInt32(); break; } case 32: { int rawValue = input.readEnum(); outputPrefixType_ = rawValue; break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_Keyset_Key_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_Keyset_Key_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.crypto.tink.proto.Keyset.Key.class, com.google.crypto.tink.proto.Keyset.Key.Builder.class); } public static final int KEY_DATA_FIELD_NUMBER = 1; private com.google.crypto.tink.proto.KeyData keyData_; /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; */ public boolean hasKeyData() { return keyData_ != null; } /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; */ public com.google.crypto.tink.proto.KeyData getKeyData() { return keyData_ == null ? com.google.crypto.tink.proto.KeyData.getDefaultInstance() : keyData_; } /** *
     * Contains the actual, instantiation specific key proto.
     * By convention, each key proto contains a version field.
     * 
* * .google.crypto.tink.KeyData key_data = 1; */ public com.google.crypto.tink.proto.KeyDataOrBuilder getKeyDataOrBuilder() { return getKeyData(); } public static final int STATUS_FIELD_NUMBER = 2; private int status_; /** * .google.crypto.tink.KeyStatusType status = 2; */ public int getStatusValue() { return status_; } /** * .google.crypto.tink.KeyStatusType status = 2; */ public com.google.crypto.tink.proto.KeyStatusType getStatus() { @SuppressWarnings("deprecation") com.google.crypto.tink.proto.KeyStatusType result = com.google.crypto.tink.proto.KeyStatusType.valueOf(status_); return result == null ? com.google.crypto.tink.proto.KeyStatusType.UNRECOGNIZED : result; } public static final int KEY_ID_FIELD_NUMBER = 3; private int keyId_; /** *
     * Identifies a key within a keyset, is a part of metadata
     * of a ciphertext/signature.
     * 
* * uint32 key_id = 3; */ public int getKeyId() { return keyId_; } public static final int OUTPUT_PREFIX_TYPE_FIELD_NUMBER = 4; private int outputPrefixType_; /** *
     * Determines the prefix of the ciphertexts/signatures produced by this key.
     * This value is copied verbatim from the key template.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; */ public int getOutputPrefixTypeValue() { return outputPrefixType_; } /** *
     * Determines the prefix of the ciphertexts/signatures produced by this key.
     * This value is copied verbatim from the key template.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; */ public com.google.crypto.tink.proto.OutputPrefixType getOutputPrefixType() { @SuppressWarnings("deprecation") com.google.crypto.tink.proto.OutputPrefixType result = com.google.crypto.tink.proto.OutputPrefixType.valueOf(outputPrefixType_); return result == null ? com.google.crypto.tink.proto.OutputPrefixType.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (keyData_ != null) { output.writeMessage(1, getKeyData()); } if (status_ != com.google.crypto.tink.proto.KeyStatusType.UNKNOWN_STATUS.getNumber()) { output.writeEnum(2, status_); } if (keyId_ != 0) { output.writeUInt32(3, keyId_); } if (outputPrefixType_ != com.google.crypto.tink.proto.OutputPrefixType.UNKNOWN_PREFIX.getNumber()) { output.writeEnum(4, outputPrefixType_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (keyData_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getKeyData()); } if (status_ != com.google.crypto.tink.proto.KeyStatusType.UNKNOWN_STATUS.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, status_); } if (keyId_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(3, keyId_); } if (outputPrefixType_ != com.google.crypto.tink.proto.OutputPrefixType.UNKNOWN_PREFIX.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, outputPrefixType_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.crypto.tink.proto.Keyset.Key)) { return super.equals(obj); } com.google.crypto.tink.proto.Keyset.Key other = (com.google.crypto.tink.proto.Keyset.Key) obj; boolean result = true; result = result && (hasKeyData() == other.hasKeyData()); if (hasKeyData()) { result = result && getKeyData() .equals(other.getKeyData()); } result = result && status_ == other.status_; result = result && (getKeyId() == other.getKeyId()); result = result && outputPrefixType_ == other.outputPrefixType_; result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasKeyData()) { hash = (37 * hash) + KEY_DATA_FIELD_NUMBER; hash = (53 * hash) + getKeyData().hashCode(); } hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + status_; hash = (37 * hash) + KEY_ID_FIELD_NUMBER; hash = (53 * hash) + getKeyId(); hash = (37 * hash) + OUTPUT_PREFIX_TYPE_FIELD_NUMBER; hash = (53 * hash) + outputPrefixType_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset.Key parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.crypto.tink.proto.Keyset.Key parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.crypto.tink.proto.Keyset.Key parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.crypto.tink.proto.Keyset.Key prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code google.crypto.tink.Keyset.Key} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.crypto.tink.Keyset.Key) com.google.crypto.tink.proto.Keyset.KeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_Keyset_Key_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_Keyset_Key_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.crypto.tink.proto.Keyset.Key.class, com.google.crypto.tink.proto.Keyset.Key.Builder.class); } // Construct using com.google.crypto.tink.proto.Keyset.Key.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); if (keyDataBuilder_ == null) { keyData_ = null; } else { keyData_ = null; keyDataBuilder_ = null; } status_ = 0; keyId_ = 0; outputPrefixType_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_Keyset_Key_descriptor; } @java.lang.Override public com.google.crypto.tink.proto.Keyset.Key getDefaultInstanceForType() { return com.google.crypto.tink.proto.Keyset.Key.getDefaultInstance(); } @java.lang.Override public com.google.crypto.tink.proto.Keyset.Key build() { com.google.crypto.tink.proto.Keyset.Key result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.crypto.tink.proto.Keyset.Key buildPartial() { com.google.crypto.tink.proto.Keyset.Key result = new com.google.crypto.tink.proto.Keyset.Key(this); if (keyDataBuilder_ == null) { result.keyData_ = keyData_; } else { result.keyData_ = keyDataBuilder_.build(); } result.status_ = status_; result.keyId_ = keyId_; result.outputPrefixType_ = outputPrefixType_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.crypto.tink.proto.Keyset.Key) { return mergeFrom((com.google.crypto.tink.proto.Keyset.Key)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.crypto.tink.proto.Keyset.Key other) { if (other == com.google.crypto.tink.proto.Keyset.Key.getDefaultInstance()) return this; if (other.hasKeyData()) { mergeKeyData(other.getKeyData()); } if (other.status_ != 0) { setStatusValue(other.getStatusValue()); } if (other.getKeyId() != 0) { setKeyId(other.getKeyId()); } if (other.outputPrefixType_ != 0) { setOutputPrefixTypeValue(other.getOutputPrefixTypeValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.crypto.tink.proto.Keyset.Key parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.crypto.tink.proto.Keyset.Key) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.crypto.tink.proto.KeyData keyData_ = null; private com.google.protobuf.SingleFieldBuilderV3< com.google.crypto.tink.proto.KeyData, com.google.crypto.tink.proto.KeyData.Builder, com.google.crypto.tink.proto.KeyDataOrBuilder> keyDataBuilder_; /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ public boolean hasKeyData() { return keyDataBuilder_ != null || keyData_ != null; } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ public com.google.crypto.tink.proto.KeyData getKeyData() { if (keyDataBuilder_ == null) { return keyData_ == null ? com.google.crypto.tink.proto.KeyData.getDefaultInstance() : keyData_; } else { return keyDataBuilder_.getMessage(); } } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ public Builder setKeyData(com.google.crypto.tink.proto.KeyData value) { if (keyDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } keyData_ = value; onChanged(); } else { keyDataBuilder_.setMessage(value); } return this; } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ public Builder setKeyData( com.google.crypto.tink.proto.KeyData.Builder builderForValue) { if (keyDataBuilder_ == null) { keyData_ = builderForValue.build(); onChanged(); } else { keyDataBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ public Builder mergeKeyData(com.google.crypto.tink.proto.KeyData value) { if (keyDataBuilder_ == null) { if (keyData_ != null) { keyData_ = com.google.crypto.tink.proto.KeyData.newBuilder(keyData_).mergeFrom(value).buildPartial(); } else { keyData_ = value; } onChanged(); } else { keyDataBuilder_.mergeFrom(value); } return this; } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ public Builder clearKeyData() { if (keyDataBuilder_ == null) { keyData_ = null; onChanged(); } else { keyData_ = null; keyDataBuilder_ = null; } return this; } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ public com.google.crypto.tink.proto.KeyData.Builder getKeyDataBuilder() { onChanged(); return getKeyDataFieldBuilder().getBuilder(); } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ public com.google.crypto.tink.proto.KeyDataOrBuilder getKeyDataOrBuilder() { if (keyDataBuilder_ != null) { return keyDataBuilder_.getMessageOrBuilder(); } else { return keyData_ == null ? com.google.crypto.tink.proto.KeyData.getDefaultInstance() : keyData_; } } /** *
       * Contains the actual, instantiation specific key proto.
       * By convention, each key proto contains a version field.
       * 
* * .google.crypto.tink.KeyData key_data = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.crypto.tink.proto.KeyData, com.google.crypto.tink.proto.KeyData.Builder, com.google.crypto.tink.proto.KeyDataOrBuilder> getKeyDataFieldBuilder() { if (keyDataBuilder_ == null) { keyDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.crypto.tink.proto.KeyData, com.google.crypto.tink.proto.KeyData.Builder, com.google.crypto.tink.proto.KeyDataOrBuilder>( getKeyData(), getParentForChildren(), isClean()); keyData_ = null; } return keyDataBuilder_; } private int status_ = 0; /** * .google.crypto.tink.KeyStatusType status = 2; */ public int getStatusValue() { return status_; } /** * .google.crypto.tink.KeyStatusType status = 2; */ public Builder setStatusValue(int value) { status_ = value; onChanged(); return this; } /** * .google.crypto.tink.KeyStatusType status = 2; */ public com.google.crypto.tink.proto.KeyStatusType getStatus() { @SuppressWarnings("deprecation") com.google.crypto.tink.proto.KeyStatusType result = com.google.crypto.tink.proto.KeyStatusType.valueOf(status_); return result == null ? com.google.crypto.tink.proto.KeyStatusType.UNRECOGNIZED : result; } /** * .google.crypto.tink.KeyStatusType status = 2; */ public Builder setStatus(com.google.crypto.tink.proto.KeyStatusType value) { if (value == null) { throw new NullPointerException(); } status_ = value.getNumber(); onChanged(); return this; } /** * .google.crypto.tink.KeyStatusType status = 2; */ public Builder clearStatus() { status_ = 0; onChanged(); return this; } private int keyId_ ; /** *
       * Identifies a key within a keyset, is a part of metadata
       * of a ciphertext/signature.
       * 
* * uint32 key_id = 3; */ public int getKeyId() { return keyId_; } /** *
       * Identifies a key within a keyset, is a part of metadata
       * of a ciphertext/signature.
       * 
* * uint32 key_id = 3; */ public Builder setKeyId(int value) { keyId_ = value; onChanged(); return this; } /** *
       * Identifies a key within a keyset, is a part of metadata
       * of a ciphertext/signature.
       * 
* * uint32 key_id = 3; */ public Builder clearKeyId() { keyId_ = 0; onChanged(); return this; } private int outputPrefixType_ = 0; /** *
       * Determines the prefix of the ciphertexts/signatures produced by this key.
       * This value is copied verbatim from the key template.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; */ public int getOutputPrefixTypeValue() { return outputPrefixType_; } /** *
       * Determines the prefix of the ciphertexts/signatures produced by this key.
       * This value is copied verbatim from the key template.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; */ public Builder setOutputPrefixTypeValue(int value) { outputPrefixType_ = value; onChanged(); return this; } /** *
       * Determines the prefix of the ciphertexts/signatures produced by this key.
       * This value is copied verbatim from the key template.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; */ public com.google.crypto.tink.proto.OutputPrefixType getOutputPrefixType() { @SuppressWarnings("deprecation") com.google.crypto.tink.proto.OutputPrefixType result = com.google.crypto.tink.proto.OutputPrefixType.valueOf(outputPrefixType_); return result == null ? com.google.crypto.tink.proto.OutputPrefixType.UNRECOGNIZED : result; } /** *
       * Determines the prefix of the ciphertexts/signatures produced by this key.
       * This value is copied verbatim from the key template.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; */ public Builder setOutputPrefixType(com.google.crypto.tink.proto.OutputPrefixType value) { if (value == null) { throw new NullPointerException(); } outputPrefixType_ = value.getNumber(); onChanged(); return this; } /** *
       * Determines the prefix of the ciphertexts/signatures produced by this key.
       * This value is copied verbatim from the key template.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; */ public Builder clearOutputPrefixType() { outputPrefixType_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.crypto.tink.Keyset.Key) } // @@protoc_insertion_point(class_scope:google.crypto.tink.Keyset.Key) private static final com.google.crypto.tink.proto.Keyset.Key DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.crypto.tink.proto.Keyset.Key(); } public static com.google.crypto.tink.proto.Keyset.Key getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Key parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Key(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.crypto.tink.proto.Keyset.Key getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int PRIMARY_KEY_ID_FIELD_NUMBER = 1; private int primaryKeyId_; /** *
   * Identifies key used to generate new crypto data (encrypt, sign).
   * Required.
   * 
* * uint32 primary_key_id = 1; */ public int getPrimaryKeyId() { return primaryKeyId_; } public static final int KEY_FIELD_NUMBER = 2; private java.util.List key_; /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public java.util.List getKeyList() { return key_; } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public java.util.List getKeyOrBuilderList() { return key_; } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public int getKeyCount() { return key_.size(); } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public com.google.crypto.tink.proto.Keyset.Key getKey(int index) { return key_.get(index); } /** *
   * Actual keys in the Keyset.
   * Required.
   * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public com.google.crypto.tink.proto.Keyset.KeyOrBuilder getKeyOrBuilder( int index) { return key_.get(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (primaryKeyId_ != 0) { output.writeUInt32(1, primaryKeyId_); } for (int i = 0; i < key_.size(); i++) { output.writeMessage(2, key_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (primaryKeyId_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, primaryKeyId_); } for (int i = 0; i < key_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, key_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.crypto.tink.proto.Keyset)) { return super.equals(obj); } com.google.crypto.tink.proto.Keyset other = (com.google.crypto.tink.proto.Keyset) obj; boolean result = true; result = result && (getPrimaryKeyId() == other.getPrimaryKeyId()); result = result && getKeyList() .equals(other.getKeyList()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PRIMARY_KEY_ID_FIELD_NUMBER; hash = (53 * hash) + getPrimaryKeyId(); if (getKeyCount() > 0) { hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKeyList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.crypto.tink.proto.Keyset parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.crypto.tink.proto.Keyset parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.crypto.tink.proto.Keyset parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.crypto.tink.proto.Keyset parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.crypto.tink.proto.Keyset parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.crypto.tink.proto.Keyset parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.crypto.tink.proto.Keyset parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.crypto.tink.proto.Keyset parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.crypto.tink.proto.Keyset prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * A Tink user works usually not with single keys, but with keysets,
   * to enable key rotation.  The keys in a keyset can belong to different
   * implementations/key types, but must all implement the same primitive.
   * Any given keyset (and any given key) can be used for one primitive only.
   * 
* * Protobuf type {@code google.crypto.tink.Keyset} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.crypto.tink.Keyset) com.google.crypto.tink.proto.KeysetOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_Keyset_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_Keyset_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.crypto.tink.proto.Keyset.class, com.google.crypto.tink.proto.Keyset.Builder.class); } // Construct using com.google.crypto.tink.proto.Keyset.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getKeyFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); primaryKeyId_ = 0; if (keyBuilder_ == null) { key_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { keyBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_Keyset_descriptor; } @java.lang.Override public com.google.crypto.tink.proto.Keyset getDefaultInstanceForType() { return com.google.crypto.tink.proto.Keyset.getDefaultInstance(); } @java.lang.Override public com.google.crypto.tink.proto.Keyset build() { com.google.crypto.tink.proto.Keyset result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.crypto.tink.proto.Keyset buildPartial() { com.google.crypto.tink.proto.Keyset result = new com.google.crypto.tink.proto.Keyset(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.primaryKeyId_ = primaryKeyId_; if (keyBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { key_ = java.util.Collections.unmodifiableList(key_); bitField0_ = (bitField0_ & ~0x00000002); } result.key_ = key_; } else { result.key_ = keyBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.crypto.tink.proto.Keyset) { return mergeFrom((com.google.crypto.tink.proto.Keyset)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.crypto.tink.proto.Keyset other) { if (other == com.google.crypto.tink.proto.Keyset.getDefaultInstance()) return this; if (other.getPrimaryKeyId() != 0) { setPrimaryKeyId(other.getPrimaryKeyId()); } if (keyBuilder_ == null) { if (!other.key_.isEmpty()) { if (key_.isEmpty()) { key_ = other.key_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureKeyIsMutable(); key_.addAll(other.key_); } onChanged(); } } else { if (!other.key_.isEmpty()) { if (keyBuilder_.isEmpty()) { keyBuilder_.dispose(); keyBuilder_ = null; key_ = other.key_; bitField0_ = (bitField0_ & ~0x00000002); keyBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKeyFieldBuilder() : null; } else { keyBuilder_.addAllMessages(other.key_); } } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.crypto.tink.proto.Keyset parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.crypto.tink.proto.Keyset) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int primaryKeyId_ ; /** *
     * Identifies key used to generate new crypto data (encrypt, sign).
     * Required.
     * 
* * uint32 primary_key_id = 1; */ public int getPrimaryKeyId() { return primaryKeyId_; } /** *
     * Identifies key used to generate new crypto data (encrypt, sign).
     * Required.
     * 
* * uint32 primary_key_id = 1; */ public Builder setPrimaryKeyId(int value) { primaryKeyId_ = value; onChanged(); return this; } /** *
     * Identifies key used to generate new crypto data (encrypt, sign).
     * Required.
     * 
* * uint32 primary_key_id = 1; */ public Builder clearPrimaryKeyId() { primaryKeyId_ = 0; onChanged(); return this; } private java.util.List key_ = java.util.Collections.emptyList(); private void ensureKeyIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { key_ = new java.util.ArrayList(key_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.crypto.tink.proto.Keyset.Key, com.google.crypto.tink.proto.Keyset.Key.Builder, com.google.crypto.tink.proto.Keyset.KeyOrBuilder> keyBuilder_; /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public java.util.List getKeyList() { if (keyBuilder_ == null) { return java.util.Collections.unmodifiableList(key_); } else { return keyBuilder_.getMessageList(); } } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public int getKeyCount() { if (keyBuilder_ == null) { return key_.size(); } else { return keyBuilder_.getCount(); } } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public com.google.crypto.tink.proto.Keyset.Key getKey(int index) { if (keyBuilder_ == null) { return key_.get(index); } else { return keyBuilder_.getMessage(index); } } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder setKey( int index, com.google.crypto.tink.proto.Keyset.Key value) { if (keyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureKeyIsMutable(); key_.set(index, value); onChanged(); } else { keyBuilder_.setMessage(index, value); } return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder setKey( int index, com.google.crypto.tink.proto.Keyset.Key.Builder builderForValue) { if (keyBuilder_ == null) { ensureKeyIsMutable(); key_.set(index, builderForValue.build()); onChanged(); } else { keyBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder addKey(com.google.crypto.tink.proto.Keyset.Key value) { if (keyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureKeyIsMutable(); key_.add(value); onChanged(); } else { keyBuilder_.addMessage(value); } return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder addKey( int index, com.google.crypto.tink.proto.Keyset.Key value) { if (keyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureKeyIsMutable(); key_.add(index, value); onChanged(); } else { keyBuilder_.addMessage(index, value); } return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder addKey( com.google.crypto.tink.proto.Keyset.Key.Builder builderForValue) { if (keyBuilder_ == null) { ensureKeyIsMutable(); key_.add(builderForValue.build()); onChanged(); } else { keyBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder addKey( int index, com.google.crypto.tink.proto.Keyset.Key.Builder builderForValue) { if (keyBuilder_ == null) { ensureKeyIsMutable(); key_.add(index, builderForValue.build()); onChanged(); } else { keyBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder addAllKey( java.lang.Iterable values) { if (keyBuilder_ == null) { ensureKeyIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, key_); onChanged(); } else { keyBuilder_.addAllMessages(values); } return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder clearKey() { if (keyBuilder_ == null) { key_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { keyBuilder_.clear(); } return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public Builder removeKey(int index) { if (keyBuilder_ == null) { ensureKeyIsMutable(); key_.remove(index); onChanged(); } else { keyBuilder_.remove(index); } return this; } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public com.google.crypto.tink.proto.Keyset.Key.Builder getKeyBuilder( int index) { return getKeyFieldBuilder().getBuilder(index); } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public com.google.crypto.tink.proto.Keyset.KeyOrBuilder getKeyOrBuilder( int index) { if (keyBuilder_ == null) { return key_.get(index); } else { return keyBuilder_.getMessageOrBuilder(index); } } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public java.util.List getKeyOrBuilderList() { if (keyBuilder_ != null) { return keyBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(key_); } } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public com.google.crypto.tink.proto.Keyset.Key.Builder addKeyBuilder() { return getKeyFieldBuilder().addBuilder( com.google.crypto.tink.proto.Keyset.Key.getDefaultInstance()); } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public com.google.crypto.tink.proto.Keyset.Key.Builder addKeyBuilder( int index) { return getKeyFieldBuilder().addBuilder( index, com.google.crypto.tink.proto.Keyset.Key.getDefaultInstance()); } /** *
     * Actual keys in the Keyset.
     * Required.
     * 
* * repeated .google.crypto.tink.Keyset.Key key = 2; */ public java.util.List getKeyBuilderList() { return getKeyFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.crypto.tink.proto.Keyset.Key, com.google.crypto.tink.proto.Keyset.Key.Builder, com.google.crypto.tink.proto.Keyset.KeyOrBuilder> getKeyFieldBuilder() { if (keyBuilder_ == null) { keyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.crypto.tink.proto.Keyset.Key, com.google.crypto.tink.proto.Keyset.Key.Builder, com.google.crypto.tink.proto.Keyset.KeyOrBuilder>( key_, ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); key_ = null; } return keyBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.crypto.tink.Keyset) } // @@protoc_insertion_point(class_scope:google.crypto.tink.Keyset) private static final com.google.crypto.tink.proto.Keyset DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.crypto.tink.proto.Keyset(); } public static com.google.crypto.tink.proto.Keyset getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Keyset parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Keyset(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.crypto.tink.proto.Keyset getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy