| // Generated by the protocol buffer compiler. DO NOT EDIT! |
| // source: grpc/gcp/handshaker.proto |
| |
| package io.grpc.alts.internal; |
| |
| /** |
| * Protobuf type {@code grpc.gcp.ServerHandshakeParameters} |
| */ |
| public final class ServerHandshakeParameters extends |
| com.google.protobuf.GeneratedMessageV3 implements |
| // @@protoc_insertion_point(message_implements:grpc.gcp.ServerHandshakeParameters) |
| ServerHandshakeParametersOrBuilder { |
| private static final long serialVersionUID = 0L; |
| // Use ServerHandshakeParameters.newBuilder() to construct. |
| private ServerHandshakeParameters(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { |
| super(builder); |
| } |
| private ServerHandshakeParameters() { |
| recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; |
| localIdentities_ = java.util.Collections.emptyList(); |
| } |
| |
| @java.lang.Override |
| public final com.google.protobuf.UnknownFieldSet |
| getUnknownFields() { |
| return this.unknownFields; |
| } |
| private ServerHandshakeParameters( |
| 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; |
| default: { |
| if (!parseUnknownFieldProto3( |
| input, unknownFields, extensionRegistry, tag)) { |
| done = true; |
| } |
| break; |
| } |
| case 10: { |
| java.lang.String s = input.readStringRequireUtf8(); |
| if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { |
| recordProtocols_ = new com.google.protobuf.LazyStringArrayList(); |
| mutable_bitField0_ |= 0x00000001; |
| } |
| recordProtocols_.add(s); |
| break; |
| } |
| case 18: { |
| if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { |
| localIdentities_ = new java.util.ArrayList<io.grpc.alts.internal.Identity>(); |
| mutable_bitField0_ |= 0x00000002; |
| } |
| localIdentities_.add( |
| input.readMessage(io.grpc.alts.internal.Identity.parser(), extensionRegistry)); |
| 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_ & 0x00000001) == 0x00000001)) { |
| recordProtocols_ = recordProtocols_.getUnmodifiableView(); |
| } |
| if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { |
| localIdentities_ = java.util.Collections.unmodifiableList(localIdentities_); |
| } |
| this.unknownFields = unknownFields.build(); |
| makeExtensionsImmutable(); |
| } |
| } |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_ServerHandshakeParameters_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_ServerHandshakeParameters_fieldAccessorTable |
| .ensureFieldAccessorsInitialized( |
| io.grpc.alts.internal.ServerHandshakeParameters.class, io.grpc.alts.internal.ServerHandshakeParameters.Builder.class); |
| } |
| |
| public static final int RECORD_PROTOCOLS_FIELD_NUMBER = 1; |
| private com.google.protobuf.LazyStringList recordProtocols_; |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public com.google.protobuf.ProtocolStringList |
| getRecordProtocolsList() { |
| return recordProtocols_; |
| } |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public int getRecordProtocolsCount() { |
| return recordProtocols_.size(); |
| } |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public java.lang.String getRecordProtocols(int index) { |
| return recordProtocols_.get(index); |
| } |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public com.google.protobuf.ByteString |
| getRecordProtocolsBytes(int index) { |
| return recordProtocols_.getByteString(index); |
| } |
| |
| public static final int LOCAL_IDENTITIES_FIELD_NUMBER = 2; |
| private java.util.List<io.grpc.alts.internal.Identity> localIdentities_; |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public java.util.List<io.grpc.alts.internal.Identity> getLocalIdentitiesList() { |
| return localIdentities_; |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public java.util.List<? extends io.grpc.alts.internal.IdentityOrBuilder> |
| getLocalIdentitiesOrBuilderList() { |
| return localIdentities_; |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public int getLocalIdentitiesCount() { |
| return localIdentities_.size(); |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public io.grpc.alts.internal.Identity getLocalIdentities(int index) { |
| return localIdentities_.get(index); |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public io.grpc.alts.internal.IdentityOrBuilder getLocalIdentitiesOrBuilder( |
| int index) { |
| return localIdentities_.get(index); |
| } |
| |
| private byte memoizedIsInitialized = -1; |
| public final boolean isInitialized() { |
| byte isInitialized = memoizedIsInitialized; |
| if (isInitialized == 1) return true; |
| if (isInitialized == 0) return false; |
| |
| memoizedIsInitialized = 1; |
| return true; |
| } |
| |
| public void writeTo(com.google.protobuf.CodedOutputStream output) |
| throws java.io.IOException { |
| for (int i = 0; i < recordProtocols_.size(); i++) { |
| com.google.protobuf.GeneratedMessageV3.writeString(output, 1, recordProtocols_.getRaw(i)); |
| } |
| for (int i = 0; i < localIdentities_.size(); i++) { |
| output.writeMessage(2, localIdentities_.get(i)); |
| } |
| unknownFields.writeTo(output); |
| } |
| |
| public int getSerializedSize() { |
| int size = memoizedSize; |
| if (size != -1) return size; |
| |
| size = 0; |
| { |
| int dataSize = 0; |
| for (int i = 0; i < recordProtocols_.size(); i++) { |
| dataSize += computeStringSizeNoTag(recordProtocols_.getRaw(i)); |
| } |
| size += dataSize; |
| size += 1 * getRecordProtocolsList().size(); |
| } |
| for (int i = 0; i < localIdentities_.size(); i++) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeMessageSize(2, localIdentities_.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 io.grpc.alts.internal.ServerHandshakeParameters)) { |
| return super.equals(obj); |
| } |
| io.grpc.alts.internal.ServerHandshakeParameters other = (io.grpc.alts.internal.ServerHandshakeParameters) obj; |
| |
| boolean result = true; |
| result = result && getRecordProtocolsList() |
| .equals(other.getRecordProtocolsList()); |
| result = result && getLocalIdentitiesList() |
| .equals(other.getLocalIdentitiesList()); |
| 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 (getRecordProtocolsCount() > 0) { |
| hash = (37 * hash) + RECORD_PROTOCOLS_FIELD_NUMBER; |
| hash = (53 * hash) + getRecordProtocolsList().hashCode(); |
| } |
| if (getLocalIdentitiesCount() > 0) { |
| hash = (37 * hash) + LOCAL_IDENTITIES_FIELD_NUMBER; |
| hash = (53 * hash) + getLocalIdentitiesList().hashCode(); |
| } |
| hash = (29 * hash) + unknownFields.hashCode(); |
| memoizedHashCode = hash; |
| return hash; |
| } |
| |
| public static io.grpc.alts.internal.ServerHandshakeParameters parseFrom( |
| java.nio.ByteBuffer data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return PARSER.parseFrom(data); |
| } |
| public static io.grpc.alts.internal.ServerHandshakeParameters parseFrom( |
| java.nio.ByteBuffer data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return PARSER.parseFrom(data, extensionRegistry); |
| } |
| public static io.grpc.alts.internal.ServerHandshakeParameters parseFrom( |
| com.google.protobuf.ByteString data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return PARSER.parseFrom(data); |
| } |
| public static io.grpc.alts.internal.ServerHandshakeParameters parseFrom( |
| com.google.protobuf.ByteString data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return PARSER.parseFrom(data, extensionRegistry); |
| } |
| public static io.grpc.alts.internal.ServerHandshakeParameters parseFrom(byte[] data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return PARSER.parseFrom(data); |
| } |
| public static io.grpc.alts.internal.ServerHandshakeParameters parseFrom( |
| byte[] data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return PARSER.parseFrom(data, extensionRegistry); |
| } |
| public static io.grpc.alts.internal.ServerHandshakeParameters parseFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| return com.google.protobuf.GeneratedMessageV3 |
| .parseWithIOException(PARSER, input); |
| } |
| public static io.grpc.alts.internal.ServerHandshakeParameters 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 io.grpc.alts.internal.ServerHandshakeParameters parseDelimitedFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| return com.google.protobuf.GeneratedMessageV3 |
| .parseDelimitedWithIOException(PARSER, input); |
| } |
| public static io.grpc.alts.internal.ServerHandshakeParameters 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 io.grpc.alts.internal.ServerHandshakeParameters parseFrom( |
| com.google.protobuf.CodedInputStream input) |
| throws java.io.IOException { |
| return com.google.protobuf.GeneratedMessageV3 |
| .parseWithIOException(PARSER, input); |
| } |
| public static io.grpc.alts.internal.ServerHandshakeParameters parseFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return com.google.protobuf.GeneratedMessageV3 |
| .parseWithIOException(PARSER, input, extensionRegistry); |
| } |
| |
| public Builder newBuilderForType() { return newBuilder(); } |
| public static Builder newBuilder() { |
| return DEFAULT_INSTANCE.toBuilder(); |
| } |
| public static Builder newBuilder(io.grpc.alts.internal.ServerHandshakeParameters prototype) { |
| return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); |
| } |
| 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 grpc.gcp.ServerHandshakeParameters} |
| */ |
| public static final class Builder extends |
| com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements |
| // @@protoc_insertion_point(builder_implements:grpc.gcp.ServerHandshakeParameters) |
| io.grpc.alts.internal.ServerHandshakeParametersOrBuilder { |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_ServerHandshakeParameters_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_ServerHandshakeParameters_fieldAccessorTable |
| .ensureFieldAccessorsInitialized( |
| io.grpc.alts.internal.ServerHandshakeParameters.class, io.grpc.alts.internal.ServerHandshakeParameters.Builder.class); |
| } |
| |
| // Construct using io.grpc.alts.internal.ServerHandshakeParameters.newBuilder() |
| private Builder() { |
| maybeForceBuilderInitialization(); |
| } |
| |
| private Builder( |
| com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { |
| super(parent); |
| maybeForceBuilderInitialization(); |
| } |
| private void maybeForceBuilderInitialization() { |
| if (com.google.protobuf.GeneratedMessageV3 |
| .alwaysUseFieldBuilders) { |
| getLocalIdentitiesFieldBuilder(); |
| } |
| } |
| public Builder clear() { |
| super.clear(); |
| recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| if (localIdentitiesBuilder_ == null) { |
| localIdentities_ = java.util.Collections.emptyList(); |
| bitField0_ = (bitField0_ & ~0x00000002); |
| } else { |
| localIdentitiesBuilder_.clear(); |
| } |
| return this; |
| } |
| |
| public com.google.protobuf.Descriptors.Descriptor |
| getDescriptorForType() { |
| return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_ServerHandshakeParameters_descriptor; |
| } |
| |
| public io.grpc.alts.internal.ServerHandshakeParameters getDefaultInstanceForType() { |
| return io.grpc.alts.internal.ServerHandshakeParameters.getDefaultInstance(); |
| } |
| |
| public io.grpc.alts.internal.ServerHandshakeParameters build() { |
| io.grpc.alts.internal.ServerHandshakeParameters result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException(result); |
| } |
| return result; |
| } |
| |
| public io.grpc.alts.internal.ServerHandshakeParameters buildPartial() { |
| io.grpc.alts.internal.ServerHandshakeParameters result = new io.grpc.alts.internal.ServerHandshakeParameters(this); |
| int from_bitField0_ = bitField0_; |
| if (((bitField0_ & 0x00000001) == 0x00000001)) { |
| recordProtocols_ = recordProtocols_.getUnmodifiableView(); |
| bitField0_ = (bitField0_ & ~0x00000001); |
| } |
| result.recordProtocols_ = recordProtocols_; |
| if (localIdentitiesBuilder_ == null) { |
| if (((bitField0_ & 0x00000002) == 0x00000002)) { |
| localIdentities_ = java.util.Collections.unmodifiableList(localIdentities_); |
| bitField0_ = (bitField0_ & ~0x00000002); |
| } |
| result.localIdentities_ = localIdentities_; |
| } else { |
| result.localIdentities_ = localIdentitiesBuilder_.build(); |
| } |
| onBuilt(); |
| return result; |
| } |
| |
| public Builder clone() { |
| return (Builder) super.clone(); |
| } |
| public Builder setField( |
| com.google.protobuf.Descriptors.FieldDescriptor field, |
| java.lang.Object value) { |
| return (Builder) super.setField(field, value); |
| } |
| public Builder clearField( |
| com.google.protobuf.Descriptors.FieldDescriptor field) { |
| return (Builder) super.clearField(field); |
| } |
| public Builder clearOneof( |
| com.google.protobuf.Descriptors.OneofDescriptor oneof) { |
| return (Builder) super.clearOneof(oneof); |
| } |
| public Builder setRepeatedField( |
| com.google.protobuf.Descriptors.FieldDescriptor field, |
| int index, java.lang.Object value) { |
| return (Builder) super.setRepeatedField(field, index, value); |
| } |
| public Builder addRepeatedField( |
| com.google.protobuf.Descriptors.FieldDescriptor field, |
| java.lang.Object value) { |
| return (Builder) super.addRepeatedField(field, value); |
| } |
| public Builder mergeFrom(com.google.protobuf.Message other) { |
| if (other instanceof io.grpc.alts.internal.ServerHandshakeParameters) { |
| return mergeFrom((io.grpc.alts.internal.ServerHandshakeParameters)other); |
| } else { |
| super.mergeFrom(other); |
| return this; |
| } |
| } |
| |
| public Builder mergeFrom(io.grpc.alts.internal.ServerHandshakeParameters other) { |
| if (other == io.grpc.alts.internal.ServerHandshakeParameters.getDefaultInstance()) return this; |
| if (!other.recordProtocols_.isEmpty()) { |
| if (recordProtocols_.isEmpty()) { |
| recordProtocols_ = other.recordProtocols_; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| } else { |
| ensureRecordProtocolsIsMutable(); |
| recordProtocols_.addAll(other.recordProtocols_); |
| } |
| onChanged(); |
| } |
| if (localIdentitiesBuilder_ == null) { |
| if (!other.localIdentities_.isEmpty()) { |
| if (localIdentities_.isEmpty()) { |
| localIdentities_ = other.localIdentities_; |
| bitField0_ = (bitField0_ & ~0x00000002); |
| } else { |
| ensureLocalIdentitiesIsMutable(); |
| localIdentities_.addAll(other.localIdentities_); |
| } |
| onChanged(); |
| } |
| } else { |
| if (!other.localIdentities_.isEmpty()) { |
| if (localIdentitiesBuilder_.isEmpty()) { |
| localIdentitiesBuilder_.dispose(); |
| localIdentitiesBuilder_ = null; |
| localIdentities_ = other.localIdentities_; |
| bitField0_ = (bitField0_ & ~0x00000002); |
| localIdentitiesBuilder_ = |
| com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? |
| getLocalIdentitiesFieldBuilder() : null; |
| } else { |
| localIdentitiesBuilder_.addAllMessages(other.localIdentities_); |
| } |
| } |
| } |
| this.mergeUnknownFields(other.unknownFields); |
| onChanged(); |
| return this; |
| } |
| |
| public final boolean isInitialized() { |
| return true; |
| } |
| |
| public Builder mergeFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| io.grpc.alts.internal.ServerHandshakeParameters parsedMessage = null; |
| try { |
| parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); |
| } catch (com.google.protobuf.InvalidProtocolBufferException e) { |
| parsedMessage = (io.grpc.alts.internal.ServerHandshakeParameters) e.getUnfinishedMessage(); |
| throw e.unwrapIOException(); |
| } finally { |
| if (parsedMessage != null) { |
| mergeFrom(parsedMessage); |
| } |
| } |
| return this; |
| } |
| private int bitField0_; |
| |
| private com.google.protobuf.LazyStringList recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; |
| private void ensureRecordProtocolsIsMutable() { |
| if (!((bitField0_ & 0x00000001) == 0x00000001)) { |
| recordProtocols_ = new com.google.protobuf.LazyStringArrayList(recordProtocols_); |
| bitField0_ |= 0x00000001; |
| } |
| } |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public com.google.protobuf.ProtocolStringList |
| getRecordProtocolsList() { |
| return recordProtocols_.getUnmodifiableView(); |
| } |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public int getRecordProtocolsCount() { |
| return recordProtocols_.size(); |
| } |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public java.lang.String getRecordProtocols(int index) { |
| return recordProtocols_.get(index); |
| } |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public com.google.protobuf.ByteString |
| getRecordProtocolsBytes(int index) { |
| return recordProtocols_.getByteString(index); |
| } |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public Builder setRecordProtocols( |
| int index, java.lang.String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| ensureRecordProtocolsIsMutable(); |
| recordProtocols_.set(index, value); |
| onChanged(); |
| return this; |
| } |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public Builder addRecordProtocols( |
| java.lang.String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| ensureRecordProtocolsIsMutable(); |
| recordProtocols_.add(value); |
| onChanged(); |
| return this; |
| } |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public Builder addAllRecordProtocols( |
| java.lang.Iterable<java.lang.String> values) { |
| ensureRecordProtocolsIsMutable(); |
| com.google.protobuf.AbstractMessageLite.Builder.addAll( |
| values, recordProtocols_); |
| onChanged(); |
| return this; |
| } |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public Builder clearRecordProtocols() { |
| recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| onChanged(); |
| return this; |
| } |
| /** |
| * <pre> |
| * The record protocols supported by the server, e.g., |
| * "ALTSRP_GCM_AES128". |
| * </pre> |
| * |
| * <code>repeated string record_protocols = 1;</code> |
| */ |
| public Builder addRecordProtocolsBytes( |
| com.google.protobuf.ByteString value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| checkByteStringIsUtf8(value); |
| ensureRecordProtocolsIsMutable(); |
| recordProtocols_.add(value); |
| onChanged(); |
| return this; |
| } |
| |
| private java.util.List<io.grpc.alts.internal.Identity> localIdentities_ = |
| java.util.Collections.emptyList(); |
| private void ensureLocalIdentitiesIsMutable() { |
| if (!((bitField0_ & 0x00000002) == 0x00000002)) { |
| localIdentities_ = new java.util.ArrayList<io.grpc.alts.internal.Identity>(localIdentities_); |
| bitField0_ |= 0x00000002; |
| } |
| } |
| |
| private com.google.protobuf.RepeatedFieldBuilderV3< |
| io.grpc.alts.internal.Identity, io.grpc.alts.internal.Identity.Builder, io.grpc.alts.internal.IdentityOrBuilder> localIdentitiesBuilder_; |
| |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public java.util.List<io.grpc.alts.internal.Identity> getLocalIdentitiesList() { |
| if (localIdentitiesBuilder_ == null) { |
| return java.util.Collections.unmodifiableList(localIdentities_); |
| } else { |
| return localIdentitiesBuilder_.getMessageList(); |
| } |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public int getLocalIdentitiesCount() { |
| if (localIdentitiesBuilder_ == null) { |
| return localIdentities_.size(); |
| } else { |
| return localIdentitiesBuilder_.getCount(); |
| } |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public io.grpc.alts.internal.Identity getLocalIdentities(int index) { |
| if (localIdentitiesBuilder_ == null) { |
| return localIdentities_.get(index); |
| } else { |
| return localIdentitiesBuilder_.getMessage(index); |
| } |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public Builder setLocalIdentities( |
| int index, io.grpc.alts.internal.Identity value) { |
| if (localIdentitiesBuilder_ == null) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| ensureLocalIdentitiesIsMutable(); |
| localIdentities_.set(index, value); |
| onChanged(); |
| } else { |
| localIdentitiesBuilder_.setMessage(index, value); |
| } |
| return this; |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public Builder setLocalIdentities( |
| int index, io.grpc.alts.internal.Identity.Builder builderForValue) { |
| if (localIdentitiesBuilder_ == null) { |
| ensureLocalIdentitiesIsMutable(); |
| localIdentities_.set(index, builderForValue.build()); |
| onChanged(); |
| } else { |
| localIdentitiesBuilder_.setMessage(index, builderForValue.build()); |
| } |
| return this; |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public Builder addLocalIdentities(io.grpc.alts.internal.Identity value) { |
| if (localIdentitiesBuilder_ == null) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| ensureLocalIdentitiesIsMutable(); |
| localIdentities_.add(value); |
| onChanged(); |
| } else { |
| localIdentitiesBuilder_.addMessage(value); |
| } |
| return this; |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public Builder addLocalIdentities( |
| int index, io.grpc.alts.internal.Identity value) { |
| if (localIdentitiesBuilder_ == null) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| ensureLocalIdentitiesIsMutable(); |
| localIdentities_.add(index, value); |
| onChanged(); |
| } else { |
| localIdentitiesBuilder_.addMessage(index, value); |
| } |
| return this; |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public Builder addLocalIdentities( |
| io.grpc.alts.internal.Identity.Builder builderForValue) { |
| if (localIdentitiesBuilder_ == null) { |
| ensureLocalIdentitiesIsMutable(); |
| localIdentities_.add(builderForValue.build()); |
| onChanged(); |
| } else { |
| localIdentitiesBuilder_.addMessage(builderForValue.build()); |
| } |
| return this; |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public Builder addLocalIdentities( |
| int index, io.grpc.alts.internal.Identity.Builder builderForValue) { |
| if (localIdentitiesBuilder_ == null) { |
| ensureLocalIdentitiesIsMutable(); |
| localIdentities_.add(index, builderForValue.build()); |
| onChanged(); |
| } else { |
| localIdentitiesBuilder_.addMessage(index, builderForValue.build()); |
| } |
| return this; |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public Builder addAllLocalIdentities( |
| java.lang.Iterable<? extends io.grpc.alts.internal.Identity> values) { |
| if (localIdentitiesBuilder_ == null) { |
| ensureLocalIdentitiesIsMutable(); |
| com.google.protobuf.AbstractMessageLite.Builder.addAll( |
| values, localIdentities_); |
| onChanged(); |
| } else { |
| localIdentitiesBuilder_.addAllMessages(values); |
| } |
| return this; |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public Builder clearLocalIdentities() { |
| if (localIdentitiesBuilder_ == null) { |
| localIdentities_ = java.util.Collections.emptyList(); |
| bitField0_ = (bitField0_ & ~0x00000002); |
| onChanged(); |
| } else { |
| localIdentitiesBuilder_.clear(); |
| } |
| return this; |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public Builder removeLocalIdentities(int index) { |
| if (localIdentitiesBuilder_ == null) { |
| ensureLocalIdentitiesIsMutable(); |
| localIdentities_.remove(index); |
| onChanged(); |
| } else { |
| localIdentitiesBuilder_.remove(index); |
| } |
| return this; |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public io.grpc.alts.internal.Identity.Builder getLocalIdentitiesBuilder( |
| int index) { |
| return getLocalIdentitiesFieldBuilder().getBuilder(index); |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public io.grpc.alts.internal.IdentityOrBuilder getLocalIdentitiesOrBuilder( |
| int index) { |
| if (localIdentitiesBuilder_ == null) { |
| return localIdentities_.get(index); } else { |
| return localIdentitiesBuilder_.getMessageOrBuilder(index); |
| } |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public java.util.List<? extends io.grpc.alts.internal.IdentityOrBuilder> |
| getLocalIdentitiesOrBuilderList() { |
| if (localIdentitiesBuilder_ != null) { |
| return localIdentitiesBuilder_.getMessageOrBuilderList(); |
| } else { |
| return java.util.Collections.unmodifiableList(localIdentities_); |
| } |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public io.grpc.alts.internal.Identity.Builder addLocalIdentitiesBuilder() { |
| return getLocalIdentitiesFieldBuilder().addBuilder( |
| io.grpc.alts.internal.Identity.getDefaultInstance()); |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public io.grpc.alts.internal.Identity.Builder addLocalIdentitiesBuilder( |
| int index) { |
| return getLocalIdentitiesFieldBuilder().addBuilder( |
| index, io.grpc.alts.internal.Identity.getDefaultInstance()); |
| } |
| /** |
| * <pre> |
| * (Optional) A list of local identities supported by the server, if |
| * specified. Otherwise, the handshaker chooses a default local identity. |
| * </pre> |
| * |
| * <code>repeated .grpc.gcp.Identity local_identities = 2;</code> |
| */ |
| public java.util.List<io.grpc.alts.internal.Identity.Builder> |
| getLocalIdentitiesBuilderList() { |
| return getLocalIdentitiesFieldBuilder().getBuilderList(); |
| } |
| private com.google.protobuf.RepeatedFieldBuilderV3< |
| io.grpc.alts.internal.Identity, io.grpc.alts.internal.Identity.Builder, io.grpc.alts.internal.IdentityOrBuilder> |
| getLocalIdentitiesFieldBuilder() { |
| if (localIdentitiesBuilder_ == null) { |
| localIdentitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< |
| io.grpc.alts.internal.Identity, io.grpc.alts.internal.Identity.Builder, io.grpc.alts.internal.IdentityOrBuilder>( |
| localIdentities_, |
| ((bitField0_ & 0x00000002) == 0x00000002), |
| getParentForChildren(), |
| isClean()); |
| localIdentities_ = null; |
| } |
| return localIdentitiesBuilder_; |
| } |
| public final Builder setUnknownFields( |
| final com.google.protobuf.UnknownFieldSet unknownFields) { |
| return super.setUnknownFieldsProto3(unknownFields); |
| } |
| |
| public final Builder mergeUnknownFields( |
| final com.google.protobuf.UnknownFieldSet unknownFields) { |
| return super.mergeUnknownFields(unknownFields); |
| } |
| |
| |
| // @@protoc_insertion_point(builder_scope:grpc.gcp.ServerHandshakeParameters) |
| } |
| |
| // @@protoc_insertion_point(class_scope:grpc.gcp.ServerHandshakeParameters) |
| private static final io.grpc.alts.internal.ServerHandshakeParameters DEFAULT_INSTANCE; |
| static { |
| DEFAULT_INSTANCE = new io.grpc.alts.internal.ServerHandshakeParameters(); |
| } |
| |
| public static io.grpc.alts.internal.ServerHandshakeParameters getDefaultInstance() { |
| return DEFAULT_INSTANCE; |
| } |
| |
| private static final com.google.protobuf.Parser<ServerHandshakeParameters> |
| PARSER = new com.google.protobuf.AbstractParser<ServerHandshakeParameters>() { |
| public ServerHandshakeParameters parsePartialFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return new ServerHandshakeParameters(input, extensionRegistry); |
| } |
| }; |
| |
| public static com.google.protobuf.Parser<ServerHandshakeParameters> parser() { |
| return PARSER; |
| } |
| |
| @java.lang.Override |
| public com.google.protobuf.Parser<ServerHandshakeParameters> getParserForType() { |
| return PARSER; |
| } |
| |
| public io.grpc.alts.internal.ServerHandshakeParameters getDefaultInstanceForType() { |
| return DEFAULT_INSTANCE; |
| } |
| |
| } |
| |