blob: 16680c73a3466911c8a7cdd1efa80c53866dc676 [file] [log] [blame]
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/gcp/handshaker.proto
package io.grpc.alts.internal;
/**
* Protobuf type {@code grpc.gcp.HandshakerResult}
*/
public final class HandshakerResult extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gcp.HandshakerResult)
HandshakerResultOrBuilder {
private static final long serialVersionUID = 0L;
// Use HandshakerResult.newBuilder() to construct.
private HandshakerResult(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private HandshakerResult() {
applicationProtocol_ = "";
recordProtocol_ = "";
keyData_ = com.google.protobuf.ByteString.EMPTY;
keepChannelOpen_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HandshakerResult(
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();
applicationProtocol_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
recordProtocol_ = s;
break;
}
case 26: {
keyData_ = input.readBytes();
break;
}
case 34: {
io.grpc.alts.internal.Identity.Builder subBuilder = null;
if (peerIdentity_ != null) {
subBuilder = peerIdentity_.toBuilder();
}
peerIdentity_ = input.readMessage(io.grpc.alts.internal.Identity.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(peerIdentity_);
peerIdentity_ = subBuilder.buildPartial();
}
break;
}
case 42: {
io.grpc.alts.internal.Identity.Builder subBuilder = null;
if (localIdentity_ != null) {
subBuilder = localIdentity_.toBuilder();
}
localIdentity_ = input.readMessage(io.grpc.alts.internal.Identity.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(localIdentity_);
localIdentity_ = subBuilder.buildPartial();
}
break;
}
case 48: {
keepChannelOpen_ = input.readBool();
break;
}
case 58: {
io.grpc.alts.internal.RpcProtocolVersions.Builder subBuilder = null;
if (peerRpcVersions_ != null) {
subBuilder = peerRpcVersions_.toBuilder();
}
peerRpcVersions_ = input.readMessage(io.grpc.alts.internal.RpcProtocolVersions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(peerRpcVersions_);
peerRpcVersions_ = subBuilder.buildPartial();
}
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 io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerResult_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.alts.internal.HandshakerResult.class, io.grpc.alts.internal.HandshakerResult.Builder.class);
}
public static final int APPLICATION_PROTOCOL_FIELD_NUMBER = 1;
private volatile java.lang.Object applicationProtocol_;
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public java.lang.String getApplicationProtocol() {
java.lang.Object ref = applicationProtocol_;
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();
applicationProtocol_ = s;
return s;
}
}
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public com.google.protobuf.ByteString
getApplicationProtocolBytes() {
java.lang.Object ref = applicationProtocol_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
applicationProtocol_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RECORD_PROTOCOL_FIELD_NUMBER = 2;
private volatile java.lang.Object recordProtocol_;
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public java.lang.String getRecordProtocol() {
java.lang.Object ref = recordProtocol_;
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();
recordProtocol_ = s;
return s;
}
}
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public com.google.protobuf.ByteString
getRecordProtocolBytes() {
java.lang.Object ref = recordProtocol_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
recordProtocol_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int KEY_DATA_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString keyData_;
/**
* <pre>
* Cryptographic key data. The key data may be more than the key length
* required for the record protocol, thus the client of the handshaker
* service needs to truncate the key data into the right key length.
* </pre>
*
* <code>bytes key_data = 3;</code>
*/
public com.google.protobuf.ByteString getKeyData() {
return keyData_;
}
public static final int PEER_IDENTITY_FIELD_NUMBER = 4;
private io.grpc.alts.internal.Identity peerIdentity_;
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
public boolean hasPeerIdentity() {
return peerIdentity_ != null;
}
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
public io.grpc.alts.internal.Identity getPeerIdentity() {
return peerIdentity_ == null ? io.grpc.alts.internal.Identity.getDefaultInstance() : peerIdentity_;
}
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
public io.grpc.alts.internal.IdentityOrBuilder getPeerIdentityOrBuilder() {
return getPeerIdentity();
}
public static final int LOCAL_IDENTITY_FIELD_NUMBER = 5;
private io.grpc.alts.internal.Identity localIdentity_;
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
public boolean hasLocalIdentity() {
return localIdentity_ != null;
}
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
public io.grpc.alts.internal.Identity getLocalIdentity() {
return localIdentity_ == null ? io.grpc.alts.internal.Identity.getDefaultInstance() : localIdentity_;
}
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
public io.grpc.alts.internal.IdentityOrBuilder getLocalIdentityOrBuilder() {
return getLocalIdentity();
}
public static final int KEEP_CHANNEL_OPEN_FIELD_NUMBER = 6;
private boolean keepChannelOpen_;
/**
* <pre>
* Indicate whether the handshaker service client should keep the channel
* between the handshaker service open, e.g., in order to handle
* post-handshake messages in the future.
* </pre>
*
* <code>bool keep_channel_open = 6;</code>
*/
public boolean getKeepChannelOpen() {
return keepChannelOpen_;
}
public static final int PEER_RPC_VERSIONS_FIELD_NUMBER = 7;
private io.grpc.alts.internal.RpcProtocolVersions peerRpcVersions_;
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
public boolean hasPeerRpcVersions() {
return peerRpcVersions_ != null;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
public io.grpc.alts.internal.RpcProtocolVersions getPeerRpcVersions() {
return peerRpcVersions_ == null ? io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
public io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder() {
return getPeerRpcVersions();
}
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 {
if (!getApplicationProtocolBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, applicationProtocol_);
}
if (!getRecordProtocolBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordProtocol_);
}
if (!keyData_.isEmpty()) {
output.writeBytes(3, keyData_);
}
if (peerIdentity_ != null) {
output.writeMessage(4, getPeerIdentity());
}
if (localIdentity_ != null) {
output.writeMessage(5, getLocalIdentity());
}
if (keepChannelOpen_ != false) {
output.writeBool(6, keepChannelOpen_);
}
if (peerRpcVersions_ != null) {
output.writeMessage(7, getPeerRpcVersions());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getApplicationProtocolBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, applicationProtocol_);
}
if (!getRecordProtocolBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recordProtocol_);
}
if (!keyData_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, keyData_);
}
if (peerIdentity_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getPeerIdentity());
}
if (localIdentity_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getLocalIdentity());
}
if (keepChannelOpen_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, keepChannelOpen_);
}
if (peerRpcVersions_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getPeerRpcVersions());
}
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.HandshakerResult)) {
return super.equals(obj);
}
io.grpc.alts.internal.HandshakerResult other = (io.grpc.alts.internal.HandshakerResult) obj;
boolean result = true;
result = result && getApplicationProtocol()
.equals(other.getApplicationProtocol());
result = result && getRecordProtocol()
.equals(other.getRecordProtocol());
result = result && getKeyData()
.equals(other.getKeyData());
result = result && (hasPeerIdentity() == other.hasPeerIdentity());
if (hasPeerIdentity()) {
result = result && getPeerIdentity()
.equals(other.getPeerIdentity());
}
result = result && (hasLocalIdentity() == other.hasLocalIdentity());
if (hasLocalIdentity()) {
result = result && getLocalIdentity()
.equals(other.getLocalIdentity());
}
result = result && (getKeepChannelOpen()
== other.getKeepChannelOpen());
result = result && (hasPeerRpcVersions() == other.hasPeerRpcVersions());
if (hasPeerRpcVersions()) {
result = result && getPeerRpcVersions()
.equals(other.getPeerRpcVersions());
}
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) + APPLICATION_PROTOCOL_FIELD_NUMBER;
hash = (53 * hash) + getApplicationProtocol().hashCode();
hash = (37 * hash) + RECORD_PROTOCOL_FIELD_NUMBER;
hash = (53 * hash) + getRecordProtocol().hashCode();
hash = (37 * hash) + KEY_DATA_FIELD_NUMBER;
hash = (53 * hash) + getKeyData().hashCode();
if (hasPeerIdentity()) {
hash = (37 * hash) + PEER_IDENTITY_FIELD_NUMBER;
hash = (53 * hash) + getPeerIdentity().hashCode();
}
if (hasLocalIdentity()) {
hash = (37 * hash) + LOCAL_IDENTITY_FIELD_NUMBER;
hash = (53 * hash) + getLocalIdentity().hashCode();
}
hash = (37 * hash) + KEEP_CHANNEL_OPEN_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getKeepChannelOpen());
if (hasPeerRpcVersions()) {
hash = (37 * hash) + PEER_RPC_VERSIONS_FIELD_NUMBER;
hash = (53 * hash) + getPeerRpcVersions().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grpc.alts.internal.HandshakerResult parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.alts.internal.HandshakerResult 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.HandshakerResult parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.alts.internal.HandshakerResult 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.HandshakerResult parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.alts.internal.HandshakerResult parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.alts.internal.HandshakerResult parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.alts.internal.HandshakerResult 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.HandshakerResult parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.grpc.alts.internal.HandshakerResult 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.HandshakerResult parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.alts.internal.HandshakerResult 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.HandshakerResult 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.HandshakerResult}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:grpc.gcp.HandshakerResult)
io.grpc.alts.internal.HandshakerResultOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerResult_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.alts.internal.HandshakerResult.class, io.grpc.alts.internal.HandshakerResult.Builder.class);
}
// Construct using io.grpc.alts.internal.HandshakerResult.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
applicationProtocol_ = "";
recordProtocol_ = "";
keyData_ = com.google.protobuf.ByteString.EMPTY;
if (peerIdentityBuilder_ == null) {
peerIdentity_ = null;
} else {
peerIdentity_ = null;
peerIdentityBuilder_ = null;
}
if (localIdentityBuilder_ == null) {
localIdentity_ = null;
} else {
localIdentity_ = null;
localIdentityBuilder_ = null;
}
keepChannelOpen_ = false;
if (peerRpcVersionsBuilder_ == null) {
peerRpcVersions_ = null;
} else {
peerRpcVersions_ = null;
peerRpcVersionsBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerResult_descriptor;
}
public io.grpc.alts.internal.HandshakerResult getDefaultInstanceForType() {
return io.grpc.alts.internal.HandshakerResult.getDefaultInstance();
}
public io.grpc.alts.internal.HandshakerResult build() {
io.grpc.alts.internal.HandshakerResult result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public io.grpc.alts.internal.HandshakerResult buildPartial() {
io.grpc.alts.internal.HandshakerResult result = new io.grpc.alts.internal.HandshakerResult(this);
result.applicationProtocol_ = applicationProtocol_;
result.recordProtocol_ = recordProtocol_;
result.keyData_ = keyData_;
if (peerIdentityBuilder_ == null) {
result.peerIdentity_ = peerIdentity_;
} else {
result.peerIdentity_ = peerIdentityBuilder_.build();
}
if (localIdentityBuilder_ == null) {
result.localIdentity_ = localIdentity_;
} else {
result.localIdentity_ = localIdentityBuilder_.build();
}
result.keepChannelOpen_ = keepChannelOpen_;
if (peerRpcVersionsBuilder_ == null) {
result.peerRpcVersions_ = peerRpcVersions_;
} else {
result.peerRpcVersions_ = peerRpcVersionsBuilder_.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.HandshakerResult) {
return mergeFrom((io.grpc.alts.internal.HandshakerResult)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grpc.alts.internal.HandshakerResult other) {
if (other == io.grpc.alts.internal.HandshakerResult.getDefaultInstance()) return this;
if (!other.getApplicationProtocol().isEmpty()) {
applicationProtocol_ = other.applicationProtocol_;
onChanged();
}
if (!other.getRecordProtocol().isEmpty()) {
recordProtocol_ = other.recordProtocol_;
onChanged();
}
if (other.getKeyData() != com.google.protobuf.ByteString.EMPTY) {
setKeyData(other.getKeyData());
}
if (other.hasPeerIdentity()) {
mergePeerIdentity(other.getPeerIdentity());
}
if (other.hasLocalIdentity()) {
mergeLocalIdentity(other.getLocalIdentity());
}
if (other.getKeepChannelOpen() != false) {
setKeepChannelOpen(other.getKeepChannelOpen());
}
if (other.hasPeerRpcVersions()) {
mergePeerRpcVersions(other.getPeerRpcVersions());
}
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.HandshakerResult parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.alts.internal.HandshakerResult) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object applicationProtocol_ = "";
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public java.lang.String getApplicationProtocol() {
java.lang.Object ref = applicationProtocol_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
applicationProtocol_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public com.google.protobuf.ByteString
getApplicationProtocolBytes() {
java.lang.Object ref = applicationProtocol_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
applicationProtocol_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public Builder setApplicationProtocol(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
applicationProtocol_ = value;
onChanged();
return this;
}
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public Builder clearApplicationProtocol() {
applicationProtocol_ = getDefaultInstance().getApplicationProtocol();
onChanged();
return this;
}
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public Builder setApplicationProtocolBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
applicationProtocol_ = value;
onChanged();
return this;
}
private java.lang.Object recordProtocol_ = "";
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public java.lang.String getRecordProtocol() {
java.lang.Object ref = recordProtocol_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
recordProtocol_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public com.google.protobuf.ByteString
getRecordProtocolBytes() {
java.lang.Object ref = recordProtocol_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
recordProtocol_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public Builder setRecordProtocol(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
recordProtocol_ = value;
onChanged();
return this;
}
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public Builder clearRecordProtocol() {
recordProtocol_ = getDefaultInstance().getRecordProtocol();
onChanged();
return this;
}
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public Builder setRecordProtocolBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
recordProtocol_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString keyData_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* Cryptographic key data. The key data may be more than the key length
* required for the record protocol, thus the client of the handshaker
* service needs to truncate the key data into the right key length.
* </pre>
*
* <code>bytes key_data = 3;</code>
*/
public com.google.protobuf.ByteString getKeyData() {
return keyData_;
}
/**
* <pre>
* Cryptographic key data. The key data may be more than the key length
* required for the record protocol, thus the client of the handshaker
* service needs to truncate the key data into the right key length.
* </pre>
*
* <code>bytes key_data = 3;</code>
*/
public Builder setKeyData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
keyData_ = value;
onChanged();
return this;
}
/**
* <pre>
* Cryptographic key data. The key data may be more than the key length
* required for the record protocol, thus the client of the handshaker
* service needs to truncate the key data into the right key length.
* </pre>
*
* <code>bytes key_data = 3;</code>
*/
public Builder clearKeyData() {
keyData_ = getDefaultInstance().getKeyData();
onChanged();
return this;
}
private io.grpc.alts.internal.Identity peerIdentity_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.alts.internal.Identity, io.grpc.alts.internal.Identity.Builder, io.grpc.alts.internal.IdentityOrBuilder> peerIdentityBuilder_;
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
public boolean hasPeerIdentity() {
return peerIdentityBuilder_ != null || peerIdentity_ != null;
}
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
public io.grpc.alts.internal.Identity getPeerIdentity() {
if (peerIdentityBuilder_ == null) {
return peerIdentity_ == null ? io.grpc.alts.internal.Identity.getDefaultInstance() : peerIdentity_;
} else {
return peerIdentityBuilder_.getMessage();
}
}
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
public Builder setPeerIdentity(io.grpc.alts.internal.Identity value) {
if (peerIdentityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
peerIdentity_ = value;
onChanged();
} else {
peerIdentityBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
public Builder setPeerIdentity(
io.grpc.alts.internal.Identity.Builder builderForValue) {
if (peerIdentityBuilder_ == null) {
peerIdentity_ = builderForValue.build();
onChanged();
} else {
peerIdentityBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
public Builder mergePeerIdentity(io.grpc.alts.internal.Identity value) {
if (peerIdentityBuilder_ == null) {
if (peerIdentity_ != null) {
peerIdentity_ =
io.grpc.alts.internal.Identity.newBuilder(peerIdentity_).mergeFrom(value).buildPartial();
} else {
peerIdentity_ = value;
}
onChanged();
} else {
peerIdentityBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
public Builder clearPeerIdentity() {
if (peerIdentityBuilder_ == null) {
peerIdentity_ = null;
onChanged();
} else {
peerIdentity_ = null;
peerIdentityBuilder_ = null;
}
return this;
}
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
public io.grpc.alts.internal.Identity.Builder getPeerIdentityBuilder() {
onChanged();
return getPeerIdentityFieldBuilder().getBuilder();
}
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
public io.grpc.alts.internal.IdentityOrBuilder getPeerIdentityOrBuilder() {
if (peerIdentityBuilder_ != null) {
return peerIdentityBuilder_.getMessageOrBuilder();
} else {
return peerIdentity_ == null ?
io.grpc.alts.internal.Identity.getDefaultInstance() : peerIdentity_;
}
}
/**
* <pre>
* The authenticated identity of the peer.
* </pre>
*
* <code>.grpc.gcp.Identity peer_identity = 4;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.alts.internal.Identity, io.grpc.alts.internal.Identity.Builder, io.grpc.alts.internal.IdentityOrBuilder>
getPeerIdentityFieldBuilder() {
if (peerIdentityBuilder_ == null) {
peerIdentityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.grpc.alts.internal.Identity, io.grpc.alts.internal.Identity.Builder, io.grpc.alts.internal.IdentityOrBuilder>(
getPeerIdentity(),
getParentForChildren(),
isClean());
peerIdentity_ = null;
}
return peerIdentityBuilder_;
}
private io.grpc.alts.internal.Identity localIdentity_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.alts.internal.Identity, io.grpc.alts.internal.Identity.Builder, io.grpc.alts.internal.IdentityOrBuilder> localIdentityBuilder_;
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
public boolean hasLocalIdentity() {
return localIdentityBuilder_ != null || localIdentity_ != null;
}
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
public io.grpc.alts.internal.Identity getLocalIdentity() {
if (localIdentityBuilder_ == null) {
return localIdentity_ == null ? io.grpc.alts.internal.Identity.getDefaultInstance() : localIdentity_;
} else {
return localIdentityBuilder_.getMessage();
}
}
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
public Builder setLocalIdentity(io.grpc.alts.internal.Identity value) {
if (localIdentityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
localIdentity_ = value;
onChanged();
} else {
localIdentityBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
public Builder setLocalIdentity(
io.grpc.alts.internal.Identity.Builder builderForValue) {
if (localIdentityBuilder_ == null) {
localIdentity_ = builderForValue.build();
onChanged();
} else {
localIdentityBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
public Builder mergeLocalIdentity(io.grpc.alts.internal.Identity value) {
if (localIdentityBuilder_ == null) {
if (localIdentity_ != null) {
localIdentity_ =
io.grpc.alts.internal.Identity.newBuilder(localIdentity_).mergeFrom(value).buildPartial();
} else {
localIdentity_ = value;
}
onChanged();
} else {
localIdentityBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
public Builder clearLocalIdentity() {
if (localIdentityBuilder_ == null) {
localIdentity_ = null;
onChanged();
} else {
localIdentity_ = null;
localIdentityBuilder_ = null;
}
return this;
}
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
public io.grpc.alts.internal.Identity.Builder getLocalIdentityBuilder() {
onChanged();
return getLocalIdentityFieldBuilder().getBuilder();
}
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
public io.grpc.alts.internal.IdentityOrBuilder getLocalIdentityOrBuilder() {
if (localIdentityBuilder_ != null) {
return localIdentityBuilder_.getMessageOrBuilder();
} else {
return localIdentity_ == null ?
io.grpc.alts.internal.Identity.getDefaultInstance() : localIdentity_;
}
}
/**
* <pre>
* The local identity used in the handshake.
* </pre>
*
* <code>.grpc.gcp.Identity local_identity = 5;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.alts.internal.Identity, io.grpc.alts.internal.Identity.Builder, io.grpc.alts.internal.IdentityOrBuilder>
getLocalIdentityFieldBuilder() {
if (localIdentityBuilder_ == null) {
localIdentityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.grpc.alts.internal.Identity, io.grpc.alts.internal.Identity.Builder, io.grpc.alts.internal.IdentityOrBuilder>(
getLocalIdentity(),
getParentForChildren(),
isClean());
localIdentity_ = null;
}
return localIdentityBuilder_;
}
private boolean keepChannelOpen_ ;
/**
* <pre>
* Indicate whether the handshaker service client should keep the channel
* between the handshaker service open, e.g., in order to handle
* post-handshake messages in the future.
* </pre>
*
* <code>bool keep_channel_open = 6;</code>
*/
public boolean getKeepChannelOpen() {
return keepChannelOpen_;
}
/**
* <pre>
* Indicate whether the handshaker service client should keep the channel
* between the handshaker service open, e.g., in order to handle
* post-handshake messages in the future.
* </pre>
*
* <code>bool keep_channel_open = 6;</code>
*/
public Builder setKeepChannelOpen(boolean value) {
keepChannelOpen_ = value;
onChanged();
return this;
}
/**
* <pre>
* Indicate whether the handshaker service client should keep the channel
* between the handshaker service open, e.g., in order to handle
* post-handshake messages in the future.
* </pre>
*
* <code>bool keep_channel_open = 6;</code>
*/
public Builder clearKeepChannelOpen() {
keepChannelOpen_ = false;
onChanged();
return this;
}
private io.grpc.alts.internal.RpcProtocolVersions peerRpcVersions_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.alts.internal.RpcProtocolVersions, io.grpc.alts.internal.RpcProtocolVersions.Builder, io.grpc.alts.internal.RpcProtocolVersionsOrBuilder> peerRpcVersionsBuilder_;
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
public boolean hasPeerRpcVersions() {
return peerRpcVersionsBuilder_ != null || peerRpcVersions_ != null;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
public io.grpc.alts.internal.RpcProtocolVersions getPeerRpcVersions() {
if (peerRpcVersionsBuilder_ == null) {
return peerRpcVersions_ == null ? io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_;
} else {
return peerRpcVersionsBuilder_.getMessage();
}
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
public Builder setPeerRpcVersions(io.grpc.alts.internal.RpcProtocolVersions value) {
if (peerRpcVersionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
peerRpcVersions_ = value;
onChanged();
} else {
peerRpcVersionsBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
public Builder setPeerRpcVersions(
io.grpc.alts.internal.RpcProtocolVersions.Builder builderForValue) {
if (peerRpcVersionsBuilder_ == null) {
peerRpcVersions_ = builderForValue.build();
onChanged();
} else {
peerRpcVersionsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
public Builder mergePeerRpcVersions(io.grpc.alts.internal.RpcProtocolVersions value) {
if (peerRpcVersionsBuilder_ == null) {
if (peerRpcVersions_ != null) {
peerRpcVersions_ =
io.grpc.alts.internal.RpcProtocolVersions.newBuilder(peerRpcVersions_).mergeFrom(value).buildPartial();
} else {
peerRpcVersions_ = value;
}
onChanged();
} else {
peerRpcVersionsBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
public Builder clearPeerRpcVersions() {
if (peerRpcVersionsBuilder_ == null) {
peerRpcVersions_ = null;
onChanged();
} else {
peerRpcVersions_ = null;
peerRpcVersionsBuilder_ = null;
}
return this;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
public io.grpc.alts.internal.RpcProtocolVersions.Builder getPeerRpcVersionsBuilder() {
onChanged();
return getPeerRpcVersionsFieldBuilder().getBuilder();
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
public io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder() {
if (peerRpcVersionsBuilder_ != null) {
return peerRpcVersionsBuilder_.getMessageOrBuilder();
} else {
return peerRpcVersions_ == null ?
io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_;
}
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.alts.internal.RpcProtocolVersions, io.grpc.alts.internal.RpcProtocolVersions.Builder, io.grpc.alts.internal.RpcProtocolVersionsOrBuilder>
getPeerRpcVersionsFieldBuilder() {
if (peerRpcVersionsBuilder_ == null) {
peerRpcVersionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.grpc.alts.internal.RpcProtocolVersions, io.grpc.alts.internal.RpcProtocolVersions.Builder, io.grpc.alts.internal.RpcProtocolVersionsOrBuilder>(
getPeerRpcVersions(),
getParentForChildren(),
isClean());
peerRpcVersions_ = null;
}
return peerRpcVersionsBuilder_;
}
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.HandshakerResult)
}
// @@protoc_insertion_point(class_scope:grpc.gcp.HandshakerResult)
private static final io.grpc.alts.internal.HandshakerResult DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grpc.alts.internal.HandshakerResult();
}
public static io.grpc.alts.internal.HandshakerResult getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<HandshakerResult>
PARSER = new com.google.protobuf.AbstractParser<HandshakerResult>() {
public HandshakerResult parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HandshakerResult(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<HandshakerResult> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<HandshakerResult> getParserForType() {
return PARSER;
}
public io.grpc.alts.internal.HandshakerResult getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}