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

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

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

package com.google.crypto.tink.proto;

/**
 * 
 * Represents a "safe" Keyset that doesn't contain any actual key material,
 * thus can be used for logging or monitoring. Most fields are copied from
 * Keyset.
 * 
* * Protobuf type {@code google.crypto.tink.KeysetInfo} */ public final class KeysetInfo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.crypto.tink.KeysetInfo) KeysetInfoOrBuilder { private static final long serialVersionUID = 0L; // Use KeysetInfo.newBuilder() to construct. private KeysetInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private KeysetInfo() { keyInfo_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new KeysetInfo(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_KeysetInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_KeysetInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.crypto.tink.proto.KeysetInfo.class, com.google.crypto.tink.proto.KeysetInfo.Builder.class); } public interface KeyInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.crypto.tink.KeysetInfo.KeyInfo) com.google.protobuf.MessageOrBuilder { /** *
     * the type url of this key,
     * e.g., type.googleapis.com/google.crypto.tink.HmacKey.
     * 
* * string type_url = 1; * @return The typeUrl. */ java.lang.String getTypeUrl(); /** *
     * the type url of this key,
     * e.g., type.googleapis.com/google.crypto.tink.HmacKey.
     * 
* * string type_url = 1; * @return The bytes for typeUrl. */ com.google.protobuf.ByteString getTypeUrlBytes(); /** *
     * See Keyset.Key.status.
     * 
* * .google.crypto.tink.KeyStatusType status = 2; * @return The enum numeric value on the wire for status. */ int getStatusValue(); /** *
     * See Keyset.Key.status.
     * 
* * .google.crypto.tink.KeyStatusType status = 2; * @return The status. */ com.google.crypto.tink.proto.KeyStatusType getStatus(); /** *
     * See Keyset.Key.key_id.
     * 
* * uint32 key_id = 3; * @return The keyId. */ int getKeyId(); /** *
     * See Keyset.Key.output_prefix_type.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return The enum numeric value on the wire for outputPrefixType. */ int getOutputPrefixTypeValue(); /** *
     * See Keyset.Key.output_prefix_type.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return The outputPrefixType. */ com.google.crypto.tink.proto.OutputPrefixType getOutputPrefixType(); } /** * Protobuf type {@code google.crypto.tink.KeysetInfo.KeyInfo} */ public static final class KeyInfo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.crypto.tink.KeysetInfo.KeyInfo) KeyInfoOrBuilder { private static final long serialVersionUID = 0L; // Use KeyInfo.newBuilder() to construct. private KeyInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private KeyInfo() { typeUrl_ = ""; status_ = 0; outputPrefixType_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new KeyInfo(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_KeysetInfo_KeyInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_KeysetInfo_KeyInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.crypto.tink.proto.KeysetInfo.KeyInfo.class, com.google.crypto.tink.proto.KeysetInfo.KeyInfo.Builder.class); } public static final int TYPE_URL_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object typeUrl_ = ""; /** *
     * the type url of this key,
     * e.g., type.googleapis.com/google.crypto.tink.HmacKey.
     * 
* * string type_url = 1; * @return The typeUrl. */ @java.lang.Override public java.lang.String getTypeUrl() { java.lang.Object ref = typeUrl_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); typeUrl_ = s; return s; } } /** *
     * the type url of this key,
     * e.g., type.googleapis.com/google.crypto.tink.HmacKey.
     * 
* * string type_url = 1; * @return The bytes for typeUrl. */ @java.lang.Override public com.google.protobuf.ByteString getTypeUrlBytes() { java.lang.Object ref = typeUrl_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); typeUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int STATUS_FIELD_NUMBER = 2; private int status_ = 0; /** *
     * See Keyset.Key.status.
     * 
* * .google.crypto.tink.KeyStatusType status = 2; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** *
     * See Keyset.Key.status.
     * 
* * .google.crypto.tink.KeyStatusType status = 2; * @return The status. */ @java.lang.Override public com.google.crypto.tink.proto.KeyStatusType getStatus() { com.google.crypto.tink.proto.KeyStatusType result = com.google.crypto.tink.proto.KeyStatusType.forNumber(status_); return result == null ? com.google.crypto.tink.proto.KeyStatusType.UNRECOGNIZED : result; } public static final int KEY_ID_FIELD_NUMBER = 3; private int keyId_ = 0; /** *
     * See Keyset.Key.key_id.
     * 
* * uint32 key_id = 3; * @return The keyId. */ @java.lang.Override public int getKeyId() { return keyId_; } public static final int OUTPUT_PREFIX_TYPE_FIELD_NUMBER = 4; private int outputPrefixType_ = 0; /** *
     * See Keyset.Key.output_prefix_type.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return The enum numeric value on the wire for outputPrefixType. */ @java.lang.Override public int getOutputPrefixTypeValue() { return outputPrefixType_; } /** *
     * See Keyset.Key.output_prefix_type.
     * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return The outputPrefixType. */ @java.lang.Override public com.google.crypto.tink.proto.OutputPrefixType getOutputPrefixType() { com.google.crypto.tink.proto.OutputPrefixType result = com.google.crypto.tink.proto.OutputPrefixType.forNumber(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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeUrl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, typeUrl_); } 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_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeUrl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, typeUrl_); } 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 += getUnknownFields().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.KeysetInfo.KeyInfo)) { return super.equals(obj); } com.google.crypto.tink.proto.KeysetInfo.KeyInfo other = (com.google.crypto.tink.proto.KeysetInfo.KeyInfo) obj; if (!getTypeUrl() .equals(other.getTypeUrl())) return false; if (status_ != other.status_) return false; if (getKeyId() != other.getKeyId()) return false; if (outputPrefixType_ != other.outputPrefixType_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TYPE_URL_FIELD_NUMBER; hash = (53 * hash) + getTypeUrl().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) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.crypto.tink.proto.KeysetInfo.KeyInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.crypto.tink.proto.KeysetInfo.KeyInfo 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.KeysetInfo.KeyInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.crypto.tink.proto.KeysetInfo.KeyInfo 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.KeysetInfo.KeyInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.crypto.tink.proto.KeysetInfo.KeyInfo 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.KeysetInfo.KeyInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.crypto.tink.proto.KeysetInfo.KeyInfo 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.KeysetInfo.KeyInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.crypto.tink.proto.KeysetInfo.KeyInfo 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.KeysetInfo.KeyInfo 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.KeysetInfo.KeyInfo 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.KeysetInfo.KeyInfo 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.KeysetInfo.KeyInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.crypto.tink.KeysetInfo.KeyInfo) com.google.crypto.tink.proto.KeysetInfo.KeyInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_KeysetInfo_KeyInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_KeysetInfo_KeyInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.crypto.tink.proto.KeysetInfo.KeyInfo.class, com.google.crypto.tink.proto.KeysetInfo.KeyInfo.Builder.class); } // Construct using com.google.crypto.tink.proto.KeysetInfo.KeyInfo.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; typeUrl_ = ""; 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_KeysetInfo_KeyInfo_descriptor; } @java.lang.Override public com.google.crypto.tink.proto.KeysetInfo.KeyInfo getDefaultInstanceForType() { return com.google.crypto.tink.proto.KeysetInfo.KeyInfo.getDefaultInstance(); } @java.lang.Override public com.google.crypto.tink.proto.KeysetInfo.KeyInfo build() { com.google.crypto.tink.proto.KeysetInfo.KeyInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.crypto.tink.proto.KeysetInfo.KeyInfo buildPartial() { com.google.crypto.tink.proto.KeysetInfo.KeyInfo result = new com.google.crypto.tink.proto.KeysetInfo.KeyInfo(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.crypto.tink.proto.KeysetInfo.KeyInfo result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.typeUrl_ = typeUrl_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.status_ = status_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.keyId_ = keyId_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.outputPrefixType_ = outputPrefixType_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.crypto.tink.proto.KeysetInfo.KeyInfo) { return mergeFrom((com.google.crypto.tink.proto.KeysetInfo.KeyInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.crypto.tink.proto.KeysetInfo.KeyInfo other) { if (other == com.google.crypto.tink.proto.KeysetInfo.KeyInfo.getDefaultInstance()) return this; if (!other.getTypeUrl().isEmpty()) { typeUrl_ = other.typeUrl_; bitField0_ |= 0x00000001; onChanged(); } if (other.status_ != 0) { setStatusValue(other.getStatusValue()); } if (other.getKeyId() != 0) { setKeyId(other.getKeyId()); } if (other.outputPrefixType_ != 0) { setOutputPrefixTypeValue(other.getOutputPrefixTypeValue()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { typeUrl_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { status_ = input.readEnum(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { keyId_ = input.readUInt32(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { outputPrefixType_ = input.readEnum(); bitField0_ |= 0x00000008; break; } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object typeUrl_ = ""; /** *
       * the type url of this key,
       * e.g., type.googleapis.com/google.crypto.tink.HmacKey.
       * 
* * string type_url = 1; * @return The typeUrl. */ public java.lang.String getTypeUrl() { java.lang.Object ref = typeUrl_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); typeUrl_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * the type url of this key,
       * e.g., type.googleapis.com/google.crypto.tink.HmacKey.
       * 
* * string type_url = 1; * @return The bytes for typeUrl. */ public com.google.protobuf.ByteString getTypeUrlBytes() { java.lang.Object ref = typeUrl_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); typeUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * the type url of this key,
       * e.g., type.googleapis.com/google.crypto.tink.HmacKey.
       * 
* * string type_url = 1; * @param value The typeUrl to set. * @return This builder for chaining. */ public Builder setTypeUrl( java.lang.String value) { if (value == null) { throw new NullPointerException(); } typeUrl_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * the type url of this key,
       * e.g., type.googleapis.com/google.crypto.tink.HmacKey.
       * 
* * string type_url = 1; * @return This builder for chaining. */ public Builder clearTypeUrl() { typeUrl_ = getDefaultInstance().getTypeUrl(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
       * the type url of this key,
       * e.g., type.googleapis.com/google.crypto.tink.HmacKey.
       * 
* * string type_url = 1; * @param value The bytes for typeUrl to set. * @return This builder for chaining. */ public Builder setTypeUrlBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); typeUrl_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private int status_ = 0; /** *
       * See Keyset.Key.status.
       * 
* * .google.crypto.tink.KeyStatusType status = 2; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** *
       * See Keyset.Key.status.
       * 
* * .google.crypto.tink.KeyStatusType status = 2; * @param value The enum numeric value on the wire for status to set. * @return This builder for chaining. */ public Builder setStatusValue(int value) { status_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
       * See Keyset.Key.status.
       * 
* * .google.crypto.tink.KeyStatusType status = 2; * @return The status. */ @java.lang.Override public com.google.crypto.tink.proto.KeyStatusType getStatus() { com.google.crypto.tink.proto.KeyStatusType result = com.google.crypto.tink.proto.KeyStatusType.forNumber(status_); return result == null ? com.google.crypto.tink.proto.KeyStatusType.UNRECOGNIZED : result; } /** *
       * See Keyset.Key.status.
       * 
* * .google.crypto.tink.KeyStatusType status = 2; * @param value The status to set. * @return This builder for chaining. */ public Builder setStatus(com.google.crypto.tink.proto.KeyStatusType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; status_ = value.getNumber(); onChanged(); return this; } /** *
       * See Keyset.Key.status.
       * 
* * .google.crypto.tink.KeyStatusType status = 2; * @return This builder for chaining. */ public Builder clearStatus() { bitField0_ = (bitField0_ & ~0x00000002); status_ = 0; onChanged(); return this; } private int keyId_ ; /** *
       * See Keyset.Key.key_id.
       * 
* * uint32 key_id = 3; * @return The keyId. */ @java.lang.Override public int getKeyId() { return keyId_; } /** *
       * See Keyset.Key.key_id.
       * 
* * uint32 key_id = 3; * @param value The keyId to set. * @return This builder for chaining. */ public Builder setKeyId(int value) { keyId_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
       * See Keyset.Key.key_id.
       * 
* * uint32 key_id = 3; * @return This builder for chaining. */ public Builder clearKeyId() { bitField0_ = (bitField0_ & ~0x00000004); keyId_ = 0; onChanged(); return this; } private int outputPrefixType_ = 0; /** *
       * See Keyset.Key.output_prefix_type.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return The enum numeric value on the wire for outputPrefixType. */ @java.lang.Override public int getOutputPrefixTypeValue() { return outputPrefixType_; } /** *
       * See Keyset.Key.output_prefix_type.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @param value The enum numeric value on the wire for outputPrefixType to set. * @return This builder for chaining. */ public Builder setOutputPrefixTypeValue(int value) { outputPrefixType_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
       * See Keyset.Key.output_prefix_type.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return The outputPrefixType. */ @java.lang.Override public com.google.crypto.tink.proto.OutputPrefixType getOutputPrefixType() { com.google.crypto.tink.proto.OutputPrefixType result = com.google.crypto.tink.proto.OutputPrefixType.forNumber(outputPrefixType_); return result == null ? com.google.crypto.tink.proto.OutputPrefixType.UNRECOGNIZED : result; } /** *
       * See Keyset.Key.output_prefix_type.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @param value The outputPrefixType to set. * @return This builder for chaining. */ public Builder setOutputPrefixType(com.google.crypto.tink.proto.OutputPrefixType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; outputPrefixType_ = value.getNumber(); onChanged(); return this; } /** *
       * See Keyset.Key.output_prefix_type.
       * 
* * .google.crypto.tink.OutputPrefixType output_prefix_type = 4; * @return This builder for chaining. */ public Builder clearOutputPrefixType() { bitField0_ = (bitField0_ & ~0x00000008); outputPrefixType_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(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.KeysetInfo.KeyInfo) } // @@protoc_insertion_point(class_scope:google.crypto.tink.KeysetInfo.KeyInfo) private static final com.google.crypto.tink.proto.KeysetInfo.KeyInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.crypto.tink.proto.KeysetInfo.KeyInfo(); } public static com.google.crypto.tink.proto.KeysetInfo.KeyInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public KeyInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; 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.KeysetInfo.KeyInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int PRIMARY_KEY_ID_FIELD_NUMBER = 1; private int primaryKeyId_ = 0; /** *
   * See Keyset.primary_key_id.
   * 
* * uint32 primary_key_id = 1; * @return The primaryKeyId. */ @java.lang.Override public int getPrimaryKeyId() { return primaryKeyId_; } public static final int KEY_INFO_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List keyInfo_; /** *
   * KeyInfos in the KeysetInfo.
   * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
   * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ @java.lang.Override public java.util.List getKeyInfoList() { return keyInfo_; } /** *
   * KeyInfos in the KeysetInfo.
   * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
   * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ @java.lang.Override public java.util.List getKeyInfoOrBuilderList() { return keyInfo_; } /** *
   * KeyInfos in the KeysetInfo.
   * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
   * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ @java.lang.Override public int getKeyInfoCount() { return keyInfo_.size(); } /** *
   * KeyInfos in the KeysetInfo.
   * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
   * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ @java.lang.Override public com.google.crypto.tink.proto.KeysetInfo.KeyInfo getKeyInfo(int index) { return keyInfo_.get(index); } /** *
   * KeyInfos in the KeysetInfo.
   * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
   * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ @java.lang.Override public com.google.crypto.tink.proto.KeysetInfo.KeyInfoOrBuilder getKeyInfoOrBuilder( int index) { return keyInfo_.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 < keyInfo_.size(); i++) { output.writeMessage(2, keyInfo_.get(i)); } getUnknownFields().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 < keyInfo_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, keyInfo_.get(i)); } size += getUnknownFields().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.KeysetInfo)) { return super.equals(obj); } com.google.crypto.tink.proto.KeysetInfo other = (com.google.crypto.tink.proto.KeysetInfo) obj; if (getPrimaryKeyId() != other.getPrimaryKeyId()) return false; if (!getKeyInfoList() .equals(other.getKeyInfoList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @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 (getKeyInfoCount() > 0) { hash = (37 * hash) + KEY_INFO_FIELD_NUMBER; hash = (53 * hash) + getKeyInfoList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.crypto.tink.proto.KeysetInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.crypto.tink.proto.KeysetInfo 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.KeysetInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.crypto.tink.proto.KeysetInfo 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.KeysetInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.crypto.tink.proto.KeysetInfo 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.KeysetInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.crypto.tink.proto.KeysetInfo 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.KeysetInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.crypto.tink.proto.KeysetInfo 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.KeysetInfo 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.KeysetInfo 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.KeysetInfo 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; } /** *
   * Represents a "safe" Keyset that doesn't contain any actual key material,
   * thus can be used for logging or monitoring. Most fields are copied from
   * Keyset.
   * 
* * Protobuf type {@code google.crypto.tink.KeysetInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.crypto.tink.KeysetInfo) com.google.crypto.tink.proto.KeysetInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_KeysetInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_KeysetInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.crypto.tink.proto.KeysetInfo.class, com.google.crypto.tink.proto.KeysetInfo.Builder.class); } // Construct using com.google.crypto.tink.proto.KeysetInfo.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; primaryKeyId_ = 0; if (keyInfoBuilder_ == null) { keyInfo_ = java.util.Collections.emptyList(); } else { keyInfo_ = null; keyInfoBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.crypto.tink.proto.Tink.internal_static_google_crypto_tink_KeysetInfo_descriptor; } @java.lang.Override public com.google.crypto.tink.proto.KeysetInfo getDefaultInstanceForType() { return com.google.crypto.tink.proto.KeysetInfo.getDefaultInstance(); } @java.lang.Override public com.google.crypto.tink.proto.KeysetInfo build() { com.google.crypto.tink.proto.KeysetInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.crypto.tink.proto.KeysetInfo buildPartial() { com.google.crypto.tink.proto.KeysetInfo result = new com.google.crypto.tink.proto.KeysetInfo(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.crypto.tink.proto.KeysetInfo result) { if (keyInfoBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { keyInfo_ = java.util.Collections.unmodifiableList(keyInfo_); bitField0_ = (bitField0_ & ~0x00000002); } result.keyInfo_ = keyInfo_; } else { result.keyInfo_ = keyInfoBuilder_.build(); } } private void buildPartial0(com.google.crypto.tink.proto.KeysetInfo result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.primaryKeyId_ = primaryKeyId_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.crypto.tink.proto.KeysetInfo) { return mergeFrom((com.google.crypto.tink.proto.KeysetInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.crypto.tink.proto.KeysetInfo other) { if (other == com.google.crypto.tink.proto.KeysetInfo.getDefaultInstance()) return this; if (other.getPrimaryKeyId() != 0) { setPrimaryKeyId(other.getPrimaryKeyId()); } if (keyInfoBuilder_ == null) { if (!other.keyInfo_.isEmpty()) { if (keyInfo_.isEmpty()) { keyInfo_ = other.keyInfo_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureKeyInfoIsMutable(); keyInfo_.addAll(other.keyInfo_); } onChanged(); } } else { if (!other.keyInfo_.isEmpty()) { if (keyInfoBuilder_.isEmpty()) { keyInfoBuilder_.dispose(); keyInfoBuilder_ = null; keyInfo_ = other.keyInfo_; bitField0_ = (bitField0_ & ~0x00000002); keyInfoBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKeyInfoFieldBuilder() : null; } else { keyInfoBuilder_.addAllMessages(other.keyInfo_); } } } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { primaryKeyId_ = input.readUInt32(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { com.google.crypto.tink.proto.KeysetInfo.KeyInfo m = input.readMessage( com.google.crypto.tink.proto.KeysetInfo.KeyInfo.parser(), extensionRegistry); if (keyInfoBuilder_ == null) { ensureKeyInfoIsMutable(); keyInfo_.add(m); } else { keyInfoBuilder_.addMessage(m); } break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private int primaryKeyId_ ; /** *
     * See Keyset.primary_key_id.
     * 
* * uint32 primary_key_id = 1; * @return The primaryKeyId. */ @java.lang.Override public int getPrimaryKeyId() { return primaryKeyId_; } /** *
     * See Keyset.primary_key_id.
     * 
* * uint32 primary_key_id = 1; * @param value The primaryKeyId to set. * @return This builder for chaining. */ public Builder setPrimaryKeyId(int value) { primaryKeyId_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * See Keyset.primary_key_id.
     * 
* * uint32 primary_key_id = 1; * @return This builder for chaining. */ public Builder clearPrimaryKeyId() { bitField0_ = (bitField0_ & ~0x00000001); primaryKeyId_ = 0; onChanged(); return this; } private java.util.List keyInfo_ = java.util.Collections.emptyList(); private void ensureKeyInfoIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { keyInfo_ = new java.util.ArrayList(keyInfo_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.crypto.tink.proto.KeysetInfo.KeyInfo, com.google.crypto.tink.proto.KeysetInfo.KeyInfo.Builder, com.google.crypto.tink.proto.KeysetInfo.KeyInfoOrBuilder> keyInfoBuilder_; /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public java.util.List getKeyInfoList() { if (keyInfoBuilder_ == null) { return java.util.Collections.unmodifiableList(keyInfo_); } else { return keyInfoBuilder_.getMessageList(); } } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public int getKeyInfoCount() { if (keyInfoBuilder_ == null) { return keyInfo_.size(); } else { return keyInfoBuilder_.getCount(); } } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public com.google.crypto.tink.proto.KeysetInfo.KeyInfo getKeyInfo(int index) { if (keyInfoBuilder_ == null) { return keyInfo_.get(index); } else { return keyInfoBuilder_.getMessage(index); } } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public Builder setKeyInfo( int index, com.google.crypto.tink.proto.KeysetInfo.KeyInfo value) { if (keyInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureKeyInfoIsMutable(); keyInfo_.set(index, value); onChanged(); } else { keyInfoBuilder_.setMessage(index, value); } return this; } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public Builder setKeyInfo( int index, com.google.crypto.tink.proto.KeysetInfo.KeyInfo.Builder builderForValue) { if (keyInfoBuilder_ == null) { ensureKeyInfoIsMutable(); keyInfo_.set(index, builderForValue.build()); onChanged(); } else { keyInfoBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public Builder addKeyInfo(com.google.crypto.tink.proto.KeysetInfo.KeyInfo value) { if (keyInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureKeyInfoIsMutable(); keyInfo_.add(value); onChanged(); } else { keyInfoBuilder_.addMessage(value); } return this; } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public Builder addKeyInfo( int index, com.google.crypto.tink.proto.KeysetInfo.KeyInfo value) { if (keyInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureKeyInfoIsMutable(); keyInfo_.add(index, value); onChanged(); } else { keyInfoBuilder_.addMessage(index, value); } return this; } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public Builder addKeyInfo( com.google.crypto.tink.proto.KeysetInfo.KeyInfo.Builder builderForValue) { if (keyInfoBuilder_ == null) { ensureKeyInfoIsMutable(); keyInfo_.add(builderForValue.build()); onChanged(); } else { keyInfoBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public Builder addKeyInfo( int index, com.google.crypto.tink.proto.KeysetInfo.KeyInfo.Builder builderForValue) { if (keyInfoBuilder_ == null) { ensureKeyInfoIsMutable(); keyInfo_.add(index, builderForValue.build()); onChanged(); } else { keyInfoBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public Builder addAllKeyInfo( java.lang.Iterable values) { if (keyInfoBuilder_ == null) { ensureKeyInfoIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, keyInfo_); onChanged(); } else { keyInfoBuilder_.addAllMessages(values); } return this; } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public Builder clearKeyInfo() { if (keyInfoBuilder_ == null) { keyInfo_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { keyInfoBuilder_.clear(); } return this; } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public Builder removeKeyInfo(int index) { if (keyInfoBuilder_ == null) { ensureKeyInfoIsMutable(); keyInfo_.remove(index); onChanged(); } else { keyInfoBuilder_.remove(index); } return this; } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public com.google.crypto.tink.proto.KeysetInfo.KeyInfo.Builder getKeyInfoBuilder( int index) { return getKeyInfoFieldBuilder().getBuilder(index); } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public com.google.crypto.tink.proto.KeysetInfo.KeyInfoOrBuilder getKeyInfoOrBuilder( int index) { if (keyInfoBuilder_ == null) { return keyInfo_.get(index); } else { return keyInfoBuilder_.getMessageOrBuilder(index); } } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public java.util.List getKeyInfoOrBuilderList() { if (keyInfoBuilder_ != null) { return keyInfoBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(keyInfo_); } } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public com.google.crypto.tink.proto.KeysetInfo.KeyInfo.Builder addKeyInfoBuilder() { return getKeyInfoFieldBuilder().addBuilder( com.google.crypto.tink.proto.KeysetInfo.KeyInfo.getDefaultInstance()); } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public com.google.crypto.tink.proto.KeysetInfo.KeyInfo.Builder addKeyInfoBuilder( int index) { return getKeyInfoFieldBuilder().addBuilder( index, com.google.crypto.tink.proto.KeysetInfo.KeyInfo.getDefaultInstance()); } /** *
     * KeyInfos in the KeysetInfo.
     * Each KeyInfo is corresponding to a Key in the corresponding Keyset.
     * 
* * repeated .google.crypto.tink.KeysetInfo.KeyInfo key_info = 2; */ public java.util.List getKeyInfoBuilderList() { return getKeyInfoFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.crypto.tink.proto.KeysetInfo.KeyInfo, com.google.crypto.tink.proto.KeysetInfo.KeyInfo.Builder, com.google.crypto.tink.proto.KeysetInfo.KeyInfoOrBuilder> getKeyInfoFieldBuilder() { if (keyInfoBuilder_ == null) { keyInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.crypto.tink.proto.KeysetInfo.KeyInfo, com.google.crypto.tink.proto.KeysetInfo.KeyInfo.Builder, com.google.crypto.tink.proto.KeysetInfo.KeyInfoOrBuilder>( keyInfo_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); keyInfo_ = null; } return keyInfoBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(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.KeysetInfo) } // @@protoc_insertion_point(class_scope:google.crypto.tink.KeysetInfo) private static final com.google.crypto.tink.proto.KeysetInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.crypto.tink.proto.KeysetInfo(); } public static com.google.crypto.tink.proto.KeysetInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public KeysetInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; 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.KeysetInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy