From e757c7dea0f2af48406eb87595fbf9d699946fc9 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 19 Oct 2018 14:32:40 -0700 Subject: [PATCH] alts: update alts protos to match grpc-proto --- .../alts/internal/HandshakerServiceGrpc.java | 36 +- .../io/grpc/alts/internal/AltsContext.java | 1670 ++ .../alts/internal/AltsContextOrBuilder.java | 177 + .../grpc/alts/internal/AltsContextProto.java | 80 + .../io/grpc/alts/internal/Altscontext.java | 1915 --- .../java/io/grpc/alts/internal/Endpoint.java | 736 + .../grpc/alts/internal/EndpointOrBuilder.java | 55 + .../grpc/alts/internal/HandshakeProtocol.java | 136 + .../io/grpc/alts/internal/Handshaker.java | 13709 ---------------- .../grpc/alts/internal/HandshakerProto.java | 235 + .../io/grpc/alts/internal/HandshakerReq.java | 1213 ++ .../alts/internal/HandshakerReqOrBuilder.java | 86 + .../io/grpc/alts/internal/HandshakerResp.java | 1034 ++ .../internal/HandshakerRespOrBuilder.java | 86 + .../grpc/alts/internal/HandshakerResult.java | 1554 ++ .../internal/HandshakerResultOrBuilder.java | 142 + .../grpc/alts/internal/HandshakerStatus.java | 618 + .../internal/HandshakerStatusOrBuilder.java | 36 + .../java/io/grpc/alts/internal/Identity.java | 1142 ++ .../grpc/alts/internal/IdentityOrBuilder.java | 101 + .../grpc/alts/internal/NetworkProtocol.java | 112 + .../internal/NextHandshakeMessageReq.java | 474 + .../NextHandshakeMessageReqOrBuilder.java | 20 + .../alts/internal/RpcProtocolVersions.java | 1377 ++ .../RpcProtocolVersionsOrBuilder.java | 59 + .../io/grpc/alts/internal/SecurityLevel.java | 117 + .../internal/ServerHandshakeParameters.java | 1084 ++ .../ServerHandshakeParametersOrBuilder.java | 97 + .../internal/StartClientHandshakeReq.java | 2577 +++ .../StartClientHandshakeReqOrBuilder.java | 289 + .../internal/StartServerHandshakeReq.java | 1781 ++ .../StartServerHandshakeReqOrBuilder.java | 213 + .../internal/TransportSecurityCommon.java | 1612 -- .../TransportSecurityCommonProto.java | 76 + .../grpc/alts/internal/AltsAuthContext.java | 8 +- .../grpc/alts/internal/AltsClientOptions.java | 1 - .../alts/internal/AltsHandshakerClient.java | 9 - .../alts/internal/AltsHandshakerOptions.java | 1 - .../alts/internal/AltsHandshakerStub.java | 2 - .../internal/RpcProtocolVersionsUtil.java | 3 +- .../src/main/proto/grpc/gcp/altscontext.proto | 7 + alts/src/main/proto/grpc/gcp/handshaker.proto | 10 +- .../grpc/gcp/transport_security_common.proto | 7 + .../alts/internal/AltsAuthContextTest.java | 4 - .../alts/internal/AltsClientOptionsTest.java | 1 - .../internal/AltsHandshakerClientTest.java | 5 - .../internal/AltsHandshakerOptionsTest.java | 1 - .../alts/internal/AltsHandshakerStubTest.java | 3 - .../internal/AltsProtocolNegotiatorTest.java | 1 - .../alts/internal/AltsTsiHandshakerTest.java | 3 - .../io/grpc/alts/internal/AltsTsiTest.java | 3 - .../alts/internal/MockAltsHandshakerResp.java | 4 - .../internal/RpcProtocolVersionsUtilTest.java | 3 +- 53 files changed, 17424 insertions(+), 17301 deletions(-) create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/AltsContext.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/AltsContextOrBuilder.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/AltsContextProto.java delete mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/Altscontext.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/Endpoint.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/EndpointOrBuilder.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/HandshakeProtocol.java delete mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/Handshaker.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/HandshakerProto.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/HandshakerReq.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/HandshakerReqOrBuilder.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/HandshakerResp.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/HandshakerRespOrBuilder.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/HandshakerResult.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/HandshakerResultOrBuilder.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/HandshakerStatus.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/HandshakerStatusOrBuilder.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/Identity.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/IdentityOrBuilder.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/NetworkProtocol.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/NextHandshakeMessageReq.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/NextHandshakeMessageReqOrBuilder.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/RpcProtocolVersions.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/RpcProtocolVersionsOrBuilder.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/SecurityLevel.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/ServerHandshakeParameters.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/ServerHandshakeParametersOrBuilder.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/StartClientHandshakeReq.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/StartClientHandshakeReqOrBuilder.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/StartServerHandshakeReq.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/StartServerHandshakeReqOrBuilder.java delete mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/TransportSecurityCommon.java create mode 100644 alts/src/generated/main/java/io/grpc/alts/internal/TransportSecurityCommonProto.java diff --git a/alts/src/generated/main/grpc/io/grpc/alts/internal/HandshakerServiceGrpc.java b/alts/src/generated/main/grpc/io/grpc/alts/internal/HandshakerServiceGrpc.java index 012748d110..79643affaf 100644 --- a/alts/src/generated/main/grpc/io/grpc/alts/internal/HandshakerServiceGrpc.java +++ b/alts/src/generated/main/grpc/io/grpc/alts/internal/HandshakerServiceGrpc.java @@ -27,30 +27,30 @@ public final class HandshakerServiceGrpc { public static final String SERVICE_NAME = "grpc.gcp.HandshakerService"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getDoHandshakeMethod; + private static volatile io.grpc.MethodDescriptor getDoHandshakeMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "DoHandshake", - requestType = io.grpc.alts.internal.Handshaker.HandshakerReq.class, - responseType = io.grpc.alts.internal.Handshaker.HandshakerResp.class, + requestType = io.grpc.alts.internal.HandshakerReq.class, + responseType = io.grpc.alts.internal.HandshakerResp.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - public static io.grpc.MethodDescriptor getDoHandshakeMethod() { - io.grpc.MethodDescriptor getDoHandshakeMethod; + public static io.grpc.MethodDescriptor getDoHandshakeMethod() { + io.grpc.MethodDescriptor getDoHandshakeMethod; if ((getDoHandshakeMethod = HandshakerServiceGrpc.getDoHandshakeMethod) == null) { synchronized (HandshakerServiceGrpc.class) { if ((getDoHandshakeMethod = HandshakerServiceGrpc.getDoHandshakeMethod) == null) { HandshakerServiceGrpc.getDoHandshakeMethod = getDoHandshakeMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( "grpc.gcp.HandshakerService", "DoHandshake")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.alts.internal.Handshaker.HandshakerReq.getDefaultInstance())) + io.grpc.alts.internal.HandshakerReq.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.alts.internal.Handshaker.HandshakerResp.getDefaultInstance())) + io.grpc.alts.internal.HandshakerResp.getDefaultInstance())) .setSchemaDescriptor(new HandshakerServiceMethodDescriptorSupplier("DoHandshake")) .build(); } @@ -96,8 +96,8 @@ public final class HandshakerServiceGrpc { * response before sending next request. * */ - public io.grpc.stub.StreamObserver doHandshake( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver doHandshake( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getDoHandshakeMethod(), responseObserver); } @@ -107,8 +107,8 @@ public final class HandshakerServiceGrpc { getDoHandshakeMethod(), asyncBidiStreamingCall( new MethodHandlers< - io.grpc.alts.internal.Handshaker.HandshakerReq, - io.grpc.alts.internal.Handshaker.HandshakerResp>( + io.grpc.alts.internal.HandshakerReq, + io.grpc.alts.internal.HandshakerResp>( this, METHODID_DO_HANDSHAKE))) .build(); } @@ -142,8 +142,8 @@ public final class HandshakerServiceGrpc { * response before sending next request. * */ - public io.grpc.stub.StreamObserver doHandshake( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver doHandshake( + io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getDoHandshakeMethod(), getCallOptions()), responseObserver); } @@ -218,7 +218,7 @@ public final class HandshakerServiceGrpc { switch (methodId) { case METHODID_DO_HANDSHAKE: return (io.grpc.stub.StreamObserver) serviceImpl.doHandshake( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } @@ -231,7 +231,7 @@ public final class HandshakerServiceGrpc { @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.grpc.alts.internal.Handshaker.getDescriptor(); + return io.grpc.alts.internal.HandshakerProto.getDescriptor(); } @java.lang.Override diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/AltsContext.java b/alts/src/generated/main/java/io/grpc/alts/internal/AltsContext.java new file mode 100644 index 0000000000..b8dbb7b1a5 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/AltsContext.java @@ -0,0 +1,1670 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/altscontext.proto + +package io.grpc.alts.internal; + +/** + * Protobuf type {@code grpc.gcp.AltsContext} + */ +public final class AltsContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gcp.AltsContext) + AltsContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use AltsContext.newBuilder() to construct. + private AltsContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AltsContext() { + applicationProtocol_ = ""; + recordProtocol_ = ""; + securityLevel_ = 0; + peerServiceAccount_ = ""; + localServiceAccount_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AltsContext( + 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 24: { + int rawValue = input.readEnum(); + + securityLevel_ = rawValue; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + peerServiceAccount_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + localServiceAccount_ = s; + break; + } + case 50: { + 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; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + peerAttributes_ = com.google.protobuf.MapField.newMapField( + PeerAttributesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000040; + } + com.google.protobuf.MapEntry + peerAttributes__ = input.readMessage( + PeerAttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + peerAttributes_.getMutableMap().put( + peerAttributes__.getKey(), peerAttributes__.getValue()); + 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.AltsContextProto.internal_static_grpc_gcp_AltsContext_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 7: + return internalGetPeerAttributes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.AltsContextProto.internal_static_grpc_gcp_AltsContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.AltsContext.class, io.grpc.alts.internal.AltsContext.Builder.class); + } + + private int bitField0_; + public static final int APPLICATION_PROTOCOL_FIELD_NUMBER = 1; + private volatile java.lang.Object applicationProtocol_; + /** + *
+   * The application protocol negotiated for this connection.
+   * 
+ * + * string application_protocol = 1; + */ + 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; + } + } + /** + *
+   * The application protocol negotiated for this connection.
+   * 
+ * + * string application_protocol = 1; + */ + 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_; + /** + *
+   * The record protocol negotiated for this connection.
+   * 
+ * + * string record_protocol = 2; + */ + 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; + } + } + /** + *
+   * The record protocol negotiated for this connection.
+   * 
+ * + * string record_protocol = 2; + */ + 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 SECURITY_LEVEL_FIELD_NUMBER = 3; + private int securityLevel_; + /** + *
+   * The security level of the created secure channel.
+   * 
+ * + * .grpc.gcp.SecurityLevel security_level = 3; + */ + public int getSecurityLevelValue() { + return securityLevel_; + } + /** + *
+   * The security level of the created secure channel.
+   * 
+ * + * .grpc.gcp.SecurityLevel security_level = 3; + */ + public io.grpc.alts.internal.SecurityLevel getSecurityLevel() { + io.grpc.alts.internal.SecurityLevel result = io.grpc.alts.internal.SecurityLevel.valueOf(securityLevel_); + return result == null ? io.grpc.alts.internal.SecurityLevel.UNRECOGNIZED : result; + } + + public static final int PEER_SERVICE_ACCOUNT_FIELD_NUMBER = 4; + private volatile java.lang.Object peerServiceAccount_; + /** + *
+   * The peer service account.
+   * 
+ * + * string peer_service_account = 4; + */ + public java.lang.String getPeerServiceAccount() { + java.lang.Object ref = peerServiceAccount_; + 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(); + peerServiceAccount_ = s; + return s; + } + } + /** + *
+   * The peer service account.
+   * 
+ * + * string peer_service_account = 4; + */ + public com.google.protobuf.ByteString + getPeerServiceAccountBytes() { + java.lang.Object ref = peerServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + peerServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCAL_SERVICE_ACCOUNT_FIELD_NUMBER = 5; + private volatile java.lang.Object localServiceAccount_; + /** + *
+   * The local service account.
+   * 
+ * + * string local_service_account = 5; + */ + public java.lang.String getLocalServiceAccount() { + java.lang.Object ref = localServiceAccount_; + 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(); + localServiceAccount_ = s; + return s; + } + } + /** + *
+   * The local service account.
+   * 
+ * + * string local_service_account = 5; + */ + public com.google.protobuf.ByteString + getLocalServiceAccountBytes() { + java.lang.Object ref = localServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + localServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEER_RPC_VERSIONS_FIELD_NUMBER = 6; + private io.grpc.alts.internal.RpcProtocolVersions peerRpcVersions_; + /** + *
+   * The RPC protocol versions supported by the peer.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + public boolean hasPeerRpcVersions() { + return peerRpcVersions_ != null; + } + /** + *
+   * The RPC protocol versions supported by the peer.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + public io.grpc.alts.internal.RpcProtocolVersions getPeerRpcVersions() { + return peerRpcVersions_ == null ? io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_; + } + /** + *
+   * The RPC protocol versions supported by the peer.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + public io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder() { + return getPeerRpcVersions(); + } + + public static final int PEER_ATTRIBUTES_FIELD_NUMBER = 7; + private static final class PeerAttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grpc.alts.internal.AltsContextProto.internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> peerAttributes_; + private com.google.protobuf.MapField + internalGetPeerAttributes() { + if (peerAttributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PeerAttributesDefaultEntryHolder.defaultEntry); + } + return peerAttributes_; + } + + public int getPeerAttributesCount() { + return internalGetPeerAttributes().getMap().size(); + } + /** + *
+   * Additional attributes of the peer.
+   * 
+ * + * map<string, string> peer_attributes = 7; + */ + + public boolean containsPeerAttributes( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetPeerAttributes().getMap().containsKey(key); + } + /** + * Use {@link #getPeerAttributesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getPeerAttributes() { + return getPeerAttributesMap(); + } + /** + *
+   * Additional attributes of the peer.
+   * 
+ * + * map<string, string> peer_attributes = 7; + */ + + public java.util.Map getPeerAttributesMap() { + return internalGetPeerAttributes().getMap(); + } + /** + *
+   * Additional attributes of the peer.
+   * 
+ * + * map<string, string> peer_attributes = 7; + */ + + public java.lang.String getPeerAttributesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetPeerAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Additional attributes of the peer.
+   * 
+ * + * map<string, string> peer_attributes = 7; + */ + + public java.lang.String getPeerAttributesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetPeerAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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 (securityLevel_ != io.grpc.alts.internal.SecurityLevel.SECURITY_NONE.getNumber()) { + output.writeEnum(3, securityLevel_); + } + if (!getPeerServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, peerServiceAccount_); + } + if (!getLocalServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, localServiceAccount_); + } + if (peerRpcVersions_ != null) { + output.writeMessage(6, getPeerRpcVersions()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetPeerAttributes(), + PeerAttributesDefaultEntryHolder.defaultEntry, + 7); + 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 (securityLevel_ != io.grpc.alts.internal.SecurityLevel.SECURITY_NONE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, securityLevel_); + } + if (!getPeerServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, peerServiceAccount_); + } + if (!getLocalServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, localServiceAccount_); + } + if (peerRpcVersions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getPeerRpcVersions()); + } + for (java.util.Map.Entry entry + : internalGetPeerAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry + peerAttributes__ = PeerAttributesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, peerAttributes__); + } + 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.AltsContext)) { + return super.equals(obj); + } + io.grpc.alts.internal.AltsContext other = (io.grpc.alts.internal.AltsContext) obj; + + boolean result = true; + result = result && getApplicationProtocol() + .equals(other.getApplicationProtocol()); + result = result && getRecordProtocol() + .equals(other.getRecordProtocol()); + result = result && securityLevel_ == other.securityLevel_; + result = result && getPeerServiceAccount() + .equals(other.getPeerServiceAccount()); + result = result && getLocalServiceAccount() + .equals(other.getLocalServiceAccount()); + result = result && (hasPeerRpcVersions() == other.hasPeerRpcVersions()); + if (hasPeerRpcVersions()) { + result = result && getPeerRpcVersions() + .equals(other.getPeerRpcVersions()); + } + result = result && internalGetPeerAttributes().equals( + other.internalGetPeerAttributes()); + 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) + SECURITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + securityLevel_; + hash = (37 * hash) + PEER_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getPeerServiceAccount().hashCode(); + hash = (37 * hash) + LOCAL_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getLocalServiceAccount().hashCode(); + if (hasPeerRpcVersions()) { + hash = (37 * hash) + PEER_RPC_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPeerRpcVersions().hashCode(); + } + if (!internalGetPeerAttributes().getMap().isEmpty()) { + hash = (37 * hash) + PEER_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetPeerAttributes().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.alts.internal.AltsContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.AltsContext 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.AltsContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.AltsContext 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.AltsContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.AltsContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.alts.internal.AltsContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.AltsContext 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.AltsContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.AltsContext 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.AltsContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.AltsContext 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.AltsContext 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.AltsContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gcp.AltsContext) + io.grpc.alts.internal.AltsContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.AltsContextProto.internal_static_grpc_gcp_AltsContext_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 7: + return internalGetPeerAttributes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 7: + return internalGetMutablePeerAttributes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.AltsContextProto.internal_static_grpc_gcp_AltsContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.AltsContext.class, io.grpc.alts.internal.AltsContext.Builder.class); + } + + // Construct using io.grpc.alts.internal.AltsContext.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_ = ""; + + securityLevel_ = 0; + + peerServiceAccount_ = ""; + + localServiceAccount_ = ""; + + if (peerRpcVersionsBuilder_ == null) { + peerRpcVersions_ = null; + } else { + peerRpcVersions_ = null; + peerRpcVersionsBuilder_ = null; + } + internalGetMutablePeerAttributes().clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.alts.internal.AltsContextProto.internal_static_grpc_gcp_AltsContext_descriptor; + } + + public io.grpc.alts.internal.AltsContext getDefaultInstanceForType() { + return io.grpc.alts.internal.AltsContext.getDefaultInstance(); + } + + public io.grpc.alts.internal.AltsContext build() { + io.grpc.alts.internal.AltsContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.alts.internal.AltsContext buildPartial() { + io.grpc.alts.internal.AltsContext result = new io.grpc.alts.internal.AltsContext(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.applicationProtocol_ = applicationProtocol_; + result.recordProtocol_ = recordProtocol_; + result.securityLevel_ = securityLevel_; + result.peerServiceAccount_ = peerServiceAccount_; + result.localServiceAccount_ = localServiceAccount_; + if (peerRpcVersionsBuilder_ == null) { + result.peerRpcVersions_ = peerRpcVersions_; + } else { + result.peerRpcVersions_ = peerRpcVersionsBuilder_.build(); + } + result.peerAttributes_ = internalGetPeerAttributes(); + result.peerAttributes_.makeImmutable(); + result.bitField0_ = to_bitField0_; + 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.AltsContext) { + return mergeFrom((io.grpc.alts.internal.AltsContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.alts.internal.AltsContext other) { + if (other == io.grpc.alts.internal.AltsContext.getDefaultInstance()) return this; + if (!other.getApplicationProtocol().isEmpty()) { + applicationProtocol_ = other.applicationProtocol_; + onChanged(); + } + if (!other.getRecordProtocol().isEmpty()) { + recordProtocol_ = other.recordProtocol_; + onChanged(); + } + if (other.securityLevel_ != 0) { + setSecurityLevelValue(other.getSecurityLevelValue()); + } + if (!other.getPeerServiceAccount().isEmpty()) { + peerServiceAccount_ = other.peerServiceAccount_; + onChanged(); + } + if (!other.getLocalServiceAccount().isEmpty()) { + localServiceAccount_ = other.localServiceAccount_; + onChanged(); + } + if (other.hasPeerRpcVersions()) { + mergePeerRpcVersions(other.getPeerRpcVersions()); + } + internalGetMutablePeerAttributes().mergeFrom( + other.internalGetPeerAttributes()); + 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.AltsContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.alts.internal.AltsContext) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object applicationProtocol_ = ""; + /** + *
+     * The application protocol negotiated for this connection.
+     * 
+ * + * string application_protocol = 1; + */ + 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; + } + } + /** + *
+     * The application protocol negotiated for this connection.
+     * 
+ * + * string application_protocol = 1; + */ + 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; + } + } + /** + *
+     * The application protocol negotiated for this connection.
+     * 
+ * + * string application_protocol = 1; + */ + public Builder setApplicationProtocol( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + applicationProtocol_ = value; + onChanged(); + return this; + } + /** + *
+     * The application protocol negotiated for this connection.
+     * 
+ * + * string application_protocol = 1; + */ + public Builder clearApplicationProtocol() { + + applicationProtocol_ = getDefaultInstance().getApplicationProtocol(); + onChanged(); + return this; + } + /** + *
+     * The application protocol negotiated for this connection.
+     * 
+ * + * string application_protocol = 1; + */ + 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_ = ""; + /** + *
+     * The record protocol negotiated for this connection.
+     * 
+ * + * string record_protocol = 2; + */ + 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; + } + } + /** + *
+     * The record protocol negotiated for this connection.
+     * 
+ * + * string record_protocol = 2; + */ + 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; + } + } + /** + *
+     * The record protocol negotiated for this connection.
+     * 
+ * + * string record_protocol = 2; + */ + public Builder setRecordProtocol( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + recordProtocol_ = value; + onChanged(); + return this; + } + /** + *
+     * The record protocol negotiated for this connection.
+     * 
+ * + * string record_protocol = 2; + */ + public Builder clearRecordProtocol() { + + recordProtocol_ = getDefaultInstance().getRecordProtocol(); + onChanged(); + return this; + } + /** + *
+     * The record protocol negotiated for this connection.
+     * 
+ * + * string record_protocol = 2; + */ + public Builder setRecordProtocolBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + recordProtocol_ = value; + onChanged(); + return this; + } + + private int securityLevel_ = 0; + /** + *
+     * The security level of the created secure channel.
+     * 
+ * + * .grpc.gcp.SecurityLevel security_level = 3; + */ + public int getSecurityLevelValue() { + return securityLevel_; + } + /** + *
+     * The security level of the created secure channel.
+     * 
+ * + * .grpc.gcp.SecurityLevel security_level = 3; + */ + public Builder setSecurityLevelValue(int value) { + securityLevel_ = value; + onChanged(); + return this; + } + /** + *
+     * The security level of the created secure channel.
+     * 
+ * + * .grpc.gcp.SecurityLevel security_level = 3; + */ + public io.grpc.alts.internal.SecurityLevel getSecurityLevel() { + io.grpc.alts.internal.SecurityLevel result = io.grpc.alts.internal.SecurityLevel.valueOf(securityLevel_); + return result == null ? io.grpc.alts.internal.SecurityLevel.UNRECOGNIZED : result; + } + /** + *
+     * The security level of the created secure channel.
+     * 
+ * + * .grpc.gcp.SecurityLevel security_level = 3; + */ + public Builder setSecurityLevel(io.grpc.alts.internal.SecurityLevel value) { + if (value == null) { + throw new NullPointerException(); + } + + securityLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The security level of the created secure channel.
+     * 
+ * + * .grpc.gcp.SecurityLevel security_level = 3; + */ + public Builder clearSecurityLevel() { + + securityLevel_ = 0; + onChanged(); + return this; + } + + private java.lang.Object peerServiceAccount_ = ""; + /** + *
+     * The peer service account.
+     * 
+ * + * string peer_service_account = 4; + */ + public java.lang.String getPeerServiceAccount() { + java.lang.Object ref = peerServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The peer service account.
+     * 
+ * + * string peer_service_account = 4; + */ + public com.google.protobuf.ByteString + getPeerServiceAccountBytes() { + java.lang.Object ref = peerServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + peerServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The peer service account.
+     * 
+ * + * string peer_service_account = 4; + */ + public Builder setPeerServiceAccount( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + peerServiceAccount_ = value; + onChanged(); + return this; + } + /** + *
+     * The peer service account.
+     * 
+ * + * string peer_service_account = 4; + */ + public Builder clearPeerServiceAccount() { + + peerServiceAccount_ = getDefaultInstance().getPeerServiceAccount(); + onChanged(); + return this; + } + /** + *
+     * The peer service account.
+     * 
+ * + * string peer_service_account = 4; + */ + public Builder setPeerServiceAccountBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + peerServiceAccount_ = value; + onChanged(); + return this; + } + + private java.lang.Object localServiceAccount_ = ""; + /** + *
+     * The local service account.
+     * 
+ * + * string local_service_account = 5; + */ + public java.lang.String getLocalServiceAccount() { + java.lang.Object ref = localServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + localServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The local service account.
+     * 
+ * + * string local_service_account = 5; + */ + public com.google.protobuf.ByteString + getLocalServiceAccountBytes() { + java.lang.Object ref = localServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + localServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The local service account.
+     * 
+ * + * string local_service_account = 5; + */ + public Builder setLocalServiceAccount( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + localServiceAccount_ = value; + onChanged(); + return this; + } + /** + *
+     * The local service account.
+     * 
+ * + * string local_service_account = 5; + */ + public Builder clearLocalServiceAccount() { + + localServiceAccount_ = getDefaultInstance().getLocalServiceAccount(); + onChanged(); + return this; + } + /** + *
+     * The local service account.
+     * 
+ * + * string local_service_account = 5; + */ + public Builder setLocalServiceAccountBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + localServiceAccount_ = value; + 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_; + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + public boolean hasPeerRpcVersions() { + return peerRpcVersionsBuilder_ != null || peerRpcVersions_ != null; + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + public io.grpc.alts.internal.RpcProtocolVersions getPeerRpcVersions() { + if (peerRpcVersionsBuilder_ == null) { + return peerRpcVersions_ == null ? io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_; + } else { + return peerRpcVersionsBuilder_.getMessage(); + } + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + 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; + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + public Builder setPeerRpcVersions( + io.grpc.alts.internal.RpcProtocolVersions.Builder builderForValue) { + if (peerRpcVersionsBuilder_ == null) { + peerRpcVersions_ = builderForValue.build(); + onChanged(); + } else { + peerRpcVersionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + 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; + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + public Builder clearPeerRpcVersions() { + if (peerRpcVersionsBuilder_ == null) { + peerRpcVersions_ = null; + onChanged(); + } else { + peerRpcVersions_ = null; + peerRpcVersionsBuilder_ = null; + } + + return this; + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + public io.grpc.alts.internal.RpcProtocolVersions.Builder getPeerRpcVersionsBuilder() { + + onChanged(); + return getPeerRpcVersionsFieldBuilder().getBuilder(); + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + public io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder() { + if (peerRpcVersionsBuilder_ != null) { + return peerRpcVersionsBuilder_.getMessageOrBuilder(); + } else { + return peerRpcVersions_ == null ? + io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_; + } + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + 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_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> peerAttributes_; + private com.google.protobuf.MapField + internalGetPeerAttributes() { + if (peerAttributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PeerAttributesDefaultEntryHolder.defaultEntry); + } + return peerAttributes_; + } + private com.google.protobuf.MapField + internalGetMutablePeerAttributes() { + onChanged();; + if (peerAttributes_ == null) { + peerAttributes_ = com.google.protobuf.MapField.newMapField( + PeerAttributesDefaultEntryHolder.defaultEntry); + } + if (!peerAttributes_.isMutable()) { + peerAttributes_ = peerAttributes_.copy(); + } + return peerAttributes_; + } + + public int getPeerAttributesCount() { + return internalGetPeerAttributes().getMap().size(); + } + /** + *
+     * Additional attributes of the peer.
+     * 
+ * + * map<string, string> peer_attributes = 7; + */ + + public boolean containsPeerAttributes( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetPeerAttributes().getMap().containsKey(key); + } + /** + * Use {@link #getPeerAttributesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getPeerAttributes() { + return getPeerAttributesMap(); + } + /** + *
+     * Additional attributes of the peer.
+     * 
+ * + * map<string, string> peer_attributes = 7; + */ + + public java.util.Map getPeerAttributesMap() { + return internalGetPeerAttributes().getMap(); + } + /** + *
+     * Additional attributes of the peer.
+     * 
+ * + * map<string, string> peer_attributes = 7; + */ + + public java.lang.String getPeerAttributesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetPeerAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Additional attributes of the peer.
+     * 
+ * + * map<string, string> peer_attributes = 7; + */ + + public java.lang.String getPeerAttributesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetPeerAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearPeerAttributes() { + internalGetMutablePeerAttributes().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Additional attributes of the peer.
+     * 
+ * + * map<string, string> peer_attributes = 7; + */ + + public Builder removePeerAttributes( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutablePeerAttributes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutablePeerAttributes() { + return internalGetMutablePeerAttributes().getMutableMap(); + } + /** + *
+     * Additional attributes of the peer.
+     * 
+ * + * map<string, string> peer_attributes = 7; + */ + public Builder putPeerAttributes( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutablePeerAttributes().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Additional attributes of the peer.
+     * 
+ * + * map<string, string> peer_attributes = 7; + */ + + public Builder putAllPeerAttributes( + java.util.Map values) { + internalGetMutablePeerAttributes().getMutableMap() + .putAll(values); + return this; + } + 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.AltsContext) + } + + // @@protoc_insertion_point(class_scope:grpc.gcp.AltsContext) + private static final io.grpc.alts.internal.AltsContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.alts.internal.AltsContext(); + } + + public static io.grpc.alts.internal.AltsContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public AltsContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AltsContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.AltsContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/AltsContextOrBuilder.java b/alts/src/generated/main/java/io/grpc/alts/internal/AltsContextOrBuilder.java new file mode 100644 index 0000000000..ee8cfe13f3 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/AltsContextOrBuilder.java @@ -0,0 +1,177 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/altscontext.proto + +package io.grpc.alts.internal; + +public interface AltsContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.AltsContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The application protocol negotiated for this connection.
+   * 
+ * + * string application_protocol = 1; + */ + java.lang.String getApplicationProtocol(); + /** + *
+   * The application protocol negotiated for this connection.
+   * 
+ * + * string application_protocol = 1; + */ + com.google.protobuf.ByteString + getApplicationProtocolBytes(); + + /** + *
+   * The record protocol negotiated for this connection.
+   * 
+ * + * string record_protocol = 2; + */ + java.lang.String getRecordProtocol(); + /** + *
+   * The record protocol negotiated for this connection.
+   * 
+ * + * string record_protocol = 2; + */ + com.google.protobuf.ByteString + getRecordProtocolBytes(); + + /** + *
+   * The security level of the created secure channel.
+   * 
+ * + * .grpc.gcp.SecurityLevel security_level = 3; + */ + int getSecurityLevelValue(); + /** + *
+   * The security level of the created secure channel.
+   * 
+ * + * .grpc.gcp.SecurityLevel security_level = 3; + */ + io.grpc.alts.internal.SecurityLevel getSecurityLevel(); + + /** + *
+   * The peer service account.
+   * 
+ * + * string peer_service_account = 4; + */ + java.lang.String getPeerServiceAccount(); + /** + *
+   * The peer service account.
+   * 
+ * + * string peer_service_account = 4; + */ + com.google.protobuf.ByteString + getPeerServiceAccountBytes(); + + /** + *
+   * The local service account.
+   * 
+ * + * string local_service_account = 5; + */ + java.lang.String getLocalServiceAccount(); + /** + *
+   * The local service account.
+   * 
+ * + * string local_service_account = 5; + */ + com.google.protobuf.ByteString + getLocalServiceAccountBytes(); + + /** + *
+   * The RPC protocol versions supported by the peer.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + boolean hasPeerRpcVersions(); + /** + *
+   * The RPC protocol versions supported by the peer.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + io.grpc.alts.internal.RpcProtocolVersions getPeerRpcVersions(); + /** + *
+   * The RPC protocol versions supported by the peer.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; + */ + io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder(); + + /** + *
+   * Additional attributes of the peer.
+   * 
+ * + * map<string, string> peer_attributes = 7; + */ + int getPeerAttributesCount(); + /** + *
+   * Additional attributes of the peer.
+   * 
+ * + * map<string, string> peer_attributes = 7; + */ + boolean containsPeerAttributes( + java.lang.String key); + /** + * Use {@link #getPeerAttributesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getPeerAttributes(); + /** + *
+   * Additional attributes of the peer.
+   * 
+ * + * map<string, string> peer_attributes = 7; + */ + java.util.Map + getPeerAttributesMap(); + /** + *
+   * Additional attributes of the peer.
+   * 
+ * + * map<string, string> peer_attributes = 7; + */ + + java.lang.String getPeerAttributesOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+   * Additional attributes of the peer.
+   * 
+ * + * map<string, string> peer_attributes = 7; + */ + + java.lang.String getPeerAttributesOrThrow( + java.lang.String key); +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/AltsContextProto.java b/alts/src/generated/main/java/io/grpc/alts/internal/AltsContextProto.java new file mode 100644 index 0000000000..da27b40537 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/AltsContextProto.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/altscontext.proto + +package io.grpc.alts.internal; + +public final class AltsContextProto { + private AltsContextProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_AltsContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_AltsContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032grpc/gcp/altscontext.proto\022\010grpc.gcp\032(" + + "grpc/gcp/transport_security_common.proto" + + "\"\347\002\n\013AltsContext\022\034\n\024application_protocol" + + "\030\001 \001(\t\022\027\n\017record_protocol\030\002 \001(\t\022/\n\016secur" + + "ity_level\030\003 \001(\0162\027.grpc.gcp.SecurityLevel" + + "\022\034\n\024peer_service_account\030\004 \001(\t\022\035\n\025local_" + + "service_account\030\005 \001(\t\0228\n\021peer_rpc_versio" + + "ns\030\006 \001(\0132\035.grpc.gcp.RpcProtocolVersions\022" + + "B\n\017peer_attributes\030\007 \003(\0132).grpc.gcp.Alts" + + "Context.PeerAttributesEntry\0325\n\023PeerAttri" + + "butesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001Bl\n\025io.grpc.alts.internalB\020AltsContext" + + "ProtoP\001Z?google.golang.org/grpc/credenti" + + "als/alts/internal/proto/grpc_gcpb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grpc.alts.internal.TransportSecurityCommonProto.getDescriptor(), + }, assigner); + internal_static_grpc_gcp_AltsContext_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grpc_gcp_AltsContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_AltsContext_descriptor, + new java.lang.String[] { "ApplicationProtocol", "RecordProtocol", "SecurityLevel", "PeerServiceAccount", "LocalServiceAccount", "PeerRpcVersions", "PeerAttributes", }); + internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_descriptor = + internal_static_grpc_gcp_AltsContext_descriptor.getNestedTypes().get(0); + internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + io.grpc.alts.internal.TransportSecurityCommonProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/Altscontext.java b/alts/src/generated/main/java/io/grpc/alts/internal/Altscontext.java deleted file mode 100644 index 9e40b65b6c..0000000000 --- a/alts/src/generated/main/java/io/grpc/alts/internal/Altscontext.java +++ /dev/null @@ -1,1915 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpc/gcp/altscontext.proto - -package io.grpc.alts.internal; - -public final class Altscontext { - private Altscontext() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface AltsContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.AltsContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The application protocol negotiated for this connection.
-     * 
- * - * string application_protocol = 1; - */ - java.lang.String getApplicationProtocol(); - /** - *
-     * The application protocol negotiated for this connection.
-     * 
- * - * string application_protocol = 1; - */ - com.google.protobuf.ByteString - getApplicationProtocolBytes(); - - /** - *
-     * The record protocol negotiated for this connection.
-     * 
- * - * string record_protocol = 2; - */ - java.lang.String getRecordProtocol(); - /** - *
-     * The record protocol negotiated for this connection.
-     * 
- * - * string record_protocol = 2; - */ - com.google.protobuf.ByteString - getRecordProtocolBytes(); - - /** - *
-     * The security level of the created secure channel.
-     * 
- * - * .grpc.gcp.SecurityLevel security_level = 3; - */ - int getSecurityLevelValue(); - /** - *
-     * The security level of the created secure channel.
-     * 
- * - * .grpc.gcp.SecurityLevel security_level = 3; - */ - io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel getSecurityLevel(); - - /** - *
-     * The peer service account.
-     * 
- * - * string peer_service_account = 4; - */ - java.lang.String getPeerServiceAccount(); - /** - *
-     * The peer service account.
-     * 
- * - * string peer_service_account = 4; - */ - com.google.protobuf.ByteString - getPeerServiceAccountBytes(); - - /** - *
-     * The local service account.
-     * 
- * - * string local_service_account = 5; - */ - java.lang.String getLocalServiceAccount(); - /** - *
-     * The local service account.
-     * 
- * - * string local_service_account = 5; - */ - com.google.protobuf.ByteString - getLocalServiceAccountBytes(); - - /** - *
-     * The RPC protocol versions supported by the peer.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - boolean hasPeerRpcVersions(); - /** - *
-     * The RPC protocol versions supported by the peer.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getPeerRpcVersions(); - /** - *
-     * The RPC protocol versions supported by the peer.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder(); - - /** - *
-     * Additional attributes of the peer.
-     * 
- * - * map<string, string> peer_attributes = 7; - */ - int getPeerAttributesCount(); - /** - *
-     * Additional attributes of the peer.
-     * 
- * - * map<string, string> peer_attributes = 7; - */ - boolean containsPeerAttributes( - java.lang.String key); - /** - * Use {@link #getPeerAttributesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getPeerAttributes(); - /** - *
-     * Additional attributes of the peer.
-     * 
- * - * map<string, string> peer_attributes = 7; - */ - java.util.Map - getPeerAttributesMap(); - /** - *
-     * Additional attributes of the peer.
-     * 
- * - * map<string, string> peer_attributes = 7; - */ - - java.lang.String getPeerAttributesOrDefault( - java.lang.String key, - java.lang.String defaultValue); - /** - *
-     * Additional attributes of the peer.
-     * 
- * - * map<string, string> peer_attributes = 7; - */ - - java.lang.String getPeerAttributesOrThrow( - java.lang.String key); - } - /** - * Protobuf type {@code grpc.gcp.AltsContext} - */ - public static final class AltsContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gcp.AltsContext) - AltsContextOrBuilder { - private static final long serialVersionUID = 0L; - // Use AltsContext.newBuilder() to construct. - private AltsContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AltsContext() { - applicationProtocol_ = ""; - recordProtocol_ = ""; - securityLevel_ = 0; - peerServiceAccount_ = ""; - localServiceAccount_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AltsContext( - 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 24: { - int rawValue = input.readEnum(); - - securityLevel_ = rawValue; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - peerServiceAccount_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - localServiceAccount_ = s; - break; - } - case 50: { - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder subBuilder = null; - if (peerRpcVersions_ != null) { - subBuilder = peerRpcVersions_.toBuilder(); - } - peerRpcVersions_ = input.readMessage(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(peerRpcVersions_); - peerRpcVersions_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - peerAttributes_ = com.google.protobuf.MapField.newMapField( - PeerAttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000040; - } - com.google.protobuf.MapEntry - peerAttributes__ = input.readMessage( - PeerAttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - peerAttributes_.getMutableMap().put( - peerAttributes__.getKey(), peerAttributes__.getValue()); - 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.Altscontext.internal_static_grpc_gcp_AltsContext_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 7: - return internalGetPeerAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Altscontext.internal_static_grpc_gcp_AltsContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Altscontext.AltsContext.class, io.grpc.alts.internal.Altscontext.AltsContext.Builder.class); - } - - private int bitField0_; - public static final int APPLICATION_PROTOCOL_FIELD_NUMBER = 1; - private volatile java.lang.Object applicationProtocol_; - /** - *
-     * The application protocol negotiated for this connection.
-     * 
- * - * string application_protocol = 1; - */ - 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; - } - } - /** - *
-     * The application protocol negotiated for this connection.
-     * 
- * - * string application_protocol = 1; - */ - 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_; - /** - *
-     * The record protocol negotiated for this connection.
-     * 
- * - * string record_protocol = 2; - */ - 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; - } - } - /** - *
-     * The record protocol negotiated for this connection.
-     * 
- * - * string record_protocol = 2; - */ - 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 SECURITY_LEVEL_FIELD_NUMBER = 3; - private int securityLevel_; - /** - *
-     * The security level of the created secure channel.
-     * 
- * - * .grpc.gcp.SecurityLevel security_level = 3; - */ - public int getSecurityLevelValue() { - return securityLevel_; - } - /** - *
-     * The security level of the created secure channel.
-     * 
- * - * .grpc.gcp.SecurityLevel security_level = 3; - */ - public io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel getSecurityLevel() { - io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel result = io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel.valueOf(securityLevel_); - return result == null ? io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel.UNRECOGNIZED : result; - } - - public static final int PEER_SERVICE_ACCOUNT_FIELD_NUMBER = 4; - private volatile java.lang.Object peerServiceAccount_; - /** - *
-     * The peer service account.
-     * 
- * - * string peer_service_account = 4; - */ - public java.lang.String getPeerServiceAccount() { - java.lang.Object ref = peerServiceAccount_; - 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(); - peerServiceAccount_ = s; - return s; - } - } - /** - *
-     * The peer service account.
-     * 
- * - * string peer_service_account = 4; - */ - public com.google.protobuf.ByteString - getPeerServiceAccountBytes() { - java.lang.Object ref = peerServiceAccount_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - peerServiceAccount_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCAL_SERVICE_ACCOUNT_FIELD_NUMBER = 5; - private volatile java.lang.Object localServiceAccount_; - /** - *
-     * The local service account.
-     * 
- * - * string local_service_account = 5; - */ - public java.lang.String getLocalServiceAccount() { - java.lang.Object ref = localServiceAccount_; - 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(); - localServiceAccount_ = s; - return s; - } - } - /** - *
-     * The local service account.
-     * 
- * - * string local_service_account = 5; - */ - public com.google.protobuf.ByteString - getLocalServiceAccountBytes() { - java.lang.Object ref = localServiceAccount_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - localServiceAccount_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PEER_RPC_VERSIONS_FIELD_NUMBER = 6; - private io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions peerRpcVersions_; - /** - *
-     * The RPC protocol versions supported by the peer.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - public boolean hasPeerRpcVersions() { - return peerRpcVersions_ != null; - } - /** - *
-     * The RPC protocol versions supported by the peer.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getPeerRpcVersions() { - return peerRpcVersions_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_; - } - /** - *
-     * The RPC protocol versions supported by the peer.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder() { - return getPeerRpcVersions(); - } - - public static final int PEER_ATTRIBUTES_FIELD_NUMBER = 7; - private static final class PeerAttributesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grpc.alts.internal.Altscontext.internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> peerAttributes_; - private com.google.protobuf.MapField - internalGetPeerAttributes() { - if (peerAttributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PeerAttributesDefaultEntryHolder.defaultEntry); - } - return peerAttributes_; - } - - public int getPeerAttributesCount() { - return internalGetPeerAttributes().getMap().size(); - } - /** - *
-     * Additional attributes of the peer.
-     * 
- * - * map<string, string> peer_attributes = 7; - */ - - public boolean containsPeerAttributes( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - return internalGetPeerAttributes().getMap().containsKey(key); - } - /** - * Use {@link #getPeerAttributesMap()} instead. - */ - @java.lang.Deprecated - public java.util.Map getPeerAttributes() { - return getPeerAttributesMap(); - } - /** - *
-     * Additional attributes of the peer.
-     * 
- * - * map<string, string> peer_attributes = 7; - */ - - public java.util.Map getPeerAttributesMap() { - return internalGetPeerAttributes().getMap(); - } - /** - *
-     * Additional attributes of the peer.
-     * 
- * - * map<string, string> peer_attributes = 7; - */ - - public java.lang.String getPeerAttributesOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetPeerAttributes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Additional attributes of the peer.
-     * 
- * - * map<string, string> peer_attributes = 7; - */ - - public java.lang.String getPeerAttributesOrThrow( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetPeerAttributes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 (securityLevel_ != io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel.SECURITY_NONE.getNumber()) { - output.writeEnum(3, securityLevel_); - } - if (!getPeerServiceAccountBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, peerServiceAccount_); - } - if (!getLocalServiceAccountBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, localServiceAccount_); - } - if (peerRpcVersions_ != null) { - output.writeMessage(6, getPeerRpcVersions()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetPeerAttributes(), - PeerAttributesDefaultEntryHolder.defaultEntry, - 7); - 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 (securityLevel_ != io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel.SECURITY_NONE.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, securityLevel_); - } - if (!getPeerServiceAccountBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, peerServiceAccount_); - } - if (!getLocalServiceAccountBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, localServiceAccount_); - } - if (peerRpcVersions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getPeerRpcVersions()); - } - for (java.util.Map.Entry entry - : internalGetPeerAttributes().getMap().entrySet()) { - com.google.protobuf.MapEntry - peerAttributes__ = PeerAttributesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, peerAttributes__); - } - 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.Altscontext.AltsContext)) { - return super.equals(obj); - } - io.grpc.alts.internal.Altscontext.AltsContext other = (io.grpc.alts.internal.Altscontext.AltsContext) obj; - - boolean result = true; - result = result && getApplicationProtocol() - .equals(other.getApplicationProtocol()); - result = result && getRecordProtocol() - .equals(other.getRecordProtocol()); - result = result && securityLevel_ == other.securityLevel_; - result = result && getPeerServiceAccount() - .equals(other.getPeerServiceAccount()); - result = result && getLocalServiceAccount() - .equals(other.getLocalServiceAccount()); - result = result && (hasPeerRpcVersions() == other.hasPeerRpcVersions()); - if (hasPeerRpcVersions()) { - result = result && getPeerRpcVersions() - .equals(other.getPeerRpcVersions()); - } - result = result && internalGetPeerAttributes().equals( - other.internalGetPeerAttributes()); - 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) + SECURITY_LEVEL_FIELD_NUMBER; - hash = (53 * hash) + securityLevel_; - hash = (37 * hash) + PEER_SERVICE_ACCOUNT_FIELD_NUMBER; - hash = (53 * hash) + getPeerServiceAccount().hashCode(); - hash = (37 * hash) + LOCAL_SERVICE_ACCOUNT_FIELD_NUMBER; - hash = (53 * hash) + getLocalServiceAccount().hashCode(); - if (hasPeerRpcVersions()) { - hash = (37 * hash) + PEER_RPC_VERSIONS_FIELD_NUMBER; - hash = (53 * hash) + getPeerRpcVersions().hashCode(); - } - if (!internalGetPeerAttributes().getMap().isEmpty()) { - hash = (37 * hash) + PEER_ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + internalGetPeerAttributes().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grpc.alts.internal.Altscontext.AltsContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Altscontext.AltsContext 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.Altscontext.AltsContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Altscontext.AltsContext 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.Altscontext.AltsContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Altscontext.AltsContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grpc.alts.internal.Altscontext.AltsContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Altscontext.AltsContext 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.Altscontext.AltsContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Altscontext.AltsContext 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.Altscontext.AltsContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Altscontext.AltsContext 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.Altscontext.AltsContext 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.AltsContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.AltsContext) - io.grpc.alts.internal.Altscontext.AltsContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Altscontext.internal_static_grpc_gcp_AltsContext_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 7: - return internalGetPeerAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 7: - return internalGetMutablePeerAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Altscontext.internal_static_grpc_gcp_AltsContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Altscontext.AltsContext.class, io.grpc.alts.internal.Altscontext.AltsContext.Builder.class); - } - - // Construct using io.grpc.alts.internal.Altscontext.AltsContext.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_ = ""; - - securityLevel_ = 0; - - peerServiceAccount_ = ""; - - localServiceAccount_ = ""; - - if (peerRpcVersionsBuilder_ == null) { - peerRpcVersions_ = null; - } else { - peerRpcVersions_ = null; - peerRpcVersionsBuilder_ = null; - } - internalGetMutablePeerAttributes().clear(); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grpc.alts.internal.Altscontext.internal_static_grpc_gcp_AltsContext_descriptor; - } - - public io.grpc.alts.internal.Altscontext.AltsContext getDefaultInstanceForType() { - return io.grpc.alts.internal.Altscontext.AltsContext.getDefaultInstance(); - } - - public io.grpc.alts.internal.Altscontext.AltsContext build() { - io.grpc.alts.internal.Altscontext.AltsContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.Altscontext.AltsContext buildPartial() { - io.grpc.alts.internal.Altscontext.AltsContext result = new io.grpc.alts.internal.Altscontext.AltsContext(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.applicationProtocol_ = applicationProtocol_; - result.recordProtocol_ = recordProtocol_; - result.securityLevel_ = securityLevel_; - result.peerServiceAccount_ = peerServiceAccount_; - result.localServiceAccount_ = localServiceAccount_; - if (peerRpcVersionsBuilder_ == null) { - result.peerRpcVersions_ = peerRpcVersions_; - } else { - result.peerRpcVersions_ = peerRpcVersionsBuilder_.build(); - } - result.peerAttributes_ = internalGetPeerAttributes(); - result.peerAttributes_.makeImmutable(); - result.bitField0_ = to_bitField0_; - 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.Altscontext.AltsContext) { - return mergeFrom((io.grpc.alts.internal.Altscontext.AltsContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.Altscontext.AltsContext other) { - if (other == io.grpc.alts.internal.Altscontext.AltsContext.getDefaultInstance()) return this; - if (!other.getApplicationProtocol().isEmpty()) { - applicationProtocol_ = other.applicationProtocol_; - onChanged(); - } - if (!other.getRecordProtocol().isEmpty()) { - recordProtocol_ = other.recordProtocol_; - onChanged(); - } - if (other.securityLevel_ != 0) { - setSecurityLevelValue(other.getSecurityLevelValue()); - } - if (!other.getPeerServiceAccount().isEmpty()) { - peerServiceAccount_ = other.peerServiceAccount_; - onChanged(); - } - if (!other.getLocalServiceAccount().isEmpty()) { - localServiceAccount_ = other.localServiceAccount_; - onChanged(); - } - if (other.hasPeerRpcVersions()) { - mergePeerRpcVersions(other.getPeerRpcVersions()); - } - internalGetMutablePeerAttributes().mergeFrom( - other.internalGetPeerAttributes()); - 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.Altscontext.AltsContext parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.Altscontext.AltsContext) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object applicationProtocol_ = ""; - /** - *
-       * The application protocol negotiated for this connection.
-       * 
- * - * string application_protocol = 1; - */ - 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; - } - } - /** - *
-       * The application protocol negotiated for this connection.
-       * 
- * - * string application_protocol = 1; - */ - 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; - } - } - /** - *
-       * The application protocol negotiated for this connection.
-       * 
- * - * string application_protocol = 1; - */ - public Builder setApplicationProtocol( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - applicationProtocol_ = value; - onChanged(); - return this; - } - /** - *
-       * The application protocol negotiated for this connection.
-       * 
- * - * string application_protocol = 1; - */ - public Builder clearApplicationProtocol() { - - applicationProtocol_ = getDefaultInstance().getApplicationProtocol(); - onChanged(); - return this; - } - /** - *
-       * The application protocol negotiated for this connection.
-       * 
- * - * string application_protocol = 1; - */ - 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_ = ""; - /** - *
-       * The record protocol negotiated for this connection.
-       * 
- * - * string record_protocol = 2; - */ - 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; - } - } - /** - *
-       * The record protocol negotiated for this connection.
-       * 
- * - * string record_protocol = 2; - */ - 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; - } - } - /** - *
-       * The record protocol negotiated for this connection.
-       * 
- * - * string record_protocol = 2; - */ - public Builder setRecordProtocol( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - recordProtocol_ = value; - onChanged(); - return this; - } - /** - *
-       * The record protocol negotiated for this connection.
-       * 
- * - * string record_protocol = 2; - */ - public Builder clearRecordProtocol() { - - recordProtocol_ = getDefaultInstance().getRecordProtocol(); - onChanged(); - return this; - } - /** - *
-       * The record protocol negotiated for this connection.
-       * 
- * - * string record_protocol = 2; - */ - public Builder setRecordProtocolBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - recordProtocol_ = value; - onChanged(); - return this; - } - - private int securityLevel_ = 0; - /** - *
-       * The security level of the created secure channel.
-       * 
- * - * .grpc.gcp.SecurityLevel security_level = 3; - */ - public int getSecurityLevelValue() { - return securityLevel_; - } - /** - *
-       * The security level of the created secure channel.
-       * 
- * - * .grpc.gcp.SecurityLevel security_level = 3; - */ - public Builder setSecurityLevelValue(int value) { - securityLevel_ = value; - onChanged(); - return this; - } - /** - *
-       * The security level of the created secure channel.
-       * 
- * - * .grpc.gcp.SecurityLevel security_level = 3; - */ - public io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel getSecurityLevel() { - io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel result = io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel.valueOf(securityLevel_); - return result == null ? io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel.UNRECOGNIZED : result; - } - /** - *
-       * The security level of the created secure channel.
-       * 
- * - * .grpc.gcp.SecurityLevel security_level = 3; - */ - public Builder setSecurityLevel(io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel value) { - if (value == null) { - throw new NullPointerException(); - } - - securityLevel_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The security level of the created secure channel.
-       * 
- * - * .grpc.gcp.SecurityLevel security_level = 3; - */ - public Builder clearSecurityLevel() { - - securityLevel_ = 0; - onChanged(); - return this; - } - - private java.lang.Object peerServiceAccount_ = ""; - /** - *
-       * The peer service account.
-       * 
- * - * string peer_service_account = 4; - */ - public java.lang.String getPeerServiceAccount() { - java.lang.Object ref = peerServiceAccount_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - peerServiceAccount_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The peer service account.
-       * 
- * - * string peer_service_account = 4; - */ - public com.google.protobuf.ByteString - getPeerServiceAccountBytes() { - java.lang.Object ref = peerServiceAccount_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - peerServiceAccount_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The peer service account.
-       * 
- * - * string peer_service_account = 4; - */ - public Builder setPeerServiceAccount( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - peerServiceAccount_ = value; - onChanged(); - return this; - } - /** - *
-       * The peer service account.
-       * 
- * - * string peer_service_account = 4; - */ - public Builder clearPeerServiceAccount() { - - peerServiceAccount_ = getDefaultInstance().getPeerServiceAccount(); - onChanged(); - return this; - } - /** - *
-       * The peer service account.
-       * 
- * - * string peer_service_account = 4; - */ - public Builder setPeerServiceAccountBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - peerServiceAccount_ = value; - onChanged(); - return this; - } - - private java.lang.Object localServiceAccount_ = ""; - /** - *
-       * The local service account.
-       * 
- * - * string local_service_account = 5; - */ - public java.lang.String getLocalServiceAccount() { - java.lang.Object ref = localServiceAccount_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - localServiceAccount_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The local service account.
-       * 
- * - * string local_service_account = 5; - */ - public com.google.protobuf.ByteString - getLocalServiceAccountBytes() { - java.lang.Object ref = localServiceAccount_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - localServiceAccount_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The local service account.
-       * 
- * - * string local_service_account = 5; - */ - public Builder setLocalServiceAccount( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - localServiceAccount_ = value; - onChanged(); - return this; - } - /** - *
-       * The local service account.
-       * 
- * - * string local_service_account = 5; - */ - public Builder clearLocalServiceAccount() { - - localServiceAccount_ = getDefaultInstance().getLocalServiceAccount(); - onChanged(); - return this; - } - /** - *
-       * The local service account.
-       * 
- * - * string local_service_account = 5; - */ - public Builder setLocalServiceAccountBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - localServiceAccount_ = value; - onChanged(); - return this; - } - - private io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions peerRpcVersions_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder> peerRpcVersionsBuilder_; - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - public boolean hasPeerRpcVersions() { - return peerRpcVersionsBuilder_ != null || peerRpcVersions_ != null; - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getPeerRpcVersions() { - if (peerRpcVersionsBuilder_ == null) { - return peerRpcVersions_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_; - } else { - return peerRpcVersionsBuilder_.getMessage(); - } - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - public Builder setPeerRpcVersions(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions value) { - if (peerRpcVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - peerRpcVersions_ = value; - onChanged(); - } else { - peerRpcVersionsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - public Builder setPeerRpcVersions( - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder builderForValue) { - if (peerRpcVersionsBuilder_ == null) { - peerRpcVersions_ = builderForValue.build(); - onChanged(); - } else { - peerRpcVersionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - public Builder mergePeerRpcVersions(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions value) { - if (peerRpcVersionsBuilder_ == null) { - if (peerRpcVersions_ != null) { - peerRpcVersions_ = - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.newBuilder(peerRpcVersions_).mergeFrom(value).buildPartial(); - } else { - peerRpcVersions_ = value; - } - onChanged(); - } else { - peerRpcVersionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - public Builder clearPeerRpcVersions() { - if (peerRpcVersionsBuilder_ == null) { - peerRpcVersions_ = null; - onChanged(); - } else { - peerRpcVersions_ = null; - peerRpcVersionsBuilder_ = null; - } - - return this; - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder getPeerRpcVersionsBuilder() { - - onChanged(); - return getPeerRpcVersionsFieldBuilder().getBuilder(); - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder() { - if (peerRpcVersionsBuilder_ != null) { - return peerRpcVersionsBuilder_.getMessageOrBuilder(); - } else { - return peerRpcVersions_ == null ? - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_; - } - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder> - getPeerRpcVersionsFieldBuilder() { - if (peerRpcVersionsBuilder_ == null) { - peerRpcVersionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder>( - getPeerRpcVersions(), - getParentForChildren(), - isClean()); - peerRpcVersions_ = null; - } - return peerRpcVersionsBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> peerAttributes_; - private com.google.protobuf.MapField - internalGetPeerAttributes() { - if (peerAttributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PeerAttributesDefaultEntryHolder.defaultEntry); - } - return peerAttributes_; - } - private com.google.protobuf.MapField - internalGetMutablePeerAttributes() { - onChanged();; - if (peerAttributes_ == null) { - peerAttributes_ = com.google.protobuf.MapField.newMapField( - PeerAttributesDefaultEntryHolder.defaultEntry); - } - if (!peerAttributes_.isMutable()) { - peerAttributes_ = peerAttributes_.copy(); - } - return peerAttributes_; - } - - public int getPeerAttributesCount() { - return internalGetPeerAttributes().getMap().size(); - } - /** - *
-       * Additional attributes of the peer.
-       * 
- * - * map<string, string> peer_attributes = 7; - */ - - public boolean containsPeerAttributes( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - return internalGetPeerAttributes().getMap().containsKey(key); - } - /** - * Use {@link #getPeerAttributesMap()} instead. - */ - @java.lang.Deprecated - public java.util.Map getPeerAttributes() { - return getPeerAttributesMap(); - } - /** - *
-       * Additional attributes of the peer.
-       * 
- * - * map<string, string> peer_attributes = 7; - */ - - public java.util.Map getPeerAttributesMap() { - return internalGetPeerAttributes().getMap(); - } - /** - *
-       * Additional attributes of the peer.
-       * 
- * - * map<string, string> peer_attributes = 7; - */ - - public java.lang.String getPeerAttributesOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetPeerAttributes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-       * Additional attributes of the peer.
-       * 
- * - * map<string, string> peer_attributes = 7; - */ - - public java.lang.String getPeerAttributesOrThrow( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetPeerAttributes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearPeerAttributes() { - internalGetMutablePeerAttributes().getMutableMap() - .clear(); - return this; - } - /** - *
-       * Additional attributes of the peer.
-       * 
- * - * map<string, string> peer_attributes = 7; - */ - - public Builder removePeerAttributes( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - internalGetMutablePeerAttributes().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutablePeerAttributes() { - return internalGetMutablePeerAttributes().getMutableMap(); - } - /** - *
-       * Additional attributes of the peer.
-       * 
- * - * map<string, string> peer_attributes = 7; - */ - public Builder putPeerAttributes( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new java.lang.NullPointerException(); } - if (value == null) { throw new java.lang.NullPointerException(); } - internalGetMutablePeerAttributes().getMutableMap() - .put(key, value); - return this; - } - /** - *
-       * Additional attributes of the peer.
-       * 
- * - * map<string, string> peer_attributes = 7; - */ - - public Builder putAllPeerAttributes( - java.util.Map values) { - internalGetMutablePeerAttributes().getMutableMap() - .putAll(values); - return this; - } - 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.AltsContext) - } - - // @@protoc_insertion_point(class_scope:grpc.gcp.AltsContext) - private static final io.grpc.alts.internal.Altscontext.AltsContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.Altscontext.AltsContext(); - } - - public static io.grpc.alts.internal.Altscontext.AltsContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public AltsContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AltsContext(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.Altscontext.AltsContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_AltsContext_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_AltsContext_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\032grpc/gcp/altscontext.proto\022\010grpc.gcp\032(" + - "grpc/gcp/transport_security_common.proto" + - "\"\347\002\n\013AltsContext\022\034\n\024application_protocol" + - "\030\001 \001(\t\022\027\n\017record_protocol\030\002 \001(\t\022/\n\016secur" + - "ity_level\030\003 \001(\0162\027.grpc.gcp.SecurityLevel" + - "\022\034\n\024peer_service_account\030\004 \001(\t\022\035\n\025local_" + - "service_account\030\005 \001(\t\0228\n\021peer_rpc_versio" + - "ns\030\006 \001(\0132\035.grpc.gcp.RpcProtocolVersions\022" + - "B\n\017peer_attributes\030\007 \003(\0132).grpc.gcp.Alts" + - "Context.PeerAttributesEntry\0325\n\023PeerAttri" + - "butesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + - "8\001B\027\n\025io.grpc.alts.internalb\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grpc.alts.internal.TransportSecurityCommon.getDescriptor(), - }, assigner); - internal_static_grpc_gcp_AltsContext_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grpc_gcp_AltsContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_AltsContext_descriptor, - new java.lang.String[] { "ApplicationProtocol", "RecordProtocol", "SecurityLevel", "PeerServiceAccount", "LocalServiceAccount", "PeerRpcVersions", "PeerAttributes", }); - internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_descriptor = - internal_static_grpc_gcp_AltsContext_descriptor.getNestedTypes().get(0); - internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_AltsContext_PeerAttributesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - io.grpc.alts.internal.TransportSecurityCommon.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/Endpoint.java b/alts/src/generated/main/java/io/grpc/alts/internal/Endpoint.java new file mode 100644 index 0000000000..4d5f08d413 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/Endpoint.java @@ -0,0 +1,736 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +/** + * Protobuf type {@code grpc.gcp.Endpoint} + */ +public final class Endpoint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gcp.Endpoint) + EndpointOrBuilder { +private static final long serialVersionUID = 0L; + // Use Endpoint.newBuilder() to construct. + private Endpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Endpoint() { + ipAddress_ = ""; + port_ = 0; + protocol_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Endpoint( + 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(); + + ipAddress_ = s; + break; + } + case 16: { + + port_ = input.readInt32(); + break; + } + case 24: { + int rawValue = input.readEnum(); + + protocol_ = rawValue; + 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_Endpoint_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.Endpoint.class, io.grpc.alts.internal.Endpoint.Builder.class); + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object ipAddress_; + /** + *
+   * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
+   * "192.168.0.1" or "2001:db8::1".
+   * 
+ * + * string ip_address = 1; + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + 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(); + ipAddress_ = s; + return s; + } + } + /** + *
+   * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
+   * "192.168.0.1" or "2001:db8::1".
+   * 
+ * + * string ip_address = 1; + */ + public com.google.protobuf.ByteString + getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 2; + private int port_; + /** + *
+   * Port number.
+   * 
+ * + * int32 port = 2; + */ + public int getPort() { + return port_; + } + + public static final int PROTOCOL_FIELD_NUMBER = 3; + private int protocol_; + /** + *
+   * Network protocol (e.g., TCP, UDP) associated with this endpoint.
+   * 
+ * + * .grpc.gcp.NetworkProtocol protocol = 3; + */ + public int getProtocolValue() { + return protocol_; + } + /** + *
+   * Network protocol (e.g., TCP, UDP) associated with this endpoint.
+   * 
+ * + * .grpc.gcp.NetworkProtocol protocol = 3; + */ + public io.grpc.alts.internal.NetworkProtocol getProtocol() { + io.grpc.alts.internal.NetworkProtocol result = io.grpc.alts.internal.NetworkProtocol.valueOf(protocol_); + return result == null ? io.grpc.alts.internal.NetworkProtocol.UNRECOGNIZED : result; + } + + 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 (!getIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddress_); + } + if (port_ != 0) { + output.writeInt32(2, port_); + } + if (protocol_ != io.grpc.alts.internal.NetworkProtocol.NETWORK_PROTOCOL_UNSPECIFIED.getNumber()) { + output.writeEnum(3, protocol_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipAddress_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, port_); + } + if (protocol_ != io.grpc.alts.internal.NetworkProtocol.NETWORK_PROTOCOL_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, protocol_); + } + 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.Endpoint)) { + return super.equals(obj); + } + io.grpc.alts.internal.Endpoint other = (io.grpc.alts.internal.Endpoint) obj; + + boolean result = true; + result = result && getIpAddress() + .equals(other.getIpAddress()); + result = result && (getPort() + == other.getPort()); + result = result && protocol_ == other.protocol_; + 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) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + protocol_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.alts.internal.Endpoint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.Endpoint 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.Endpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.Endpoint 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.Endpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.Endpoint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.alts.internal.Endpoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.Endpoint 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.Endpoint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.Endpoint 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.Endpoint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.Endpoint 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.Endpoint 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.Endpoint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gcp.Endpoint) + io.grpc.alts.internal.EndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Endpoint_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.Endpoint.class, io.grpc.alts.internal.Endpoint.Builder.class); + } + + // Construct using io.grpc.alts.internal.Endpoint.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(); + ipAddress_ = ""; + + port_ = 0; + + protocol_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Endpoint_descriptor; + } + + public io.grpc.alts.internal.Endpoint getDefaultInstanceForType() { + return io.grpc.alts.internal.Endpoint.getDefaultInstance(); + } + + public io.grpc.alts.internal.Endpoint build() { + io.grpc.alts.internal.Endpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.alts.internal.Endpoint buildPartial() { + io.grpc.alts.internal.Endpoint result = new io.grpc.alts.internal.Endpoint(this); + result.ipAddress_ = ipAddress_; + result.port_ = port_; + result.protocol_ = protocol_; + 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.Endpoint) { + return mergeFrom((io.grpc.alts.internal.Endpoint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.alts.internal.Endpoint other) { + if (other == io.grpc.alts.internal.Endpoint.getDefaultInstance()) return this; + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (other.protocol_ != 0) { + setProtocolValue(other.getProtocolValue()); + } + 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.Endpoint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.alts.internal.Endpoint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object ipAddress_ = ""; + /** + *
+     * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
+     * "192.168.0.1" or "2001:db8::1".
+     * 
+ * + * string ip_address = 1; + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
+     * "192.168.0.1" or "2001:db8::1".
+     * 
+ * + * string ip_address = 1; + */ + public com.google.protobuf.ByteString + getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
+     * "192.168.0.1" or "2001:db8::1".
+     * 
+ * + * string ip_address = 1; + */ + public Builder setIpAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + ipAddress_ = value; + onChanged(); + return this; + } + /** + *
+     * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
+     * "192.168.0.1" or "2001:db8::1".
+     * 
+ * + * string ip_address = 1; + */ + public Builder clearIpAddress() { + + ipAddress_ = getDefaultInstance().getIpAddress(); + onChanged(); + return this; + } + /** + *
+     * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
+     * "192.168.0.1" or "2001:db8::1".
+     * 
+ * + * string ip_address = 1; + */ + public Builder setIpAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ipAddress_ = value; + onChanged(); + return this; + } + + private int port_ ; + /** + *
+     * Port number.
+     * 
+ * + * int32 port = 2; + */ + public int getPort() { + return port_; + } + /** + *
+     * Port number.
+     * 
+ * + * int32 port = 2; + */ + public Builder setPort(int value) { + + port_ = value; + onChanged(); + return this; + } + /** + *
+     * Port number.
+     * 
+ * + * int32 port = 2; + */ + public Builder clearPort() { + + port_ = 0; + onChanged(); + return this; + } + + private int protocol_ = 0; + /** + *
+     * Network protocol (e.g., TCP, UDP) associated with this endpoint.
+     * 
+ * + * .grpc.gcp.NetworkProtocol protocol = 3; + */ + public int getProtocolValue() { + return protocol_; + } + /** + *
+     * Network protocol (e.g., TCP, UDP) associated with this endpoint.
+     * 
+ * + * .grpc.gcp.NetworkProtocol protocol = 3; + */ + public Builder setProtocolValue(int value) { + protocol_ = value; + onChanged(); + return this; + } + /** + *
+     * Network protocol (e.g., TCP, UDP) associated with this endpoint.
+     * 
+ * + * .grpc.gcp.NetworkProtocol protocol = 3; + */ + public io.grpc.alts.internal.NetworkProtocol getProtocol() { + io.grpc.alts.internal.NetworkProtocol result = io.grpc.alts.internal.NetworkProtocol.valueOf(protocol_); + return result == null ? io.grpc.alts.internal.NetworkProtocol.UNRECOGNIZED : result; + } + /** + *
+     * Network protocol (e.g., TCP, UDP) associated with this endpoint.
+     * 
+ * + * .grpc.gcp.NetworkProtocol protocol = 3; + */ + public Builder setProtocol(io.grpc.alts.internal.NetworkProtocol value) { + if (value == null) { + throw new NullPointerException(); + } + + protocol_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Network protocol (e.g., TCP, UDP) associated with this endpoint.
+     * 
+ * + * .grpc.gcp.NetworkProtocol protocol = 3; + */ + public Builder clearProtocol() { + + protocol_ = 0; + onChanged(); + return this; + } + 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.Endpoint) + } + + // @@protoc_insertion_point(class_scope:grpc.gcp.Endpoint) + private static final io.grpc.alts.internal.Endpoint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.alts.internal.Endpoint(); + } + + public static io.grpc.alts.internal.Endpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Endpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Endpoint(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.Endpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/EndpointOrBuilder.java b/alts/src/generated/main/java/io/grpc/alts/internal/EndpointOrBuilder.java new file mode 100644 index 0000000000..25ae0fe820 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/EndpointOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +public interface EndpointOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.Endpoint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
+   * "192.168.0.1" or "2001:db8::1".
+   * 
+ * + * string ip_address = 1; + */ + java.lang.String getIpAddress(); + /** + *
+   * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
+   * "192.168.0.1" or "2001:db8::1".
+   * 
+ * + * string ip_address = 1; + */ + com.google.protobuf.ByteString + getIpAddressBytes(); + + /** + *
+   * Port number.
+   * 
+ * + * int32 port = 2; + */ + int getPort(); + + /** + *
+   * Network protocol (e.g., TCP, UDP) associated with this endpoint.
+   * 
+ * + * .grpc.gcp.NetworkProtocol protocol = 3; + */ + int getProtocolValue(); + /** + *
+   * Network protocol (e.g., TCP, UDP) associated with this endpoint.
+   * 
+ * + * .grpc.gcp.NetworkProtocol protocol = 3; + */ + io.grpc.alts.internal.NetworkProtocol getProtocol(); +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/HandshakeProtocol.java b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakeProtocol.java new file mode 100644 index 0000000000..6be49fe03e --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakeProtocol.java @@ -0,0 +1,136 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +/** + * Protobuf enum {@code grpc.gcp.HandshakeProtocol} + */ +public enum HandshakeProtocol + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Default value.
+   * 
+ * + * HANDSHAKE_PROTOCOL_UNSPECIFIED = 0; + */ + HANDSHAKE_PROTOCOL_UNSPECIFIED(0), + /** + *
+   * TLS handshake protocol.
+   * 
+ * + * TLS = 1; + */ + TLS(1), + /** + *
+   * Application Layer Transport Security handshake protocol.
+   * 
+ * + * ALTS = 2; + */ + ALTS(2), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Default value.
+   * 
+ * + * HANDSHAKE_PROTOCOL_UNSPECIFIED = 0; + */ + public static final int HANDSHAKE_PROTOCOL_UNSPECIFIED_VALUE = 0; + /** + *
+   * TLS handshake protocol.
+   * 
+ * + * TLS = 1; + */ + public static final int TLS_VALUE = 1; + /** + *
+   * Application Layer Transport Security handshake protocol.
+   * 
+ * + * ALTS = 2; + */ + public static final int ALTS_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HandshakeProtocol valueOf(int value) { + return forNumber(value); + } + + public static HandshakeProtocol forNumber(int value) { + switch (value) { + case 0: return HANDSHAKE_PROTOCOL_UNSPECIFIED; + case 1: return TLS; + case 2: return ALTS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + HandshakeProtocol> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HandshakeProtocol findValueByNumber(int number) { + return HandshakeProtocol.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grpc.alts.internal.HandshakerProto.getDescriptor().getEnumTypes().get(0); + } + + private static final HandshakeProtocol[] VALUES = values(); + + public static HandshakeProtocol valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HandshakeProtocol(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gcp.HandshakeProtocol) +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/Handshaker.java b/alts/src/generated/main/java/io/grpc/alts/internal/Handshaker.java deleted file mode 100644 index 2daa8c14fc..0000000000 --- a/alts/src/generated/main/java/io/grpc/alts/internal/Handshaker.java +++ /dev/null @@ -1,13709 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpc/gcp/handshaker.proto - -package io.grpc.alts.internal; - -public final class Handshaker { - private Handshaker() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * Protobuf enum {@code grpc.gcp.HandshakeProtocol} - */ - public enum HandshakeProtocol - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Default value.
-     * 
- * - * HANDSHAKE_PROTOCOL_UNSPECIFIED = 0; - */ - HANDSHAKE_PROTOCOL_UNSPECIFIED(0), - /** - *
-     * TLS handshake protocol.
-     * 
- * - * TLS = 1; - */ - TLS(1), - /** - *
-     * Application Layer Transport Security handshake protocol.
-     * 
- * - * ALTS = 2; - */ - ALTS(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Default value.
-     * 
- * - * HANDSHAKE_PROTOCOL_UNSPECIFIED = 0; - */ - public static final int HANDSHAKE_PROTOCOL_UNSPECIFIED_VALUE = 0; - /** - *
-     * TLS handshake protocol.
-     * 
- * - * TLS = 1; - */ - public static final int TLS_VALUE = 1; - /** - *
-     * Application Layer Transport Security handshake protocol.
-     * 
- * - * ALTS = 2; - */ - public static final int ALTS_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static HandshakeProtocol valueOf(int value) { - return forNumber(value); - } - - public static HandshakeProtocol forNumber(int value) { - switch (value) { - case 0: return HANDSHAKE_PROTOCOL_UNSPECIFIED; - case 1: return TLS; - case 2: return ALTS; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - HandshakeProtocol> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public HandshakeProtocol findValueByNumber(int number) { - return HandshakeProtocol.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.getDescriptor().getEnumTypes().get(0); - } - - private static final HandshakeProtocol[] VALUES = values(); - - public static HandshakeProtocol valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private HandshakeProtocol(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grpc.gcp.HandshakeProtocol) - } - - /** - * Protobuf enum {@code grpc.gcp.NetworkProtocol} - */ - public enum NetworkProtocol - implements com.google.protobuf.ProtocolMessageEnum { - /** - * NETWORK_PROTOCOL_UNSPECIFIED = 0; - */ - NETWORK_PROTOCOL_UNSPECIFIED(0), - /** - * TCP = 1; - */ - TCP(1), - /** - * UDP = 2; - */ - UDP(2), - UNRECOGNIZED(-1), - ; - - /** - * NETWORK_PROTOCOL_UNSPECIFIED = 0; - */ - public static final int NETWORK_PROTOCOL_UNSPECIFIED_VALUE = 0; - /** - * TCP = 1; - */ - public static final int TCP_VALUE = 1; - /** - * UDP = 2; - */ - public static final int UDP_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static NetworkProtocol valueOf(int value) { - return forNumber(value); - } - - public static NetworkProtocol forNumber(int value) { - switch (value) { - case 0: return NETWORK_PROTOCOL_UNSPECIFIED; - case 1: return TCP; - case 2: return UDP; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - NetworkProtocol> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public NetworkProtocol findValueByNumber(int number) { - return NetworkProtocol.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.getDescriptor().getEnumTypes().get(1); - } - - private static final NetworkProtocol[] VALUES = values(); - - public static NetworkProtocol valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private NetworkProtocol(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grpc.gcp.NetworkProtocol) - } - - public interface EndpointOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.Endpoint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
-     * "192.168.0.1" or "2001:db8::1".
-     * 
- * - * string ip_address = 1; - */ - java.lang.String getIpAddress(); - /** - *
-     * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
-     * "192.168.0.1" or "2001:db8::1".
-     * 
- * - * string ip_address = 1; - */ - com.google.protobuf.ByteString - getIpAddressBytes(); - - /** - *
-     * Port number.
-     * 
- * - * int32 port = 2; - */ - int getPort(); - - /** - *
-     * Network protocol (e.g., TCP, UDP) associated with this endpoint.
-     * 
- * - * .grpc.gcp.NetworkProtocol protocol = 3; - */ - int getProtocolValue(); - /** - *
-     * Network protocol (e.g., TCP, UDP) associated with this endpoint.
-     * 
- * - * .grpc.gcp.NetworkProtocol protocol = 3; - */ - io.grpc.alts.internal.Handshaker.NetworkProtocol getProtocol(); - } - /** - * Protobuf type {@code grpc.gcp.Endpoint} - */ - public static final class Endpoint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gcp.Endpoint) - EndpointOrBuilder { - private static final long serialVersionUID = 0L; - // Use Endpoint.newBuilder() to construct. - private Endpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Endpoint() { - ipAddress_ = ""; - port_ = 0; - protocol_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Endpoint( - 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(); - - ipAddress_ = s; - break; - } - case 16: { - - port_ = input.readInt32(); - break; - } - case 24: { - int rawValue = input.readEnum(); - - protocol_ = rawValue; - 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.Handshaker.internal_static_grpc_gcp_Endpoint_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_Endpoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.Endpoint.class, io.grpc.alts.internal.Handshaker.Endpoint.Builder.class); - } - - public static final int IP_ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object ipAddress_; - /** - *
-     * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
-     * "192.168.0.1" or "2001:db8::1".
-     * 
- * - * string ip_address = 1; - */ - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - 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(); - ipAddress_ = s; - return s; - } - } - /** - *
-     * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
-     * "192.168.0.1" or "2001:db8::1".
-     * 
- * - * string ip_address = 1; - */ - public com.google.protobuf.ByteString - getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PORT_FIELD_NUMBER = 2; - private int port_; - /** - *
-     * Port number.
-     * 
- * - * int32 port = 2; - */ - public int getPort() { - return port_; - } - - public static final int PROTOCOL_FIELD_NUMBER = 3; - private int protocol_; - /** - *
-     * Network protocol (e.g., TCP, UDP) associated with this endpoint.
-     * 
- * - * .grpc.gcp.NetworkProtocol protocol = 3; - */ - public int getProtocolValue() { - return protocol_; - } - /** - *
-     * Network protocol (e.g., TCP, UDP) associated with this endpoint.
-     * 
- * - * .grpc.gcp.NetworkProtocol protocol = 3; - */ - public io.grpc.alts.internal.Handshaker.NetworkProtocol getProtocol() { - io.grpc.alts.internal.Handshaker.NetworkProtocol result = io.grpc.alts.internal.Handshaker.NetworkProtocol.valueOf(protocol_); - return result == null ? io.grpc.alts.internal.Handshaker.NetworkProtocol.UNRECOGNIZED : result; - } - - 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 (!getIpAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddress_); - } - if (port_ != 0) { - output.writeInt32(2, port_); - } - if (protocol_ != io.grpc.alts.internal.Handshaker.NetworkProtocol.NETWORK_PROTOCOL_UNSPECIFIED.getNumber()) { - output.writeEnum(3, protocol_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getIpAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipAddress_); - } - if (port_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, port_); - } - if (protocol_ != io.grpc.alts.internal.Handshaker.NetworkProtocol.NETWORK_PROTOCOL_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, protocol_); - } - 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.Handshaker.Endpoint)) { - return super.equals(obj); - } - io.grpc.alts.internal.Handshaker.Endpoint other = (io.grpc.alts.internal.Handshaker.Endpoint) obj; - - boolean result = true; - result = result && getIpAddress() - .equals(other.getIpAddress()); - result = result && (getPort() - == other.getPort()); - result = result && protocol_ == other.protocol_; - 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) + IP_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getIpAddress().hashCode(); - hash = (37 * hash) + PORT_FIELD_NUMBER; - hash = (53 * hash) + getPort(); - hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; - hash = (53 * hash) + protocol_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grpc.alts.internal.Handshaker.Endpoint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.Endpoint 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.Handshaker.Endpoint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.Endpoint 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.Handshaker.Endpoint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.Endpoint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grpc.alts.internal.Handshaker.Endpoint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.Endpoint 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.Handshaker.Endpoint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.Endpoint 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.Handshaker.Endpoint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.Endpoint 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.Handshaker.Endpoint 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.Endpoint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.Endpoint) - io.grpc.alts.internal.Handshaker.EndpointOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_Endpoint_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_Endpoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.Endpoint.class, io.grpc.alts.internal.Handshaker.Endpoint.Builder.class); - } - - // Construct using io.grpc.alts.internal.Handshaker.Endpoint.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(); - ipAddress_ = ""; - - port_ = 0; - - protocol_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_Endpoint_descriptor; - } - - public io.grpc.alts.internal.Handshaker.Endpoint getDefaultInstanceForType() { - return io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance(); - } - - public io.grpc.alts.internal.Handshaker.Endpoint build() { - io.grpc.alts.internal.Handshaker.Endpoint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.Handshaker.Endpoint buildPartial() { - io.grpc.alts.internal.Handshaker.Endpoint result = new io.grpc.alts.internal.Handshaker.Endpoint(this); - result.ipAddress_ = ipAddress_; - result.port_ = port_; - result.protocol_ = protocol_; - 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.Handshaker.Endpoint) { - return mergeFrom((io.grpc.alts.internal.Handshaker.Endpoint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.Handshaker.Endpoint other) { - if (other == io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance()) return this; - if (!other.getIpAddress().isEmpty()) { - ipAddress_ = other.ipAddress_; - onChanged(); - } - if (other.getPort() != 0) { - setPort(other.getPort()); - } - if (other.protocol_ != 0) { - setProtocolValue(other.getProtocolValue()); - } - 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.Handshaker.Endpoint parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.Handshaker.Endpoint) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object ipAddress_ = ""; - /** - *
-       * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
-       * "192.168.0.1" or "2001:db8::1".
-       * 
- * - * string ip_address = 1; - */ - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ipAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
-       * "192.168.0.1" or "2001:db8::1".
-       * 
- * - * string ip_address = 1; - */ - public com.google.protobuf.ByteString - getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
-       * "192.168.0.1" or "2001:db8::1".
-       * 
- * - * string ip_address = 1; - */ - public Builder setIpAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - ipAddress_ = value; - onChanged(); - return this; - } - /** - *
-       * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
-       * "192.168.0.1" or "2001:db8::1".
-       * 
- * - * string ip_address = 1; - */ - public Builder clearIpAddress() { - - ipAddress_ = getDefaultInstance().getIpAddress(); - onChanged(); - return this; - } - /** - *
-       * IP address. It should contain an IPv4 or IPv6 string literal, e.g.
-       * "192.168.0.1" or "2001:db8::1".
-       * 
- * - * string ip_address = 1; - */ - public Builder setIpAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - ipAddress_ = value; - onChanged(); - return this; - } - - private int port_ ; - /** - *
-       * Port number.
-       * 
- * - * int32 port = 2; - */ - public int getPort() { - return port_; - } - /** - *
-       * Port number.
-       * 
- * - * int32 port = 2; - */ - public Builder setPort(int value) { - - port_ = value; - onChanged(); - return this; - } - /** - *
-       * Port number.
-       * 
- * - * int32 port = 2; - */ - public Builder clearPort() { - - port_ = 0; - onChanged(); - return this; - } - - private int protocol_ = 0; - /** - *
-       * Network protocol (e.g., TCP, UDP) associated with this endpoint.
-       * 
- * - * .grpc.gcp.NetworkProtocol protocol = 3; - */ - public int getProtocolValue() { - return protocol_; - } - /** - *
-       * Network protocol (e.g., TCP, UDP) associated with this endpoint.
-       * 
- * - * .grpc.gcp.NetworkProtocol protocol = 3; - */ - public Builder setProtocolValue(int value) { - protocol_ = value; - onChanged(); - return this; - } - /** - *
-       * Network protocol (e.g., TCP, UDP) associated with this endpoint.
-       * 
- * - * .grpc.gcp.NetworkProtocol protocol = 3; - */ - public io.grpc.alts.internal.Handshaker.NetworkProtocol getProtocol() { - io.grpc.alts.internal.Handshaker.NetworkProtocol result = io.grpc.alts.internal.Handshaker.NetworkProtocol.valueOf(protocol_); - return result == null ? io.grpc.alts.internal.Handshaker.NetworkProtocol.UNRECOGNIZED : result; - } - /** - *
-       * Network protocol (e.g., TCP, UDP) associated with this endpoint.
-       * 
- * - * .grpc.gcp.NetworkProtocol protocol = 3; - */ - public Builder setProtocol(io.grpc.alts.internal.Handshaker.NetworkProtocol value) { - if (value == null) { - throw new NullPointerException(); - } - - protocol_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Network protocol (e.g., TCP, UDP) associated with this endpoint.
-       * 
- * - * .grpc.gcp.NetworkProtocol protocol = 3; - */ - public Builder clearProtocol() { - - protocol_ = 0; - onChanged(); - return this; - } - 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.Endpoint) - } - - // @@protoc_insertion_point(class_scope:grpc.gcp.Endpoint) - private static final io.grpc.alts.internal.Handshaker.Endpoint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.Handshaker.Endpoint(); - } - - public static io.grpc.alts.internal.Handshaker.Endpoint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Endpoint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Endpoint(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.Handshaker.Endpoint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface IdentityOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.Identity) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Service account of a connection endpoint.
-     * 
- * - * string service_account = 1; - */ - java.lang.String getServiceAccount(); - /** - *
-     * Service account of a connection endpoint.
-     * 
- * - * string service_account = 1; - */ - com.google.protobuf.ByteString - getServiceAccountBytes(); - - /** - *
-     * Hostname of a connection endpoint.
-     * 
- * - * string hostname = 2; - */ - java.lang.String getHostname(); - /** - *
-     * Hostname of a connection endpoint.
-     * 
- * - * string hostname = 2; - */ - com.google.protobuf.ByteString - getHostnameBytes(); - - /** - *
-     * Additional attributes of the identity.
-     * 
- * - * map<string, string> attributes = 3; - */ - int getAttributesCount(); - /** - *
-     * Additional attributes of the identity.
-     * 
- * - * map<string, string> attributes = 3; - */ - boolean containsAttributes( - java.lang.String key); - /** - * Use {@link #getAttributesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getAttributes(); - /** - *
-     * Additional attributes of the identity.
-     * 
- * - * map<string, string> attributes = 3; - */ - java.util.Map - getAttributesMap(); - /** - *
-     * Additional attributes of the identity.
-     * 
- * - * map<string, string> attributes = 3; - */ - - java.lang.String getAttributesOrDefault( - java.lang.String key, - java.lang.String defaultValue); - /** - *
-     * Additional attributes of the identity.
-     * 
- * - * map<string, string> attributes = 3; - */ - - java.lang.String getAttributesOrThrow( - java.lang.String key); - - public io.grpc.alts.internal.Handshaker.Identity.IdentityOneofCase getIdentityOneofCase(); - } - /** - * Protobuf type {@code grpc.gcp.Identity} - */ - public static final class Identity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gcp.Identity) - IdentityOrBuilder { - private static final long serialVersionUID = 0L; - // Use Identity.newBuilder() to construct. - private Identity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Identity() { - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Identity( - 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(); - identityOneofCase_ = 1; - identityOneof_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - identityOneofCase_ = 2; - identityOneof_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - attributes_ = com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry - attributes__ = input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - attributes_.getMutableMap().put( - attributes__.getKey(), attributes__.getValue()); - 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.Handshaker.internal_static_grpc_gcp_Identity_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 3: - return internalGetAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_Identity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.Identity.class, io.grpc.alts.internal.Handshaker.Identity.Builder.class); - } - - private int bitField0_; - private int identityOneofCase_ = 0; - private java.lang.Object identityOneof_; - public enum IdentityOneofCase - implements com.google.protobuf.Internal.EnumLite { - SERVICE_ACCOUNT(1), - HOSTNAME(2), - IDENTITYONEOF_NOT_SET(0); - private final int value; - private IdentityOneofCase(int value) { - this.value = value; - } - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static IdentityOneofCase valueOf(int value) { - return forNumber(value); - } - - public static IdentityOneofCase forNumber(int value) { - switch (value) { - case 1: return SERVICE_ACCOUNT; - case 2: return HOSTNAME; - case 0: return IDENTITYONEOF_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public IdentityOneofCase - getIdentityOneofCase() { - return IdentityOneofCase.forNumber( - identityOneofCase_); - } - - public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 1; - /** - *
-     * Service account of a connection endpoint.
-     * 
- * - * string service_account = 1; - */ - public java.lang.String getServiceAccount() { - java.lang.Object ref = ""; - if (identityOneofCase_ == 1) { - ref = identityOneof_; - } - 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(); - if (identityOneofCase_ == 1) { - identityOneof_ = s; - } - return s; - } - } - /** - *
-     * Service account of a connection endpoint.
-     * 
- * - * string service_account = 1; - */ - public com.google.protobuf.ByteString - getServiceAccountBytes() { - java.lang.Object ref = ""; - if (identityOneofCase_ == 1) { - ref = identityOneof_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (identityOneofCase_ == 1) { - identityOneof_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int HOSTNAME_FIELD_NUMBER = 2; - /** - *
-     * Hostname of a connection endpoint.
-     * 
- * - * string hostname = 2; - */ - public java.lang.String getHostname() { - java.lang.Object ref = ""; - if (identityOneofCase_ == 2) { - ref = identityOneof_; - } - 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(); - if (identityOneofCase_ == 2) { - identityOneof_ = s; - } - return s; - } - } - /** - *
-     * Hostname of a connection endpoint.
-     * 
- * - * string hostname = 2; - */ - public com.google.protobuf.ByteString - getHostnameBytes() { - java.lang.Object ref = ""; - if (identityOneofCase_ == 2) { - ref = identityOneof_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (identityOneofCase_ == 2) { - identityOneof_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ATTRIBUTES_FIELD_NUMBER = 3; - private static final class AttributesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_Identity_AttributesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> attributes_; - private com.google.protobuf.MapField - internalGetAttributes() { - if (attributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - return attributes_; - } - - public int getAttributesCount() { - return internalGetAttributes().getMap().size(); - } - /** - *
-     * Additional attributes of the identity.
-     * 
- * - * map<string, string> attributes = 3; - */ - - public boolean containsAttributes( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - return internalGetAttributes().getMap().containsKey(key); - } - /** - * Use {@link #getAttributesMap()} instead. - */ - @java.lang.Deprecated - public java.util.Map getAttributes() { - return getAttributesMap(); - } - /** - *
-     * Additional attributes of the identity.
-     * 
- * - * map<string, string> attributes = 3; - */ - - public java.util.Map getAttributesMap() { - return internalGetAttributes().getMap(); - } - /** - *
-     * Additional attributes of the identity.
-     * 
- * - * map<string, string> attributes = 3; - */ - - public java.lang.String getAttributesOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetAttributes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Additional attributes of the identity.
-     * 
- * - * map<string, string> attributes = 3; - */ - - public java.lang.String getAttributesOrThrow( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetAttributes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 (identityOneofCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, identityOneof_); - } - if (identityOneofCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, identityOneof_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetAttributes(), - AttributesDefaultEntryHolder.defaultEntry, - 3); - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (identityOneofCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, identityOneof_); - } - if (identityOneofCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, identityOneof_); - } - for (java.util.Map.Entry entry - : internalGetAttributes().getMap().entrySet()) { - com.google.protobuf.MapEntry - attributes__ = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, attributes__); - } - 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.Handshaker.Identity)) { - return super.equals(obj); - } - io.grpc.alts.internal.Handshaker.Identity other = (io.grpc.alts.internal.Handshaker.Identity) obj; - - boolean result = true; - result = result && internalGetAttributes().equals( - other.internalGetAttributes()); - result = result && getIdentityOneofCase().equals( - other.getIdentityOneofCase()); - if (!result) return false; - switch (identityOneofCase_) { - case 1: - result = result && getServiceAccount() - .equals(other.getServiceAccount()); - break; - case 2: - result = result && getHostname() - .equals(other.getHostname()); - break; - case 0: - default: - } - 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 (!internalGetAttributes().getMap().isEmpty()) { - hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + internalGetAttributes().hashCode(); - } - switch (identityOneofCase_) { - case 1: - hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccount().hashCode(); - break; - case 2: - hash = (37 * hash) + HOSTNAME_FIELD_NUMBER; - hash = (53 * hash) + getHostname().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grpc.alts.internal.Handshaker.Identity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.Identity 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.Handshaker.Identity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.Identity 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.Handshaker.Identity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.Identity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grpc.alts.internal.Handshaker.Identity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.Identity 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.Handshaker.Identity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.Identity 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.Handshaker.Identity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.Identity 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.Handshaker.Identity 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.Identity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.Identity) - io.grpc.alts.internal.Handshaker.IdentityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_Identity_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 3: - return internalGetAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 3: - return internalGetMutableAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_Identity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.Identity.class, io.grpc.alts.internal.Handshaker.Identity.Builder.class); - } - - // Construct using io.grpc.alts.internal.Handshaker.Identity.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(); - internalGetMutableAttributes().clear(); - identityOneofCase_ = 0; - identityOneof_ = null; - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_Identity_descriptor; - } - - public io.grpc.alts.internal.Handshaker.Identity getDefaultInstanceForType() { - return io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance(); - } - - public io.grpc.alts.internal.Handshaker.Identity build() { - io.grpc.alts.internal.Handshaker.Identity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.Handshaker.Identity buildPartial() { - io.grpc.alts.internal.Handshaker.Identity result = new io.grpc.alts.internal.Handshaker.Identity(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (identityOneofCase_ == 1) { - result.identityOneof_ = identityOneof_; - } - if (identityOneofCase_ == 2) { - result.identityOneof_ = identityOneof_; - } - result.attributes_ = internalGetAttributes(); - result.attributes_.makeImmutable(); - result.bitField0_ = to_bitField0_; - result.identityOneofCase_ = identityOneofCase_; - 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.Handshaker.Identity) { - return mergeFrom((io.grpc.alts.internal.Handshaker.Identity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.Handshaker.Identity other) { - if (other == io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance()) return this; - internalGetMutableAttributes().mergeFrom( - other.internalGetAttributes()); - switch (other.getIdentityOneofCase()) { - case SERVICE_ACCOUNT: { - identityOneofCase_ = 1; - identityOneof_ = other.identityOneof_; - onChanged(); - break; - } - case HOSTNAME: { - identityOneofCase_ = 2; - identityOneof_ = other.identityOneof_; - onChanged(); - break; - } - case IDENTITYONEOF_NOT_SET: { - break; - } - } - 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.Handshaker.Identity parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.Handshaker.Identity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int identityOneofCase_ = 0; - private java.lang.Object identityOneof_; - public IdentityOneofCase - getIdentityOneofCase() { - return IdentityOneofCase.forNumber( - identityOneofCase_); - } - - public Builder clearIdentityOneof() { - identityOneofCase_ = 0; - identityOneof_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - *
-       * Service account of a connection endpoint.
-       * 
- * - * string service_account = 1; - */ - public java.lang.String getServiceAccount() { - java.lang.Object ref = ""; - if (identityOneofCase_ == 1) { - ref = identityOneof_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (identityOneofCase_ == 1) { - identityOneof_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Service account of a connection endpoint.
-       * 
- * - * string service_account = 1; - */ - public com.google.protobuf.ByteString - getServiceAccountBytes() { - java.lang.Object ref = ""; - if (identityOneofCase_ == 1) { - ref = identityOneof_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (identityOneofCase_ == 1) { - identityOneof_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Service account of a connection endpoint.
-       * 
- * - * string service_account = 1; - */ - public Builder setServiceAccount( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - identityOneofCase_ = 1; - identityOneof_ = value; - onChanged(); - return this; - } - /** - *
-       * Service account of a connection endpoint.
-       * 
- * - * string service_account = 1; - */ - public Builder clearServiceAccount() { - if (identityOneofCase_ == 1) { - identityOneofCase_ = 0; - identityOneof_ = null; - onChanged(); - } - return this; - } - /** - *
-       * Service account of a connection endpoint.
-       * 
- * - * string service_account = 1; - */ - public Builder setServiceAccountBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - identityOneofCase_ = 1; - identityOneof_ = value; - onChanged(); - return this; - } - - /** - *
-       * Hostname of a connection endpoint.
-       * 
- * - * string hostname = 2; - */ - public java.lang.String getHostname() { - java.lang.Object ref = ""; - if (identityOneofCase_ == 2) { - ref = identityOneof_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (identityOneofCase_ == 2) { - identityOneof_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Hostname of a connection endpoint.
-       * 
- * - * string hostname = 2; - */ - public com.google.protobuf.ByteString - getHostnameBytes() { - java.lang.Object ref = ""; - if (identityOneofCase_ == 2) { - ref = identityOneof_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (identityOneofCase_ == 2) { - identityOneof_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Hostname of a connection endpoint.
-       * 
- * - * string hostname = 2; - */ - public Builder setHostname( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - identityOneofCase_ = 2; - identityOneof_ = value; - onChanged(); - return this; - } - /** - *
-       * Hostname of a connection endpoint.
-       * 
- * - * string hostname = 2; - */ - public Builder clearHostname() { - if (identityOneofCase_ == 2) { - identityOneofCase_ = 0; - identityOneof_ = null; - onChanged(); - } - return this; - } - /** - *
-       * Hostname of a connection endpoint.
-       * 
- * - * string hostname = 2; - */ - public Builder setHostnameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - identityOneofCase_ = 2; - identityOneof_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> attributes_; - private com.google.protobuf.MapField - internalGetAttributes() { - if (attributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - return attributes_; - } - private com.google.protobuf.MapField - internalGetMutableAttributes() { - onChanged();; - if (attributes_ == null) { - attributes_ = com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - if (!attributes_.isMutable()) { - attributes_ = attributes_.copy(); - } - return attributes_; - } - - public int getAttributesCount() { - return internalGetAttributes().getMap().size(); - } - /** - *
-       * Additional attributes of the identity.
-       * 
- * - * map<string, string> attributes = 3; - */ - - public boolean containsAttributes( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - return internalGetAttributes().getMap().containsKey(key); - } - /** - * Use {@link #getAttributesMap()} instead. - */ - @java.lang.Deprecated - public java.util.Map getAttributes() { - return getAttributesMap(); - } - /** - *
-       * Additional attributes of the identity.
-       * 
- * - * map<string, string> attributes = 3; - */ - - public java.util.Map getAttributesMap() { - return internalGetAttributes().getMap(); - } - /** - *
-       * Additional attributes of the identity.
-       * 
- * - * map<string, string> attributes = 3; - */ - - public java.lang.String getAttributesOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetAttributes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-       * Additional attributes of the identity.
-       * 
- * - * map<string, string> attributes = 3; - */ - - public java.lang.String getAttributesOrThrow( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetAttributes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearAttributes() { - internalGetMutableAttributes().getMutableMap() - .clear(); - return this; - } - /** - *
-       * Additional attributes of the identity.
-       * 
- * - * map<string, string> attributes = 3; - */ - - public Builder removeAttributes( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - internalGetMutableAttributes().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableAttributes() { - return internalGetMutableAttributes().getMutableMap(); - } - /** - *
-       * Additional attributes of the identity.
-       * 
- * - * map<string, string> attributes = 3; - */ - public Builder putAttributes( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new java.lang.NullPointerException(); } - if (value == null) { throw new java.lang.NullPointerException(); } - internalGetMutableAttributes().getMutableMap() - .put(key, value); - return this; - } - /** - *
-       * Additional attributes of the identity.
-       * 
- * - * map<string, string> attributes = 3; - */ - - public Builder putAllAttributes( - java.util.Map values) { - internalGetMutableAttributes().getMutableMap() - .putAll(values); - return this; - } - 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.Identity) - } - - // @@protoc_insertion_point(class_scope:grpc.gcp.Identity) - private static final io.grpc.alts.internal.Handshaker.Identity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.Handshaker.Identity(); - } - - public static io.grpc.alts.internal.Handshaker.Identity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Identity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Identity(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.Handshaker.Identity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface StartClientHandshakeReqOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.StartClientHandshakeReq) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Handshake security protocol requested by the client.
-     * 
- * - * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; - */ - int getHandshakeSecurityProtocolValue(); - /** - *
-     * Handshake security protocol requested by the client.
-     * 
- * - * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; - */ - io.grpc.alts.internal.Handshaker.HandshakeProtocol getHandshakeSecurityProtocol(); - - /** - *
-     * The application protocols supported by the client, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 2; - */ - java.util.List - getApplicationProtocolsList(); - /** - *
-     * The application protocols supported by the client, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 2; - */ - int getApplicationProtocolsCount(); - /** - *
-     * The application protocols supported by the client, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 2; - */ - java.lang.String getApplicationProtocols(int index); - /** - *
-     * The application protocols supported by the client, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 2; - */ - com.google.protobuf.ByteString - getApplicationProtocolsBytes(int index); - - /** - *
-     * The record protocols supported by the client, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 3; - */ - java.util.List - getRecordProtocolsList(); - /** - *
-     * The record protocols supported by the client, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 3; - */ - int getRecordProtocolsCount(); - /** - *
-     * The record protocols supported by the client, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 3; - */ - java.lang.String getRecordProtocols(int index); - /** - *
-     * The record protocols supported by the client, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 3; - */ - com.google.protobuf.ByteString - getRecordProtocolsBytes(int index); - - /** - *
-     * (Optional) Describes which server identities are acceptable by the client.
-     * If target identities are provided and none of them matches the peer
-     * identity of the server, handshake will fail.
-     * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - java.util.List - getTargetIdentitiesList(); - /** - *
-     * (Optional) Describes which server identities are acceptable by the client.
-     * If target identities are provided and none of them matches the peer
-     * identity of the server, handshake will fail.
-     * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - io.grpc.alts.internal.Handshaker.Identity getTargetIdentities(int index); - /** - *
-     * (Optional) Describes which server identities are acceptable by the client.
-     * If target identities are provided and none of them matches the peer
-     * identity of the server, handshake will fail.
-     * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - int getTargetIdentitiesCount(); - /** - *
-     * (Optional) Describes which server identities are acceptable by the client.
-     * If target identities are provided and none of them matches the peer
-     * identity of the server, handshake will fail.
-     * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - java.util.List - getTargetIdentitiesOrBuilderList(); - /** - *
-     * (Optional) Describes which server identities are acceptable by the client.
-     * If target identities are provided and none of them matches the peer
-     * identity of the server, handshake will fail.
-     * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - io.grpc.alts.internal.Handshaker.IdentityOrBuilder getTargetIdentitiesOrBuilder( - int index); - - /** - *
-     * (Optional) Application may specify a local identity. Otherwise, the
-     * handshaker chooses a default local identity.
-     * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - boolean hasLocalIdentity(); - /** - *
-     * (Optional) Application may specify a local identity. Otherwise, the
-     * handshaker chooses a default local identity.
-     * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - io.grpc.alts.internal.Handshaker.Identity getLocalIdentity(); - /** - *
-     * (Optional) Application may specify a local identity. Otherwise, the
-     * handshaker chooses a default local identity.
-     * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - io.grpc.alts.internal.Handshaker.IdentityOrBuilder getLocalIdentityOrBuilder(); - - /** - *
-     * (Optional) Local endpoint information of the connection to the server,
-     * such as local IP address, port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - boolean hasLocalEndpoint(); - /** - *
-     * (Optional) Local endpoint information of the connection to the server,
-     * such as local IP address, port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - io.grpc.alts.internal.Handshaker.Endpoint getLocalEndpoint(); - /** - *
-     * (Optional) Local endpoint information of the connection to the server,
-     * such as local IP address, port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - io.grpc.alts.internal.Handshaker.EndpointOrBuilder getLocalEndpointOrBuilder(); - - /** - *
-     * (Optional) Endpoint information of the remote server, such as IP address,
-     * port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - boolean hasRemoteEndpoint(); - /** - *
-     * (Optional) Endpoint information of the remote server, such as IP address,
-     * port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - io.grpc.alts.internal.Handshaker.Endpoint getRemoteEndpoint(); - /** - *
-     * (Optional) Endpoint information of the remote server, such as IP address,
-     * port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - io.grpc.alts.internal.Handshaker.EndpointOrBuilder getRemoteEndpointOrBuilder(); - - /** - *
-     * (Optional) If target name is provided, a secure naming check is performed
-     * to verify that the peer authenticated identity is indeed authorized to run
-     * the target name.
-     * 
- * - * string target_name = 8; - */ - java.lang.String getTargetName(); - /** - *
-     * (Optional) If target name is provided, a secure naming check is performed
-     * to verify that the peer authenticated identity is indeed authorized to run
-     * the target name.
-     * 
- * - * string target_name = 8; - */ - com.google.protobuf.ByteString - getTargetNameBytes(); - - /** - *
-     * (Optional) RPC protocol versions supported by the client.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - boolean hasRpcVersions(); - /** - *
-     * (Optional) RPC protocol versions supported by the client.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getRpcVersions(); - /** - *
-     * (Optional) RPC protocol versions supported by the client.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder(); - } - /** - * Protobuf type {@code grpc.gcp.StartClientHandshakeReq} - */ - public static final class StartClientHandshakeReq extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gcp.StartClientHandshakeReq) - StartClientHandshakeReqOrBuilder { - private static final long serialVersionUID = 0L; - // Use StartClientHandshakeReq.newBuilder() to construct. - private StartClientHandshakeReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private StartClientHandshakeReq() { - handshakeSecurityProtocol_ = 0; - applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - targetIdentities_ = java.util.Collections.emptyList(); - targetName_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StartClientHandshakeReq( - 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 8: { - int rawValue = input.readEnum(); - - handshakeSecurityProtocol_ = rawValue; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - applicationProtocols_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - applicationProtocols_.add(s); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - recordProtocols_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - recordProtocols_.add(s); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - targetIdentities_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - targetIdentities_.add( - input.readMessage(io.grpc.alts.internal.Handshaker.Identity.parser(), extensionRegistry)); - break; - } - case 42: { - io.grpc.alts.internal.Handshaker.Identity.Builder subBuilder = null; - if (localIdentity_ != null) { - subBuilder = localIdentity_.toBuilder(); - } - localIdentity_ = input.readMessage(io.grpc.alts.internal.Handshaker.Identity.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(localIdentity_); - localIdentity_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - io.grpc.alts.internal.Handshaker.Endpoint.Builder subBuilder = null; - if (localEndpoint_ != null) { - subBuilder = localEndpoint_.toBuilder(); - } - localEndpoint_ = input.readMessage(io.grpc.alts.internal.Handshaker.Endpoint.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(localEndpoint_); - localEndpoint_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - io.grpc.alts.internal.Handshaker.Endpoint.Builder subBuilder = null; - if (remoteEndpoint_ != null) { - subBuilder = remoteEndpoint_.toBuilder(); - } - remoteEndpoint_ = input.readMessage(io.grpc.alts.internal.Handshaker.Endpoint.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(remoteEndpoint_); - remoteEndpoint_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - targetName_ = s; - break; - } - case 74: { - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder subBuilder = null; - if (rpcVersions_ != null) { - subBuilder = rpcVersions_.toBuilder(); - } - rpcVersions_ = input.readMessage(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rpcVersions_); - rpcVersions_ = 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 { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - applicationProtocols_ = applicationProtocols_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - recordProtocols_ = recordProtocols_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - targetIdentities_ = java.util.Collections.unmodifiableList(targetIdentities_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_StartClientHandshakeReq_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_StartClientHandshakeReq_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.class, io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.Builder.class); - } - - private int bitField0_; - public static final int HANDSHAKE_SECURITY_PROTOCOL_FIELD_NUMBER = 1; - private int handshakeSecurityProtocol_; - /** - *
-     * Handshake security protocol requested by the client.
-     * 
- * - * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; - */ - public int getHandshakeSecurityProtocolValue() { - return handshakeSecurityProtocol_; - } - /** - *
-     * Handshake security protocol requested by the client.
-     * 
- * - * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; - */ - public io.grpc.alts.internal.Handshaker.HandshakeProtocol getHandshakeSecurityProtocol() { - io.grpc.alts.internal.Handshaker.HandshakeProtocol result = io.grpc.alts.internal.Handshaker.HandshakeProtocol.valueOf(handshakeSecurityProtocol_); - return result == null ? io.grpc.alts.internal.Handshaker.HandshakeProtocol.UNRECOGNIZED : result; - } - - public static final int APPLICATION_PROTOCOLS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList applicationProtocols_; - /** - *
-     * The application protocols supported by the client, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 2; - */ - public com.google.protobuf.ProtocolStringList - getApplicationProtocolsList() { - return applicationProtocols_; - } - /** - *
-     * The application protocols supported by the client, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 2; - */ - public int getApplicationProtocolsCount() { - return applicationProtocols_.size(); - } - /** - *
-     * The application protocols supported by the client, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 2; - */ - public java.lang.String getApplicationProtocols(int index) { - return applicationProtocols_.get(index); - } - /** - *
-     * The application protocols supported by the client, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 2; - */ - public com.google.protobuf.ByteString - getApplicationProtocolsBytes(int index) { - return applicationProtocols_.getByteString(index); - } - - public static final int RECORD_PROTOCOLS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList recordProtocols_; - /** - *
-     * The record protocols supported by the client, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 3; - */ - public com.google.protobuf.ProtocolStringList - getRecordProtocolsList() { - return recordProtocols_; - } - /** - *
-     * The record protocols supported by the client, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 3; - */ - public int getRecordProtocolsCount() { - return recordProtocols_.size(); - } - /** - *
-     * The record protocols supported by the client, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 3; - */ - public java.lang.String getRecordProtocols(int index) { - return recordProtocols_.get(index); - } - /** - *
-     * The record protocols supported by the client, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 3; - */ - public com.google.protobuf.ByteString - getRecordProtocolsBytes(int index) { - return recordProtocols_.getByteString(index); - } - - public static final int TARGET_IDENTITIES_FIELD_NUMBER = 4; - private java.util.List targetIdentities_; - /** - *
-     * (Optional) Describes which server identities are acceptable by the client.
-     * If target identities are provided and none of them matches the peer
-     * identity of the server, handshake will fail.
-     * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public java.util.List getTargetIdentitiesList() { - return targetIdentities_; - } - /** - *
-     * (Optional) Describes which server identities are acceptable by the client.
-     * If target identities are provided and none of them matches the peer
-     * identity of the server, handshake will fail.
-     * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public java.util.List - getTargetIdentitiesOrBuilderList() { - return targetIdentities_; - } - /** - *
-     * (Optional) Describes which server identities are acceptable by the client.
-     * If target identities are provided and none of them matches the peer
-     * identity of the server, handshake will fail.
-     * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public int getTargetIdentitiesCount() { - return targetIdentities_.size(); - } - /** - *
-     * (Optional) Describes which server identities are acceptable by the client.
-     * If target identities are provided and none of them matches the peer
-     * identity of the server, handshake will fail.
-     * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public io.grpc.alts.internal.Handshaker.Identity getTargetIdentities(int index) { - return targetIdentities_.get(index); - } - /** - *
-     * (Optional) Describes which server identities are acceptable by the client.
-     * If target identities are provided and none of them matches the peer
-     * identity of the server, handshake will fail.
-     * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public io.grpc.alts.internal.Handshaker.IdentityOrBuilder getTargetIdentitiesOrBuilder( - int index) { - return targetIdentities_.get(index); - } - - public static final int LOCAL_IDENTITY_FIELD_NUMBER = 5; - private io.grpc.alts.internal.Handshaker.Identity localIdentity_; - /** - *
-     * (Optional) Application may specify a local identity. Otherwise, the
-     * handshaker chooses a default local identity.
-     * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public boolean hasLocalIdentity() { - return localIdentity_ != null; - } - /** - *
-     * (Optional) Application may specify a local identity. Otherwise, the
-     * handshaker chooses a default local identity.
-     * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public io.grpc.alts.internal.Handshaker.Identity getLocalIdentity() { - return localIdentity_ == null ? io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance() : localIdentity_; - } - /** - *
-     * (Optional) Application may specify a local identity. Otherwise, the
-     * handshaker chooses a default local identity.
-     * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public io.grpc.alts.internal.Handshaker.IdentityOrBuilder getLocalIdentityOrBuilder() { - return getLocalIdentity(); - } - - public static final int LOCAL_ENDPOINT_FIELD_NUMBER = 6; - private io.grpc.alts.internal.Handshaker.Endpoint localEndpoint_; - /** - *
-     * (Optional) Local endpoint information of the connection to the server,
-     * such as local IP address, port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - public boolean hasLocalEndpoint() { - return localEndpoint_ != null; - } - /** - *
-     * (Optional) Local endpoint information of the connection to the server,
-     * such as local IP address, port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - public io.grpc.alts.internal.Handshaker.Endpoint getLocalEndpoint() { - return localEndpoint_ == null ? io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance() : localEndpoint_; - } - /** - *
-     * (Optional) Local endpoint information of the connection to the server,
-     * such as local IP address, port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - public io.grpc.alts.internal.Handshaker.EndpointOrBuilder getLocalEndpointOrBuilder() { - return getLocalEndpoint(); - } - - public static final int REMOTE_ENDPOINT_FIELD_NUMBER = 7; - private io.grpc.alts.internal.Handshaker.Endpoint remoteEndpoint_; - /** - *
-     * (Optional) Endpoint information of the remote server, such as IP address,
-     * port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - public boolean hasRemoteEndpoint() { - return remoteEndpoint_ != null; - } - /** - *
-     * (Optional) Endpoint information of the remote server, such as IP address,
-     * port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - public io.grpc.alts.internal.Handshaker.Endpoint getRemoteEndpoint() { - return remoteEndpoint_ == null ? io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance() : remoteEndpoint_; - } - /** - *
-     * (Optional) Endpoint information of the remote server, such as IP address,
-     * port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - public io.grpc.alts.internal.Handshaker.EndpointOrBuilder getRemoteEndpointOrBuilder() { - return getRemoteEndpoint(); - } - - public static final int TARGET_NAME_FIELD_NUMBER = 8; - private volatile java.lang.Object targetName_; - /** - *
-     * (Optional) If target name is provided, a secure naming check is performed
-     * to verify that the peer authenticated identity is indeed authorized to run
-     * the target name.
-     * 
- * - * string target_name = 8; - */ - public java.lang.String getTargetName() { - java.lang.Object ref = targetName_; - 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(); - targetName_ = s; - return s; - } - } - /** - *
-     * (Optional) If target name is provided, a secure naming check is performed
-     * to verify that the peer authenticated identity is indeed authorized to run
-     * the target name.
-     * 
- * - * string target_name = 8; - */ - public com.google.protobuf.ByteString - getTargetNameBytes() { - java.lang.Object ref = targetName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - targetName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RPC_VERSIONS_FIELD_NUMBER = 9; - private io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions rpcVersions_; - /** - *
-     * (Optional) RPC protocol versions supported by the client.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - public boolean hasRpcVersions() { - return rpcVersions_ != null; - } - /** - *
-     * (Optional) RPC protocol versions supported by the client.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getRpcVersions() { - return rpcVersions_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : rpcVersions_; - } - /** - *
-     * (Optional) RPC protocol versions supported by the client.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder() { - return getRpcVersions(); - } - - 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 (handshakeSecurityProtocol_ != io.grpc.alts.internal.Handshaker.HandshakeProtocol.HANDSHAKE_PROTOCOL_UNSPECIFIED.getNumber()) { - output.writeEnum(1, handshakeSecurityProtocol_); - } - for (int i = 0; i < applicationProtocols_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, applicationProtocols_.getRaw(i)); - } - for (int i = 0; i < recordProtocols_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, recordProtocols_.getRaw(i)); - } - for (int i = 0; i < targetIdentities_.size(); i++) { - output.writeMessage(4, targetIdentities_.get(i)); - } - if (localIdentity_ != null) { - output.writeMessage(5, getLocalIdentity()); - } - if (localEndpoint_ != null) { - output.writeMessage(6, getLocalEndpoint()); - } - if (remoteEndpoint_ != null) { - output.writeMessage(7, getRemoteEndpoint()); - } - if (!getTargetNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, targetName_); - } - if (rpcVersions_ != null) { - output.writeMessage(9, getRpcVersions()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (handshakeSecurityProtocol_ != io.grpc.alts.internal.Handshaker.HandshakeProtocol.HANDSHAKE_PROTOCOL_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, handshakeSecurityProtocol_); - } - { - int dataSize = 0; - for (int i = 0; i < applicationProtocols_.size(); i++) { - dataSize += computeStringSizeNoTag(applicationProtocols_.getRaw(i)); - } - size += dataSize; - size += 1 * getApplicationProtocolsList().size(); - } - { - 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 < targetIdentities_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, targetIdentities_.get(i)); - } - if (localIdentity_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getLocalIdentity()); - } - if (localEndpoint_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getLocalEndpoint()); - } - if (remoteEndpoint_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getRemoteEndpoint()); - } - if (!getTargetNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, targetName_); - } - if (rpcVersions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getRpcVersions()); - } - 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.Handshaker.StartClientHandshakeReq)) { - return super.equals(obj); - } - io.grpc.alts.internal.Handshaker.StartClientHandshakeReq other = (io.grpc.alts.internal.Handshaker.StartClientHandshakeReq) obj; - - boolean result = true; - result = result && handshakeSecurityProtocol_ == other.handshakeSecurityProtocol_; - result = result && getApplicationProtocolsList() - .equals(other.getApplicationProtocolsList()); - result = result && getRecordProtocolsList() - .equals(other.getRecordProtocolsList()); - result = result && getTargetIdentitiesList() - .equals(other.getTargetIdentitiesList()); - result = result && (hasLocalIdentity() == other.hasLocalIdentity()); - if (hasLocalIdentity()) { - result = result && getLocalIdentity() - .equals(other.getLocalIdentity()); - } - result = result && (hasLocalEndpoint() == other.hasLocalEndpoint()); - if (hasLocalEndpoint()) { - result = result && getLocalEndpoint() - .equals(other.getLocalEndpoint()); - } - result = result && (hasRemoteEndpoint() == other.hasRemoteEndpoint()); - if (hasRemoteEndpoint()) { - result = result && getRemoteEndpoint() - .equals(other.getRemoteEndpoint()); - } - result = result && getTargetName() - .equals(other.getTargetName()); - result = result && (hasRpcVersions() == other.hasRpcVersions()); - if (hasRpcVersions()) { - result = result && getRpcVersions() - .equals(other.getRpcVersions()); - } - 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) + HANDSHAKE_SECURITY_PROTOCOL_FIELD_NUMBER; - hash = (53 * hash) + handshakeSecurityProtocol_; - if (getApplicationProtocolsCount() > 0) { - hash = (37 * hash) + APPLICATION_PROTOCOLS_FIELD_NUMBER; - hash = (53 * hash) + getApplicationProtocolsList().hashCode(); - } - if (getRecordProtocolsCount() > 0) { - hash = (37 * hash) + RECORD_PROTOCOLS_FIELD_NUMBER; - hash = (53 * hash) + getRecordProtocolsList().hashCode(); - } - if (getTargetIdentitiesCount() > 0) { - hash = (37 * hash) + TARGET_IDENTITIES_FIELD_NUMBER; - hash = (53 * hash) + getTargetIdentitiesList().hashCode(); - } - if (hasLocalIdentity()) { - hash = (37 * hash) + LOCAL_IDENTITY_FIELD_NUMBER; - hash = (53 * hash) + getLocalIdentity().hashCode(); - } - if (hasLocalEndpoint()) { - hash = (37 * hash) + LOCAL_ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getLocalEndpoint().hashCode(); - } - if (hasRemoteEndpoint()) { - hash = (37 * hash) + REMOTE_ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getRemoteEndpoint().hashCode(); - } - hash = (37 * hash) + TARGET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getTargetName().hashCode(); - if (hasRpcVersions()) { - hash = (37 * hash) + RPC_VERSIONS_FIELD_NUMBER; - hash = (53 * hash) + getRpcVersions().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grpc.alts.internal.Handshaker.StartClientHandshakeReq parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.StartClientHandshakeReq 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.Handshaker.StartClientHandshakeReq parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.StartClientHandshakeReq 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.Handshaker.StartClientHandshakeReq parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.StartClientHandshakeReq parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grpc.alts.internal.Handshaker.StartClientHandshakeReq parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.StartClientHandshakeReq 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.Handshaker.StartClientHandshakeReq parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.StartClientHandshakeReq 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.Handshaker.StartClientHandshakeReq parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.StartClientHandshakeReq 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.Handshaker.StartClientHandshakeReq 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.StartClientHandshakeReq} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.StartClientHandshakeReq) - io.grpc.alts.internal.Handshaker.StartClientHandshakeReqOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_StartClientHandshakeReq_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_StartClientHandshakeReq_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.class, io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.Builder.class); - } - - // Construct using io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getTargetIdentitiesFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - handshakeSecurityProtocol_ = 0; - - applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - if (targetIdentitiesBuilder_ == null) { - targetIdentities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - targetIdentitiesBuilder_.clear(); - } - if (localIdentityBuilder_ == null) { - localIdentity_ = null; - } else { - localIdentity_ = null; - localIdentityBuilder_ = null; - } - if (localEndpointBuilder_ == null) { - localEndpoint_ = null; - } else { - localEndpoint_ = null; - localEndpointBuilder_ = null; - } - if (remoteEndpointBuilder_ == null) { - remoteEndpoint_ = null; - } else { - remoteEndpoint_ = null; - remoteEndpointBuilder_ = null; - } - targetName_ = ""; - - if (rpcVersionsBuilder_ == null) { - rpcVersions_ = null; - } else { - rpcVersions_ = null; - rpcVersionsBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_StartClientHandshakeReq_descriptor; - } - - public io.grpc.alts.internal.Handshaker.StartClientHandshakeReq getDefaultInstanceForType() { - return io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.getDefaultInstance(); - } - - public io.grpc.alts.internal.Handshaker.StartClientHandshakeReq build() { - io.grpc.alts.internal.Handshaker.StartClientHandshakeReq result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.Handshaker.StartClientHandshakeReq buildPartial() { - io.grpc.alts.internal.Handshaker.StartClientHandshakeReq result = new io.grpc.alts.internal.Handshaker.StartClientHandshakeReq(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.handshakeSecurityProtocol_ = handshakeSecurityProtocol_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - applicationProtocols_ = applicationProtocols_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.applicationProtocols_ = applicationProtocols_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - recordProtocols_ = recordProtocols_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.recordProtocols_ = recordProtocols_; - if (targetIdentitiesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - targetIdentities_ = java.util.Collections.unmodifiableList(targetIdentities_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.targetIdentities_ = targetIdentities_; - } else { - result.targetIdentities_ = targetIdentitiesBuilder_.build(); - } - if (localIdentityBuilder_ == null) { - result.localIdentity_ = localIdentity_; - } else { - result.localIdentity_ = localIdentityBuilder_.build(); - } - if (localEndpointBuilder_ == null) { - result.localEndpoint_ = localEndpoint_; - } else { - result.localEndpoint_ = localEndpointBuilder_.build(); - } - if (remoteEndpointBuilder_ == null) { - result.remoteEndpoint_ = remoteEndpoint_; - } else { - result.remoteEndpoint_ = remoteEndpointBuilder_.build(); - } - result.targetName_ = targetName_; - if (rpcVersionsBuilder_ == null) { - result.rpcVersions_ = rpcVersions_; - } else { - result.rpcVersions_ = rpcVersionsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - 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.Handshaker.StartClientHandshakeReq) { - return mergeFrom((io.grpc.alts.internal.Handshaker.StartClientHandshakeReq)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.Handshaker.StartClientHandshakeReq other) { - if (other == io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.getDefaultInstance()) return this; - if (other.handshakeSecurityProtocol_ != 0) { - setHandshakeSecurityProtocolValue(other.getHandshakeSecurityProtocolValue()); - } - if (!other.applicationProtocols_.isEmpty()) { - if (applicationProtocols_.isEmpty()) { - applicationProtocols_ = other.applicationProtocols_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureApplicationProtocolsIsMutable(); - applicationProtocols_.addAll(other.applicationProtocols_); - } - onChanged(); - } - if (!other.recordProtocols_.isEmpty()) { - if (recordProtocols_.isEmpty()) { - recordProtocols_ = other.recordProtocols_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureRecordProtocolsIsMutable(); - recordProtocols_.addAll(other.recordProtocols_); - } - onChanged(); - } - if (targetIdentitiesBuilder_ == null) { - if (!other.targetIdentities_.isEmpty()) { - if (targetIdentities_.isEmpty()) { - targetIdentities_ = other.targetIdentities_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureTargetIdentitiesIsMutable(); - targetIdentities_.addAll(other.targetIdentities_); - } - onChanged(); - } - } else { - if (!other.targetIdentities_.isEmpty()) { - if (targetIdentitiesBuilder_.isEmpty()) { - targetIdentitiesBuilder_.dispose(); - targetIdentitiesBuilder_ = null; - targetIdentities_ = other.targetIdentities_; - bitField0_ = (bitField0_ & ~0x00000008); - targetIdentitiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTargetIdentitiesFieldBuilder() : null; - } else { - targetIdentitiesBuilder_.addAllMessages(other.targetIdentities_); - } - } - } - if (other.hasLocalIdentity()) { - mergeLocalIdentity(other.getLocalIdentity()); - } - if (other.hasLocalEndpoint()) { - mergeLocalEndpoint(other.getLocalEndpoint()); - } - if (other.hasRemoteEndpoint()) { - mergeRemoteEndpoint(other.getRemoteEndpoint()); - } - if (!other.getTargetName().isEmpty()) { - targetName_ = other.targetName_; - onChanged(); - } - if (other.hasRpcVersions()) { - mergeRpcVersions(other.getRpcVersions()); - } - 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.Handshaker.StartClientHandshakeReq parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.Handshaker.StartClientHandshakeReq) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int handshakeSecurityProtocol_ = 0; - /** - *
-       * Handshake security protocol requested by the client.
-       * 
- * - * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; - */ - public int getHandshakeSecurityProtocolValue() { - return handshakeSecurityProtocol_; - } - /** - *
-       * Handshake security protocol requested by the client.
-       * 
- * - * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; - */ - public Builder setHandshakeSecurityProtocolValue(int value) { - handshakeSecurityProtocol_ = value; - onChanged(); - return this; - } - /** - *
-       * Handshake security protocol requested by the client.
-       * 
- * - * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; - */ - public io.grpc.alts.internal.Handshaker.HandshakeProtocol getHandshakeSecurityProtocol() { - io.grpc.alts.internal.Handshaker.HandshakeProtocol result = io.grpc.alts.internal.Handshaker.HandshakeProtocol.valueOf(handshakeSecurityProtocol_); - return result == null ? io.grpc.alts.internal.Handshaker.HandshakeProtocol.UNRECOGNIZED : result; - } - /** - *
-       * Handshake security protocol requested by the client.
-       * 
- * - * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; - */ - public Builder setHandshakeSecurityProtocol(io.grpc.alts.internal.Handshaker.HandshakeProtocol value) { - if (value == null) { - throw new NullPointerException(); - } - - handshakeSecurityProtocol_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Handshake security protocol requested by the client.
-       * 
- * - * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; - */ - public Builder clearHandshakeSecurityProtocol() { - - handshakeSecurityProtocol_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureApplicationProtocolsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - applicationProtocols_ = new com.google.protobuf.LazyStringArrayList(applicationProtocols_); - bitField0_ |= 0x00000002; - } - } - /** - *
-       * The application protocols supported by the client, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 2; - */ - public com.google.protobuf.ProtocolStringList - getApplicationProtocolsList() { - return applicationProtocols_.getUnmodifiableView(); - } - /** - *
-       * The application protocols supported by the client, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 2; - */ - public int getApplicationProtocolsCount() { - return applicationProtocols_.size(); - } - /** - *
-       * The application protocols supported by the client, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 2; - */ - public java.lang.String getApplicationProtocols(int index) { - return applicationProtocols_.get(index); - } - /** - *
-       * The application protocols supported by the client, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 2; - */ - public com.google.protobuf.ByteString - getApplicationProtocolsBytes(int index) { - return applicationProtocols_.getByteString(index); - } - /** - *
-       * The application protocols supported by the client, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 2; - */ - public Builder setApplicationProtocols( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureApplicationProtocolsIsMutable(); - applicationProtocols_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * The application protocols supported by the client, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 2; - */ - public Builder addApplicationProtocols( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureApplicationProtocolsIsMutable(); - applicationProtocols_.add(value); - onChanged(); - return this; - } - /** - *
-       * The application protocols supported by the client, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 2; - */ - public Builder addAllApplicationProtocols( - java.lang.Iterable values) { - ensureApplicationProtocolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, applicationProtocols_); - onChanged(); - return this; - } - /** - *
-       * The application protocols supported by the client, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 2; - */ - public Builder clearApplicationProtocols() { - applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * The application protocols supported by the client, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 2; - */ - public Builder addApplicationProtocolsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureApplicationProtocolsIsMutable(); - applicationProtocols_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRecordProtocolsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - recordProtocols_ = new com.google.protobuf.LazyStringArrayList(recordProtocols_); - bitField0_ |= 0x00000004; - } - } - /** - *
-       * The record protocols supported by the client, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 3; - */ - public com.google.protobuf.ProtocolStringList - getRecordProtocolsList() { - return recordProtocols_.getUnmodifiableView(); - } - /** - *
-       * The record protocols supported by the client, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 3; - */ - public int getRecordProtocolsCount() { - return recordProtocols_.size(); - } - /** - *
-       * The record protocols supported by the client, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 3; - */ - public java.lang.String getRecordProtocols(int index) { - return recordProtocols_.get(index); - } - /** - *
-       * The record protocols supported by the client, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 3; - */ - public com.google.protobuf.ByteString - getRecordProtocolsBytes(int index) { - return recordProtocols_.getByteString(index); - } - /** - *
-       * The record protocols supported by the client, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 3; - */ - public Builder setRecordProtocols( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecordProtocolsIsMutable(); - recordProtocols_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * The record protocols supported by the client, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 3; - */ - public Builder addRecordProtocols( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecordProtocolsIsMutable(); - recordProtocols_.add(value); - onChanged(); - return this; - } - /** - *
-       * The record protocols supported by the client, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 3; - */ - public Builder addAllRecordProtocols( - java.lang.Iterable values) { - ensureRecordProtocolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, recordProtocols_); - onChanged(); - return this; - } - /** - *
-       * The record protocols supported by the client, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 3; - */ - public Builder clearRecordProtocols() { - recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-       * The record protocols supported by the client, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 3; - */ - 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 targetIdentities_ = - java.util.Collections.emptyList(); - private void ensureTargetIdentitiesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - targetIdentities_ = new java.util.ArrayList(targetIdentities_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder> targetIdentitiesBuilder_; - - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public java.util.List getTargetIdentitiesList() { - if (targetIdentitiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(targetIdentities_); - } else { - return targetIdentitiesBuilder_.getMessageList(); - } - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public int getTargetIdentitiesCount() { - if (targetIdentitiesBuilder_ == null) { - return targetIdentities_.size(); - } else { - return targetIdentitiesBuilder_.getCount(); - } - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public io.grpc.alts.internal.Handshaker.Identity getTargetIdentities(int index) { - if (targetIdentitiesBuilder_ == null) { - return targetIdentities_.get(index); - } else { - return targetIdentitiesBuilder_.getMessage(index); - } - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public Builder setTargetIdentities( - int index, io.grpc.alts.internal.Handshaker.Identity value) { - if (targetIdentitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTargetIdentitiesIsMutable(); - targetIdentities_.set(index, value); - onChanged(); - } else { - targetIdentitiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public Builder setTargetIdentities( - int index, io.grpc.alts.internal.Handshaker.Identity.Builder builderForValue) { - if (targetIdentitiesBuilder_ == null) { - ensureTargetIdentitiesIsMutable(); - targetIdentities_.set(index, builderForValue.build()); - onChanged(); - } else { - targetIdentitiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public Builder addTargetIdentities(io.grpc.alts.internal.Handshaker.Identity value) { - if (targetIdentitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTargetIdentitiesIsMutable(); - targetIdentities_.add(value); - onChanged(); - } else { - targetIdentitiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public Builder addTargetIdentities( - int index, io.grpc.alts.internal.Handshaker.Identity value) { - if (targetIdentitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTargetIdentitiesIsMutable(); - targetIdentities_.add(index, value); - onChanged(); - } else { - targetIdentitiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public Builder addTargetIdentities( - io.grpc.alts.internal.Handshaker.Identity.Builder builderForValue) { - if (targetIdentitiesBuilder_ == null) { - ensureTargetIdentitiesIsMutable(); - targetIdentities_.add(builderForValue.build()); - onChanged(); - } else { - targetIdentitiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public Builder addTargetIdentities( - int index, io.grpc.alts.internal.Handshaker.Identity.Builder builderForValue) { - if (targetIdentitiesBuilder_ == null) { - ensureTargetIdentitiesIsMutable(); - targetIdentities_.add(index, builderForValue.build()); - onChanged(); - } else { - targetIdentitiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public Builder addAllTargetIdentities( - java.lang.Iterable values) { - if (targetIdentitiesBuilder_ == null) { - ensureTargetIdentitiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, targetIdentities_); - onChanged(); - } else { - targetIdentitiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public Builder clearTargetIdentities() { - if (targetIdentitiesBuilder_ == null) { - targetIdentities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - targetIdentitiesBuilder_.clear(); - } - return this; - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public Builder removeTargetIdentities(int index) { - if (targetIdentitiesBuilder_ == null) { - ensureTargetIdentitiesIsMutable(); - targetIdentities_.remove(index); - onChanged(); - } else { - targetIdentitiesBuilder_.remove(index); - } - return this; - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public io.grpc.alts.internal.Handshaker.Identity.Builder getTargetIdentitiesBuilder( - int index) { - return getTargetIdentitiesFieldBuilder().getBuilder(index); - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public io.grpc.alts.internal.Handshaker.IdentityOrBuilder getTargetIdentitiesOrBuilder( - int index) { - if (targetIdentitiesBuilder_ == null) { - return targetIdentities_.get(index); } else { - return targetIdentitiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public java.util.List - getTargetIdentitiesOrBuilderList() { - if (targetIdentitiesBuilder_ != null) { - return targetIdentitiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(targetIdentities_); - } - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public io.grpc.alts.internal.Handshaker.Identity.Builder addTargetIdentitiesBuilder() { - return getTargetIdentitiesFieldBuilder().addBuilder( - io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance()); - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public io.grpc.alts.internal.Handshaker.Identity.Builder addTargetIdentitiesBuilder( - int index) { - return getTargetIdentitiesFieldBuilder().addBuilder( - index, io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance()); - } - /** - *
-       * (Optional) Describes which server identities are acceptable by the client.
-       * If target identities are provided and none of them matches the peer
-       * identity of the server, handshake will fail.
-       * 
- * - * repeated .grpc.gcp.Identity target_identities = 4; - */ - public java.util.List - getTargetIdentitiesBuilderList() { - return getTargetIdentitiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder> - getTargetIdentitiesFieldBuilder() { - if (targetIdentitiesBuilder_ == null) { - targetIdentitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder>( - targetIdentities_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); - targetIdentities_ = null; - } - return targetIdentitiesBuilder_; - } - - private io.grpc.alts.internal.Handshaker.Identity localIdentity_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder> localIdentityBuilder_; - /** - *
-       * (Optional) Application may specify a local identity. Otherwise, the
-       * handshaker chooses a default local identity.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public boolean hasLocalIdentity() { - return localIdentityBuilder_ != null || localIdentity_ != null; - } - /** - *
-       * (Optional) Application may specify a local identity. Otherwise, the
-       * handshaker chooses a default local identity.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public io.grpc.alts.internal.Handshaker.Identity getLocalIdentity() { - if (localIdentityBuilder_ == null) { - return localIdentity_ == null ? io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance() : localIdentity_; - } else { - return localIdentityBuilder_.getMessage(); - } - } - /** - *
-       * (Optional) Application may specify a local identity. Otherwise, the
-       * handshaker chooses a default local identity.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public Builder setLocalIdentity(io.grpc.alts.internal.Handshaker.Identity value) { - if (localIdentityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - localIdentity_ = value; - onChanged(); - } else { - localIdentityBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * (Optional) Application may specify a local identity. Otherwise, the
-       * handshaker chooses a default local identity.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public Builder setLocalIdentity( - io.grpc.alts.internal.Handshaker.Identity.Builder builderForValue) { - if (localIdentityBuilder_ == null) { - localIdentity_ = builderForValue.build(); - onChanged(); - } else { - localIdentityBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * (Optional) Application may specify a local identity. Otherwise, the
-       * handshaker chooses a default local identity.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public Builder mergeLocalIdentity(io.grpc.alts.internal.Handshaker.Identity value) { - if (localIdentityBuilder_ == null) { - if (localIdentity_ != null) { - localIdentity_ = - io.grpc.alts.internal.Handshaker.Identity.newBuilder(localIdentity_).mergeFrom(value).buildPartial(); - } else { - localIdentity_ = value; - } - onChanged(); - } else { - localIdentityBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * (Optional) Application may specify a local identity. Otherwise, the
-       * handshaker chooses a default local identity.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public Builder clearLocalIdentity() { - if (localIdentityBuilder_ == null) { - localIdentity_ = null; - onChanged(); - } else { - localIdentity_ = null; - localIdentityBuilder_ = null; - } - - return this; - } - /** - *
-       * (Optional) Application may specify a local identity. Otherwise, the
-       * handshaker chooses a default local identity.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public io.grpc.alts.internal.Handshaker.Identity.Builder getLocalIdentityBuilder() { - - onChanged(); - return getLocalIdentityFieldBuilder().getBuilder(); - } - /** - *
-       * (Optional) Application may specify a local identity. Otherwise, the
-       * handshaker chooses a default local identity.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public io.grpc.alts.internal.Handshaker.IdentityOrBuilder getLocalIdentityOrBuilder() { - if (localIdentityBuilder_ != null) { - return localIdentityBuilder_.getMessageOrBuilder(); - } else { - return localIdentity_ == null ? - io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance() : localIdentity_; - } - } - /** - *
-       * (Optional) Application may specify a local identity. Otherwise, the
-       * handshaker chooses a default local identity.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder> - getLocalIdentityFieldBuilder() { - if (localIdentityBuilder_ == null) { - localIdentityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder>( - getLocalIdentity(), - getParentForChildren(), - isClean()); - localIdentity_ = null; - } - return localIdentityBuilder_; - } - - private io.grpc.alts.internal.Handshaker.Endpoint localEndpoint_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Endpoint, io.grpc.alts.internal.Handshaker.Endpoint.Builder, io.grpc.alts.internal.Handshaker.EndpointOrBuilder> localEndpointBuilder_; - /** - *
-       * (Optional) Local endpoint information of the connection to the server,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - public boolean hasLocalEndpoint() { - return localEndpointBuilder_ != null || localEndpoint_ != null; - } - /** - *
-       * (Optional) Local endpoint information of the connection to the server,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - public io.grpc.alts.internal.Handshaker.Endpoint getLocalEndpoint() { - if (localEndpointBuilder_ == null) { - return localEndpoint_ == null ? io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance() : localEndpoint_; - } else { - return localEndpointBuilder_.getMessage(); - } - } - /** - *
-       * (Optional) Local endpoint information of the connection to the server,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - public Builder setLocalEndpoint(io.grpc.alts.internal.Handshaker.Endpoint value) { - if (localEndpointBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - localEndpoint_ = value; - onChanged(); - } else { - localEndpointBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * (Optional) Local endpoint information of the connection to the server,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - public Builder setLocalEndpoint( - io.grpc.alts.internal.Handshaker.Endpoint.Builder builderForValue) { - if (localEndpointBuilder_ == null) { - localEndpoint_ = builderForValue.build(); - onChanged(); - } else { - localEndpointBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * (Optional) Local endpoint information of the connection to the server,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - public Builder mergeLocalEndpoint(io.grpc.alts.internal.Handshaker.Endpoint value) { - if (localEndpointBuilder_ == null) { - if (localEndpoint_ != null) { - localEndpoint_ = - io.grpc.alts.internal.Handshaker.Endpoint.newBuilder(localEndpoint_).mergeFrom(value).buildPartial(); - } else { - localEndpoint_ = value; - } - onChanged(); - } else { - localEndpointBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * (Optional) Local endpoint information of the connection to the server,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - public Builder clearLocalEndpoint() { - if (localEndpointBuilder_ == null) { - localEndpoint_ = null; - onChanged(); - } else { - localEndpoint_ = null; - localEndpointBuilder_ = null; - } - - return this; - } - /** - *
-       * (Optional) Local endpoint information of the connection to the server,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - public io.grpc.alts.internal.Handshaker.Endpoint.Builder getLocalEndpointBuilder() { - - onChanged(); - return getLocalEndpointFieldBuilder().getBuilder(); - } - /** - *
-       * (Optional) Local endpoint information of the connection to the server,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - public io.grpc.alts.internal.Handshaker.EndpointOrBuilder getLocalEndpointOrBuilder() { - if (localEndpointBuilder_ != null) { - return localEndpointBuilder_.getMessageOrBuilder(); - } else { - return localEndpoint_ == null ? - io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance() : localEndpoint_; - } - } - /** - *
-       * (Optional) Local endpoint information of the connection to the server,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Endpoint, io.grpc.alts.internal.Handshaker.Endpoint.Builder, io.grpc.alts.internal.Handshaker.EndpointOrBuilder> - getLocalEndpointFieldBuilder() { - if (localEndpointBuilder_ == null) { - localEndpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Endpoint, io.grpc.alts.internal.Handshaker.Endpoint.Builder, io.grpc.alts.internal.Handshaker.EndpointOrBuilder>( - getLocalEndpoint(), - getParentForChildren(), - isClean()); - localEndpoint_ = null; - } - return localEndpointBuilder_; - } - - private io.grpc.alts.internal.Handshaker.Endpoint remoteEndpoint_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Endpoint, io.grpc.alts.internal.Handshaker.Endpoint.Builder, io.grpc.alts.internal.Handshaker.EndpointOrBuilder> remoteEndpointBuilder_; - /** - *
-       * (Optional) Endpoint information of the remote server, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - public boolean hasRemoteEndpoint() { - return remoteEndpointBuilder_ != null || remoteEndpoint_ != null; - } - /** - *
-       * (Optional) Endpoint information of the remote server, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - public io.grpc.alts.internal.Handshaker.Endpoint getRemoteEndpoint() { - if (remoteEndpointBuilder_ == null) { - return remoteEndpoint_ == null ? io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance() : remoteEndpoint_; - } else { - return remoteEndpointBuilder_.getMessage(); - } - } - /** - *
-       * (Optional) Endpoint information of the remote server, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - public Builder setRemoteEndpoint(io.grpc.alts.internal.Handshaker.Endpoint value) { - if (remoteEndpointBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - remoteEndpoint_ = value; - onChanged(); - } else { - remoteEndpointBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * (Optional) Endpoint information of the remote server, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - public Builder setRemoteEndpoint( - io.grpc.alts.internal.Handshaker.Endpoint.Builder builderForValue) { - if (remoteEndpointBuilder_ == null) { - remoteEndpoint_ = builderForValue.build(); - onChanged(); - } else { - remoteEndpointBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * (Optional) Endpoint information of the remote server, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - public Builder mergeRemoteEndpoint(io.grpc.alts.internal.Handshaker.Endpoint value) { - if (remoteEndpointBuilder_ == null) { - if (remoteEndpoint_ != null) { - remoteEndpoint_ = - io.grpc.alts.internal.Handshaker.Endpoint.newBuilder(remoteEndpoint_).mergeFrom(value).buildPartial(); - } else { - remoteEndpoint_ = value; - } - onChanged(); - } else { - remoteEndpointBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * (Optional) Endpoint information of the remote server, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - public Builder clearRemoteEndpoint() { - if (remoteEndpointBuilder_ == null) { - remoteEndpoint_ = null; - onChanged(); - } else { - remoteEndpoint_ = null; - remoteEndpointBuilder_ = null; - } - - return this; - } - /** - *
-       * (Optional) Endpoint information of the remote server, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - public io.grpc.alts.internal.Handshaker.Endpoint.Builder getRemoteEndpointBuilder() { - - onChanged(); - return getRemoteEndpointFieldBuilder().getBuilder(); - } - /** - *
-       * (Optional) Endpoint information of the remote server, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - public io.grpc.alts.internal.Handshaker.EndpointOrBuilder getRemoteEndpointOrBuilder() { - if (remoteEndpointBuilder_ != null) { - return remoteEndpointBuilder_.getMessageOrBuilder(); - } else { - return remoteEndpoint_ == null ? - io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance() : remoteEndpoint_; - } - } - /** - *
-       * (Optional) Endpoint information of the remote server, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Endpoint, io.grpc.alts.internal.Handshaker.Endpoint.Builder, io.grpc.alts.internal.Handshaker.EndpointOrBuilder> - getRemoteEndpointFieldBuilder() { - if (remoteEndpointBuilder_ == null) { - remoteEndpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Endpoint, io.grpc.alts.internal.Handshaker.Endpoint.Builder, io.grpc.alts.internal.Handshaker.EndpointOrBuilder>( - getRemoteEndpoint(), - getParentForChildren(), - isClean()); - remoteEndpoint_ = null; - } - return remoteEndpointBuilder_; - } - - private java.lang.Object targetName_ = ""; - /** - *
-       * (Optional) If target name is provided, a secure naming check is performed
-       * to verify that the peer authenticated identity is indeed authorized to run
-       * the target name.
-       * 
- * - * string target_name = 8; - */ - public java.lang.String getTargetName() { - java.lang.Object ref = targetName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * (Optional) If target name is provided, a secure naming check is performed
-       * to verify that the peer authenticated identity is indeed authorized to run
-       * the target name.
-       * 
- * - * string target_name = 8; - */ - public com.google.protobuf.ByteString - getTargetNameBytes() { - java.lang.Object ref = targetName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - targetName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * (Optional) If target name is provided, a secure naming check is performed
-       * to verify that the peer authenticated identity is indeed authorized to run
-       * the target name.
-       * 
- * - * string target_name = 8; - */ - public Builder setTargetName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - targetName_ = value; - onChanged(); - return this; - } - /** - *
-       * (Optional) If target name is provided, a secure naming check is performed
-       * to verify that the peer authenticated identity is indeed authorized to run
-       * the target name.
-       * 
- * - * string target_name = 8; - */ - public Builder clearTargetName() { - - targetName_ = getDefaultInstance().getTargetName(); - onChanged(); - return this; - } - /** - *
-       * (Optional) If target name is provided, a secure naming check is performed
-       * to verify that the peer authenticated identity is indeed authorized to run
-       * the target name.
-       * 
- * - * string target_name = 8; - */ - public Builder setTargetNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - targetName_ = value; - onChanged(); - return this; - } - - private io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions rpcVersions_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder> rpcVersionsBuilder_; - /** - *
-       * (Optional) RPC protocol versions supported by the client.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - public boolean hasRpcVersions() { - return rpcVersionsBuilder_ != null || rpcVersions_ != null; - } - /** - *
-       * (Optional) RPC protocol versions supported by the client.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getRpcVersions() { - if (rpcVersionsBuilder_ == null) { - return rpcVersions_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : rpcVersions_; - } else { - return rpcVersionsBuilder_.getMessage(); - } - } - /** - *
-       * (Optional) RPC protocol versions supported by the client.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - public Builder setRpcVersions(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions value) { - if (rpcVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - rpcVersions_ = value; - onChanged(); - } else { - rpcVersionsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * (Optional) RPC protocol versions supported by the client.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - public Builder setRpcVersions( - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder builderForValue) { - if (rpcVersionsBuilder_ == null) { - rpcVersions_ = builderForValue.build(); - onChanged(); - } else { - rpcVersionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * (Optional) RPC protocol versions supported by the client.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - public Builder mergeRpcVersions(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions value) { - if (rpcVersionsBuilder_ == null) { - if (rpcVersions_ != null) { - rpcVersions_ = - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.newBuilder(rpcVersions_).mergeFrom(value).buildPartial(); - } else { - rpcVersions_ = value; - } - onChanged(); - } else { - rpcVersionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * (Optional) RPC protocol versions supported by the client.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - public Builder clearRpcVersions() { - if (rpcVersionsBuilder_ == null) { - rpcVersions_ = null; - onChanged(); - } else { - rpcVersions_ = null; - rpcVersionsBuilder_ = null; - } - - return this; - } - /** - *
-       * (Optional) RPC protocol versions supported by the client.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder getRpcVersionsBuilder() { - - onChanged(); - return getRpcVersionsFieldBuilder().getBuilder(); - } - /** - *
-       * (Optional) RPC protocol versions supported by the client.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder() { - if (rpcVersionsBuilder_ != null) { - return rpcVersionsBuilder_.getMessageOrBuilder(); - } else { - return rpcVersions_ == null ? - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : rpcVersions_; - } - } - /** - *
-       * (Optional) RPC protocol versions supported by the client.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder> - getRpcVersionsFieldBuilder() { - if (rpcVersionsBuilder_ == null) { - rpcVersionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder>( - getRpcVersions(), - getParentForChildren(), - isClean()); - rpcVersions_ = null; - } - return rpcVersionsBuilder_; - } - 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.StartClientHandshakeReq) - } - - // @@protoc_insertion_point(class_scope:grpc.gcp.StartClientHandshakeReq) - private static final io.grpc.alts.internal.Handshaker.StartClientHandshakeReq DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.Handshaker.StartClientHandshakeReq(); - } - - public static io.grpc.alts.internal.Handshaker.StartClientHandshakeReq getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public StartClientHandshakeReq parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StartClientHandshakeReq(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.Handshaker.StartClientHandshakeReq getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ServerHandshakeParametersOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.ServerHandshakeParameters) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The record protocols supported by the server, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 1; - */ - java.util.List - getRecordProtocolsList(); - /** - *
-     * The record protocols supported by the server, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 1; - */ - int getRecordProtocolsCount(); - /** - *
-     * The record protocols supported by the server, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 1; - */ - java.lang.String getRecordProtocols(int index); - /** - *
-     * The record protocols supported by the server, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 1; - */ - com.google.protobuf.ByteString - getRecordProtocolsBytes(int index); - - /** - *
-     * (Optional) A list of local identities supported by the server, if
-     * specified. Otherwise, the handshaker chooses a default local identity.
-     * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - java.util.List - getLocalIdentitiesList(); - /** - *
-     * (Optional) A list of local identities supported by the server, if
-     * specified. Otherwise, the handshaker chooses a default local identity.
-     * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - io.grpc.alts.internal.Handshaker.Identity getLocalIdentities(int index); - /** - *
-     * (Optional) A list of local identities supported by the server, if
-     * specified. Otherwise, the handshaker chooses a default local identity.
-     * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - int getLocalIdentitiesCount(); - /** - *
-     * (Optional) A list of local identities supported by the server, if
-     * specified. Otherwise, the handshaker chooses a default local identity.
-     * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - java.util.List - getLocalIdentitiesOrBuilderList(); - /** - *
-     * (Optional) A list of local identities supported by the server, if
-     * specified. Otherwise, the handshaker chooses a default local identity.
-     * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - io.grpc.alts.internal.Handshaker.IdentityOrBuilder getLocalIdentitiesOrBuilder( - int index); - } - /** - * Protobuf type {@code grpc.gcp.ServerHandshakeParameters} - */ - public static 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(); - mutable_bitField0_ |= 0x00000002; - } - localIdentities_.add( - input.readMessage(io.grpc.alts.internal.Handshaker.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.Handshaker.internal_static_grpc_gcp_ServerHandshakeParameters_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_ServerHandshakeParameters_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.ServerHandshakeParameters.class, io.grpc.alts.internal.Handshaker.ServerHandshakeParameters.Builder.class); - } - - public static final int RECORD_PROTOCOLS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList recordProtocols_; - /** - *
-     * The record protocols supported by the server, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 1; - */ - public com.google.protobuf.ProtocolStringList - getRecordProtocolsList() { - return recordProtocols_; - } - /** - *
-     * The record protocols supported by the server, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 1; - */ - public int getRecordProtocolsCount() { - return recordProtocols_.size(); - } - /** - *
-     * The record protocols supported by the server, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 1; - */ - public java.lang.String getRecordProtocols(int index) { - return recordProtocols_.get(index); - } - /** - *
-     * The record protocols supported by the server, e.g.,
-     * "ALTSRP_GCM_AES128".
-     * 
- * - * repeated string record_protocols = 1; - */ - 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 localIdentities_; - /** - *
-     * (Optional) A list of local identities supported by the server, if
-     * specified. Otherwise, the handshaker chooses a default local identity.
-     * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public java.util.List getLocalIdentitiesList() { - return localIdentities_; - } - /** - *
-     * (Optional) A list of local identities supported by the server, if
-     * specified. Otherwise, the handshaker chooses a default local identity.
-     * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public java.util.List - getLocalIdentitiesOrBuilderList() { - return localIdentities_; - } - /** - *
-     * (Optional) A list of local identities supported by the server, if
-     * specified. Otherwise, the handshaker chooses a default local identity.
-     * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public int getLocalIdentitiesCount() { - return localIdentities_.size(); - } - /** - *
-     * (Optional) A list of local identities supported by the server, if
-     * specified. Otherwise, the handshaker chooses a default local identity.
-     * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public io.grpc.alts.internal.Handshaker.Identity getLocalIdentities(int index) { - return localIdentities_.get(index); - } - /** - *
-     * (Optional) A list of local identities supported by the server, if
-     * specified. Otherwise, the handshaker chooses a default local identity.
-     * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public io.grpc.alts.internal.Handshaker.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.Handshaker.ServerHandshakeParameters)) { - return super.equals(obj); - } - io.grpc.alts.internal.Handshaker.ServerHandshakeParameters other = (io.grpc.alts.internal.Handshaker.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.Handshaker.ServerHandshakeParameters parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.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.Handshaker.ServerHandshakeParameters parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.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.Handshaker.ServerHandshakeParameters parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.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.Handshaker.ServerHandshakeParameters parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.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.Handshaker.ServerHandshakeParameters parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.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.Handshaker.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.Handshaker.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.Handshaker.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 implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.ServerHandshakeParameters) - io.grpc.alts.internal.Handshaker.ServerHandshakeParametersOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_ServerHandshakeParameters_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_ServerHandshakeParameters_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.ServerHandshakeParameters.class, io.grpc.alts.internal.Handshaker.ServerHandshakeParameters.Builder.class); - } - - // Construct using io.grpc.alts.internal.Handshaker.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.Handshaker.internal_static_grpc_gcp_ServerHandshakeParameters_descriptor; - } - - public io.grpc.alts.internal.Handshaker.ServerHandshakeParameters getDefaultInstanceForType() { - return io.grpc.alts.internal.Handshaker.ServerHandshakeParameters.getDefaultInstance(); - } - - public io.grpc.alts.internal.Handshaker.ServerHandshakeParameters build() { - io.grpc.alts.internal.Handshaker.ServerHandshakeParameters result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.Handshaker.ServerHandshakeParameters buildPartial() { - io.grpc.alts.internal.Handshaker.ServerHandshakeParameters result = new io.grpc.alts.internal.Handshaker.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.Handshaker.ServerHandshakeParameters) { - return mergeFrom((io.grpc.alts.internal.Handshaker.ServerHandshakeParameters)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.Handshaker.ServerHandshakeParameters other) { - if (other == io.grpc.alts.internal.Handshaker.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.Handshaker.ServerHandshakeParameters parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.Handshaker.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; - } - } - /** - *
-       * The record protocols supported by the server, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 1; - */ - public com.google.protobuf.ProtocolStringList - getRecordProtocolsList() { - return recordProtocols_.getUnmodifiableView(); - } - /** - *
-       * The record protocols supported by the server, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 1; - */ - public int getRecordProtocolsCount() { - return recordProtocols_.size(); - } - /** - *
-       * The record protocols supported by the server, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 1; - */ - public java.lang.String getRecordProtocols(int index) { - return recordProtocols_.get(index); - } - /** - *
-       * The record protocols supported by the server, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 1; - */ - public com.google.protobuf.ByteString - getRecordProtocolsBytes(int index) { - return recordProtocols_.getByteString(index); - } - /** - *
-       * The record protocols supported by the server, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 1; - */ - public Builder setRecordProtocols( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecordProtocolsIsMutable(); - recordProtocols_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * The record protocols supported by the server, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 1; - */ - public Builder addRecordProtocols( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecordProtocolsIsMutable(); - recordProtocols_.add(value); - onChanged(); - return this; - } - /** - *
-       * The record protocols supported by the server, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 1; - */ - public Builder addAllRecordProtocols( - java.lang.Iterable values) { - ensureRecordProtocolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, recordProtocols_); - onChanged(); - return this; - } - /** - *
-       * The record protocols supported by the server, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 1; - */ - public Builder clearRecordProtocols() { - recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * The record protocols supported by the server, e.g.,
-       * "ALTSRP_GCM_AES128".
-       * 
- * - * repeated string record_protocols = 1; - */ - 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 localIdentities_ = - java.util.Collections.emptyList(); - private void ensureLocalIdentitiesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - localIdentities_ = new java.util.ArrayList(localIdentities_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder> localIdentitiesBuilder_; - - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public java.util.List getLocalIdentitiesList() { - if (localIdentitiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(localIdentities_); - } else { - return localIdentitiesBuilder_.getMessageList(); - } - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public int getLocalIdentitiesCount() { - if (localIdentitiesBuilder_ == null) { - return localIdentities_.size(); - } else { - return localIdentitiesBuilder_.getCount(); - } - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public io.grpc.alts.internal.Handshaker.Identity getLocalIdentities(int index) { - if (localIdentitiesBuilder_ == null) { - return localIdentities_.get(index); - } else { - return localIdentitiesBuilder_.getMessage(index); - } - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public Builder setLocalIdentities( - int index, io.grpc.alts.internal.Handshaker.Identity value) { - if (localIdentitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalIdentitiesIsMutable(); - localIdentities_.set(index, value); - onChanged(); - } else { - localIdentitiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public Builder setLocalIdentities( - int index, io.grpc.alts.internal.Handshaker.Identity.Builder builderForValue) { - if (localIdentitiesBuilder_ == null) { - ensureLocalIdentitiesIsMutable(); - localIdentities_.set(index, builderForValue.build()); - onChanged(); - } else { - localIdentitiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public Builder addLocalIdentities(io.grpc.alts.internal.Handshaker.Identity value) { - if (localIdentitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalIdentitiesIsMutable(); - localIdentities_.add(value); - onChanged(); - } else { - localIdentitiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public Builder addLocalIdentities( - int index, io.grpc.alts.internal.Handshaker.Identity value) { - if (localIdentitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalIdentitiesIsMutable(); - localIdentities_.add(index, value); - onChanged(); - } else { - localIdentitiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public Builder addLocalIdentities( - io.grpc.alts.internal.Handshaker.Identity.Builder builderForValue) { - if (localIdentitiesBuilder_ == null) { - ensureLocalIdentitiesIsMutable(); - localIdentities_.add(builderForValue.build()); - onChanged(); - } else { - localIdentitiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public Builder addLocalIdentities( - int index, io.grpc.alts.internal.Handshaker.Identity.Builder builderForValue) { - if (localIdentitiesBuilder_ == null) { - ensureLocalIdentitiesIsMutable(); - localIdentities_.add(index, builderForValue.build()); - onChanged(); - } else { - localIdentitiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public Builder addAllLocalIdentities( - java.lang.Iterable values) { - if (localIdentitiesBuilder_ == null) { - ensureLocalIdentitiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, localIdentities_); - onChanged(); - } else { - localIdentitiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public Builder clearLocalIdentities() { - if (localIdentitiesBuilder_ == null) { - localIdentities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - localIdentitiesBuilder_.clear(); - } - return this; - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public Builder removeLocalIdentities(int index) { - if (localIdentitiesBuilder_ == null) { - ensureLocalIdentitiesIsMutable(); - localIdentities_.remove(index); - onChanged(); - } else { - localIdentitiesBuilder_.remove(index); - } - return this; - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public io.grpc.alts.internal.Handshaker.Identity.Builder getLocalIdentitiesBuilder( - int index) { - return getLocalIdentitiesFieldBuilder().getBuilder(index); - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public io.grpc.alts.internal.Handshaker.IdentityOrBuilder getLocalIdentitiesOrBuilder( - int index) { - if (localIdentitiesBuilder_ == null) { - return localIdentities_.get(index); } else { - return localIdentitiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public java.util.List - getLocalIdentitiesOrBuilderList() { - if (localIdentitiesBuilder_ != null) { - return localIdentitiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(localIdentities_); - } - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public io.grpc.alts.internal.Handshaker.Identity.Builder addLocalIdentitiesBuilder() { - return getLocalIdentitiesFieldBuilder().addBuilder( - io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance()); - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public io.grpc.alts.internal.Handshaker.Identity.Builder addLocalIdentitiesBuilder( - int index) { - return getLocalIdentitiesFieldBuilder().addBuilder( - index, io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance()); - } - /** - *
-       * (Optional) A list of local identities supported by the server, if
-       * specified. Otherwise, the handshaker chooses a default local identity.
-       * 
- * - * repeated .grpc.gcp.Identity local_identities = 2; - */ - public java.util.List - getLocalIdentitiesBuilderList() { - return getLocalIdentitiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder> - getLocalIdentitiesFieldBuilder() { - if (localIdentitiesBuilder_ == null) { - localIdentitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.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.Handshaker.ServerHandshakeParameters DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.Handshaker.ServerHandshakeParameters(); - } - - public static io.grpc.alts.internal.Handshaker.ServerHandshakeParameters getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - 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 parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.Handshaker.ServerHandshakeParameters getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface StartServerHandshakeReqOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.StartServerHandshakeReq) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The application protocols supported by the server, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 1; - */ - java.util.List - getApplicationProtocolsList(); - /** - *
-     * The application protocols supported by the server, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 1; - */ - int getApplicationProtocolsCount(); - /** - *
-     * The application protocols supported by the server, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 1; - */ - java.lang.String getApplicationProtocols(int index); - /** - *
-     * The application protocols supported by the server, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 1; - */ - com.google.protobuf.ByteString - getApplicationProtocolsBytes(int index); - - /** - *
-     * Handshake parameters (record protocols and local identities supported by
-     * the server) mapped by the handshake protocol. Each handshake security
-     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-     * identities. Since protobuf does not support enum as key to the map, the key
-     * to handshake_parameters is the integer value of HandshakeProtocol enum.
-     * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - int getHandshakeParametersCount(); - /** - *
-     * Handshake parameters (record protocols and local identities supported by
-     * the server) mapped by the handshake protocol. Each handshake security
-     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-     * identities. Since protobuf does not support enum as key to the map, the key
-     * to handshake_parameters is the integer value of HandshakeProtocol enum.
-     * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - boolean containsHandshakeParameters( - int key); - /** - * Use {@link #getHandshakeParametersMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getHandshakeParameters(); - /** - *
-     * Handshake parameters (record protocols and local identities supported by
-     * the server) mapped by the handshake protocol. Each handshake security
-     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-     * identities. Since protobuf does not support enum as key to the map, the key
-     * to handshake_parameters is the integer value of HandshakeProtocol enum.
-     * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - java.util.Map - getHandshakeParametersMap(); - /** - *
-     * Handshake parameters (record protocols and local identities supported by
-     * the server) mapped by the handshake protocol. Each handshake security
-     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-     * identities. Since protobuf does not support enum as key to the map, the key
-     * to handshake_parameters is the integer value of HandshakeProtocol enum.
-     * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - - io.grpc.alts.internal.Handshaker.ServerHandshakeParameters getHandshakeParametersOrDefault( - int key, - io.grpc.alts.internal.Handshaker.ServerHandshakeParameters defaultValue); - /** - *
-     * Handshake parameters (record protocols and local identities supported by
-     * the server) mapped by the handshake protocol. Each handshake security
-     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-     * identities. Since protobuf does not support enum as key to the map, the key
-     * to handshake_parameters is the integer value of HandshakeProtocol enum.
-     * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - - io.grpc.alts.internal.Handshaker.ServerHandshakeParameters getHandshakeParametersOrThrow( - int key); - - /** - *
-     * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
-     * that the peer's out_frames are split into multiple HandshakReq messages.
-     * 
- * - * bytes in_bytes = 3; - */ - com.google.protobuf.ByteString getInBytes(); - - /** - *
-     * (Optional) Local endpoint information of the connection to the client,
-     * such as local IP address, port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - boolean hasLocalEndpoint(); - /** - *
-     * (Optional) Local endpoint information of the connection to the client,
-     * such as local IP address, port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - io.grpc.alts.internal.Handshaker.Endpoint getLocalEndpoint(); - /** - *
-     * (Optional) Local endpoint information of the connection to the client,
-     * such as local IP address, port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - io.grpc.alts.internal.Handshaker.EndpointOrBuilder getLocalEndpointOrBuilder(); - - /** - *
-     * (Optional) Endpoint information of the remote client, such as IP address,
-     * port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - boolean hasRemoteEndpoint(); - /** - *
-     * (Optional) Endpoint information of the remote client, such as IP address,
-     * port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - io.grpc.alts.internal.Handshaker.Endpoint getRemoteEndpoint(); - /** - *
-     * (Optional) Endpoint information of the remote client, such as IP address,
-     * port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - io.grpc.alts.internal.Handshaker.EndpointOrBuilder getRemoteEndpointOrBuilder(); - - /** - *
-     * (Optional) RPC protocol versions supported by the server.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - boolean hasRpcVersions(); - /** - *
-     * (Optional) RPC protocol versions supported by the server.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getRpcVersions(); - /** - *
-     * (Optional) RPC protocol versions supported by the server.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder(); - } - /** - * Protobuf type {@code grpc.gcp.StartServerHandshakeReq} - */ - public static final class StartServerHandshakeReq extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gcp.StartServerHandshakeReq) - StartServerHandshakeReqOrBuilder { - private static final long serialVersionUID = 0L; - // Use StartServerHandshakeReq.newBuilder() to construct. - private StartServerHandshakeReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private StartServerHandshakeReq() { - applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - inBytes_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StartServerHandshakeReq( - 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)) { - applicationProtocols_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - applicationProtocols_.add(s); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - handshakeParameters_ = com.google.protobuf.MapField.newMapField( - HandshakeParametersDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - handshakeParameters__ = input.readMessage( - HandshakeParametersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - handshakeParameters_.getMutableMap().put( - handshakeParameters__.getKey(), handshakeParameters__.getValue()); - break; - } - case 26: { - - inBytes_ = input.readBytes(); - break; - } - case 34: { - io.grpc.alts.internal.Handshaker.Endpoint.Builder subBuilder = null; - if (localEndpoint_ != null) { - subBuilder = localEndpoint_.toBuilder(); - } - localEndpoint_ = input.readMessage(io.grpc.alts.internal.Handshaker.Endpoint.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(localEndpoint_); - localEndpoint_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - io.grpc.alts.internal.Handshaker.Endpoint.Builder subBuilder = null; - if (remoteEndpoint_ != null) { - subBuilder = remoteEndpoint_.toBuilder(); - } - remoteEndpoint_ = input.readMessage(io.grpc.alts.internal.Handshaker.Endpoint.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(remoteEndpoint_); - remoteEndpoint_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder subBuilder = null; - if (rpcVersions_ != null) { - subBuilder = rpcVersions_.toBuilder(); - } - rpcVersions_ = input.readMessage(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rpcVersions_); - rpcVersions_ = 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 { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - applicationProtocols_ = applicationProtocols_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_StartServerHandshakeReq_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetHandshakeParameters(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_StartServerHandshakeReq_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.class, io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.Builder.class); - } - - private int bitField0_; - public static final int APPLICATION_PROTOCOLS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList applicationProtocols_; - /** - *
-     * The application protocols supported by the server, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 1; - */ - public com.google.protobuf.ProtocolStringList - getApplicationProtocolsList() { - return applicationProtocols_; - } - /** - *
-     * The application protocols supported by the server, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 1; - */ - public int getApplicationProtocolsCount() { - return applicationProtocols_.size(); - } - /** - *
-     * The application protocols supported by the server, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 1; - */ - public java.lang.String getApplicationProtocols(int index) { - return applicationProtocols_.get(index); - } - /** - *
-     * The application protocols supported by the server, e.g., "h2" (for http2),
-     * "grpc".
-     * 
- * - * repeated string application_protocols = 1; - */ - public com.google.protobuf.ByteString - getApplicationProtocolsBytes(int index) { - return applicationProtocols_.getByteString(index); - } - - public static final int HANDSHAKE_PARAMETERS_FIELD_NUMBER = 2; - private static final class HandshakeParametersDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, io.grpc.alts.internal.Handshaker.ServerHandshakeParameters> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.MESSAGE, - io.grpc.alts.internal.Handshaker.ServerHandshakeParameters.getDefaultInstance()); - } - private com.google.protobuf.MapField< - java.lang.Integer, io.grpc.alts.internal.Handshaker.ServerHandshakeParameters> handshakeParameters_; - private com.google.protobuf.MapField - internalGetHandshakeParameters() { - if (handshakeParameters_ == null) { - return com.google.protobuf.MapField.emptyMapField( - HandshakeParametersDefaultEntryHolder.defaultEntry); - } - return handshakeParameters_; - } - - public int getHandshakeParametersCount() { - return internalGetHandshakeParameters().getMap().size(); - } - /** - *
-     * Handshake parameters (record protocols and local identities supported by
-     * the server) mapped by the handshake protocol. Each handshake security
-     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-     * identities. Since protobuf does not support enum as key to the map, the key
-     * to handshake_parameters is the integer value of HandshakeProtocol enum.
-     * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - - public boolean containsHandshakeParameters( - int key) { - - return internalGetHandshakeParameters().getMap().containsKey(key); - } - /** - * Use {@link #getHandshakeParametersMap()} instead. - */ - @java.lang.Deprecated - public java.util.Map getHandshakeParameters() { - return getHandshakeParametersMap(); - } - /** - *
-     * Handshake parameters (record protocols and local identities supported by
-     * the server) mapped by the handshake protocol. Each handshake security
-     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-     * identities. Since protobuf does not support enum as key to the map, the key
-     * to handshake_parameters is the integer value of HandshakeProtocol enum.
-     * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - - public java.util.Map getHandshakeParametersMap() { - return internalGetHandshakeParameters().getMap(); - } - /** - *
-     * Handshake parameters (record protocols and local identities supported by
-     * the server) mapped by the handshake protocol. Each handshake security
-     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-     * identities. Since protobuf does not support enum as key to the map, the key
-     * to handshake_parameters is the integer value of HandshakeProtocol enum.
-     * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - - public io.grpc.alts.internal.Handshaker.ServerHandshakeParameters getHandshakeParametersOrDefault( - int key, - io.grpc.alts.internal.Handshaker.ServerHandshakeParameters defaultValue) { - - java.util.Map map = - internalGetHandshakeParameters().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Handshake parameters (record protocols and local identities supported by
-     * the server) mapped by the handshake protocol. Each handshake security
-     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-     * identities. Since protobuf does not support enum as key to the map, the key
-     * to handshake_parameters is the integer value of HandshakeProtocol enum.
-     * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - - public io.grpc.alts.internal.Handshaker.ServerHandshakeParameters getHandshakeParametersOrThrow( - int key) { - - java.util.Map map = - internalGetHandshakeParameters().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int IN_BYTES_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString inBytes_; - /** - *
-     * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
-     * that the peer's out_frames are split into multiple HandshakReq messages.
-     * 
- * - * bytes in_bytes = 3; - */ - public com.google.protobuf.ByteString getInBytes() { - return inBytes_; - } - - public static final int LOCAL_ENDPOINT_FIELD_NUMBER = 4; - private io.grpc.alts.internal.Handshaker.Endpoint localEndpoint_; - /** - *
-     * (Optional) Local endpoint information of the connection to the client,
-     * such as local IP address, port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - public boolean hasLocalEndpoint() { - return localEndpoint_ != null; - } - /** - *
-     * (Optional) Local endpoint information of the connection to the client,
-     * such as local IP address, port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - public io.grpc.alts.internal.Handshaker.Endpoint getLocalEndpoint() { - return localEndpoint_ == null ? io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance() : localEndpoint_; - } - /** - *
-     * (Optional) Local endpoint information of the connection to the client,
-     * such as local IP address, port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - public io.grpc.alts.internal.Handshaker.EndpointOrBuilder getLocalEndpointOrBuilder() { - return getLocalEndpoint(); - } - - public static final int REMOTE_ENDPOINT_FIELD_NUMBER = 5; - private io.grpc.alts.internal.Handshaker.Endpoint remoteEndpoint_; - /** - *
-     * (Optional) Endpoint information of the remote client, such as IP address,
-     * port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - public boolean hasRemoteEndpoint() { - return remoteEndpoint_ != null; - } - /** - *
-     * (Optional) Endpoint information of the remote client, such as IP address,
-     * port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - public io.grpc.alts.internal.Handshaker.Endpoint getRemoteEndpoint() { - return remoteEndpoint_ == null ? io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance() : remoteEndpoint_; - } - /** - *
-     * (Optional) Endpoint information of the remote client, such as IP address,
-     * port number, and network protocol.
-     * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - public io.grpc.alts.internal.Handshaker.EndpointOrBuilder getRemoteEndpointOrBuilder() { - return getRemoteEndpoint(); - } - - public static final int RPC_VERSIONS_FIELD_NUMBER = 6; - private io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions rpcVersions_; - /** - *
-     * (Optional) RPC protocol versions supported by the server.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - public boolean hasRpcVersions() { - return rpcVersions_ != null; - } - /** - *
-     * (Optional) RPC protocol versions supported by the server.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getRpcVersions() { - return rpcVersions_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : rpcVersions_; - } - /** - *
-     * (Optional) RPC protocol versions supported by the server.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder() { - return getRpcVersions(); - } - - 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 < applicationProtocols_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, applicationProtocols_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3 - .serializeIntegerMapTo( - output, - internalGetHandshakeParameters(), - HandshakeParametersDefaultEntryHolder.defaultEntry, - 2); - if (!inBytes_.isEmpty()) { - output.writeBytes(3, inBytes_); - } - if (localEndpoint_ != null) { - output.writeMessage(4, getLocalEndpoint()); - } - if (remoteEndpoint_ != null) { - output.writeMessage(5, getRemoteEndpoint()); - } - if (rpcVersions_ != null) { - output.writeMessage(6, getRpcVersions()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < applicationProtocols_.size(); i++) { - dataSize += computeStringSizeNoTag(applicationProtocols_.getRaw(i)); - } - size += dataSize; - size += 1 * getApplicationProtocolsList().size(); - } - for (java.util.Map.Entry entry - : internalGetHandshakeParameters().getMap().entrySet()) { - com.google.protobuf.MapEntry - handshakeParameters__ = HandshakeParametersDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, handshakeParameters__); - } - if (!inBytes_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, inBytes_); - } - if (localEndpoint_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getLocalEndpoint()); - } - if (remoteEndpoint_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getRemoteEndpoint()); - } - if (rpcVersions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getRpcVersions()); - } - 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.Handshaker.StartServerHandshakeReq)) { - return super.equals(obj); - } - io.grpc.alts.internal.Handshaker.StartServerHandshakeReq other = (io.grpc.alts.internal.Handshaker.StartServerHandshakeReq) obj; - - boolean result = true; - result = result && getApplicationProtocolsList() - .equals(other.getApplicationProtocolsList()); - result = result && internalGetHandshakeParameters().equals( - other.internalGetHandshakeParameters()); - result = result && getInBytes() - .equals(other.getInBytes()); - result = result && (hasLocalEndpoint() == other.hasLocalEndpoint()); - if (hasLocalEndpoint()) { - result = result && getLocalEndpoint() - .equals(other.getLocalEndpoint()); - } - result = result && (hasRemoteEndpoint() == other.hasRemoteEndpoint()); - if (hasRemoteEndpoint()) { - result = result && getRemoteEndpoint() - .equals(other.getRemoteEndpoint()); - } - result = result && (hasRpcVersions() == other.hasRpcVersions()); - if (hasRpcVersions()) { - result = result && getRpcVersions() - .equals(other.getRpcVersions()); - } - 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 (getApplicationProtocolsCount() > 0) { - hash = (37 * hash) + APPLICATION_PROTOCOLS_FIELD_NUMBER; - hash = (53 * hash) + getApplicationProtocolsList().hashCode(); - } - if (!internalGetHandshakeParameters().getMap().isEmpty()) { - hash = (37 * hash) + HANDSHAKE_PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + internalGetHandshakeParameters().hashCode(); - } - hash = (37 * hash) + IN_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getInBytes().hashCode(); - if (hasLocalEndpoint()) { - hash = (37 * hash) + LOCAL_ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getLocalEndpoint().hashCode(); - } - if (hasRemoteEndpoint()) { - hash = (37 * hash) + REMOTE_ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getRemoteEndpoint().hashCode(); - } - if (hasRpcVersions()) { - hash = (37 * hash) + RPC_VERSIONS_FIELD_NUMBER; - hash = (53 * hash) + getRpcVersions().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grpc.alts.internal.Handshaker.StartServerHandshakeReq parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.StartServerHandshakeReq 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.Handshaker.StartServerHandshakeReq parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.StartServerHandshakeReq 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.Handshaker.StartServerHandshakeReq parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.StartServerHandshakeReq parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grpc.alts.internal.Handshaker.StartServerHandshakeReq parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.StartServerHandshakeReq 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.Handshaker.StartServerHandshakeReq parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.StartServerHandshakeReq 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.Handshaker.StartServerHandshakeReq parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.StartServerHandshakeReq 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.Handshaker.StartServerHandshakeReq 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.StartServerHandshakeReq} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.StartServerHandshakeReq) - io.grpc.alts.internal.Handshaker.StartServerHandshakeReqOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_StartServerHandshakeReq_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetHandshakeParameters(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableHandshakeParameters(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_StartServerHandshakeReq_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.class, io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.Builder.class); - } - - // Construct using io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.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(); - applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableHandshakeParameters().clear(); - inBytes_ = com.google.protobuf.ByteString.EMPTY; - - if (localEndpointBuilder_ == null) { - localEndpoint_ = null; - } else { - localEndpoint_ = null; - localEndpointBuilder_ = null; - } - if (remoteEndpointBuilder_ == null) { - remoteEndpoint_ = null; - } else { - remoteEndpoint_ = null; - remoteEndpointBuilder_ = null; - } - if (rpcVersionsBuilder_ == null) { - rpcVersions_ = null; - } else { - rpcVersions_ = null; - rpcVersionsBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_StartServerHandshakeReq_descriptor; - } - - public io.grpc.alts.internal.Handshaker.StartServerHandshakeReq getDefaultInstanceForType() { - return io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.getDefaultInstance(); - } - - public io.grpc.alts.internal.Handshaker.StartServerHandshakeReq build() { - io.grpc.alts.internal.Handshaker.StartServerHandshakeReq result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.Handshaker.StartServerHandshakeReq buildPartial() { - io.grpc.alts.internal.Handshaker.StartServerHandshakeReq result = new io.grpc.alts.internal.Handshaker.StartServerHandshakeReq(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - applicationProtocols_ = applicationProtocols_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.applicationProtocols_ = applicationProtocols_; - result.handshakeParameters_ = internalGetHandshakeParameters(); - result.handshakeParameters_.makeImmutable(); - result.inBytes_ = inBytes_; - if (localEndpointBuilder_ == null) { - result.localEndpoint_ = localEndpoint_; - } else { - result.localEndpoint_ = localEndpointBuilder_.build(); - } - if (remoteEndpointBuilder_ == null) { - result.remoteEndpoint_ = remoteEndpoint_; - } else { - result.remoteEndpoint_ = remoteEndpointBuilder_.build(); - } - if (rpcVersionsBuilder_ == null) { - result.rpcVersions_ = rpcVersions_; - } else { - result.rpcVersions_ = rpcVersionsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - 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.Handshaker.StartServerHandshakeReq) { - return mergeFrom((io.grpc.alts.internal.Handshaker.StartServerHandshakeReq)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.Handshaker.StartServerHandshakeReq other) { - if (other == io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.getDefaultInstance()) return this; - if (!other.applicationProtocols_.isEmpty()) { - if (applicationProtocols_.isEmpty()) { - applicationProtocols_ = other.applicationProtocols_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureApplicationProtocolsIsMutable(); - applicationProtocols_.addAll(other.applicationProtocols_); - } - onChanged(); - } - internalGetMutableHandshakeParameters().mergeFrom( - other.internalGetHandshakeParameters()); - if (other.getInBytes() != com.google.protobuf.ByteString.EMPTY) { - setInBytes(other.getInBytes()); - } - if (other.hasLocalEndpoint()) { - mergeLocalEndpoint(other.getLocalEndpoint()); - } - if (other.hasRemoteEndpoint()) { - mergeRemoteEndpoint(other.getRemoteEndpoint()); - } - if (other.hasRpcVersions()) { - mergeRpcVersions(other.getRpcVersions()); - } - 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.Handshaker.StartServerHandshakeReq parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.Handshaker.StartServerHandshakeReq) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureApplicationProtocolsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - applicationProtocols_ = new com.google.protobuf.LazyStringArrayList(applicationProtocols_); - bitField0_ |= 0x00000001; - } - } - /** - *
-       * The application protocols supported by the server, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 1; - */ - public com.google.protobuf.ProtocolStringList - getApplicationProtocolsList() { - return applicationProtocols_.getUnmodifiableView(); - } - /** - *
-       * The application protocols supported by the server, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 1; - */ - public int getApplicationProtocolsCount() { - return applicationProtocols_.size(); - } - /** - *
-       * The application protocols supported by the server, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 1; - */ - public java.lang.String getApplicationProtocols(int index) { - return applicationProtocols_.get(index); - } - /** - *
-       * The application protocols supported by the server, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 1; - */ - public com.google.protobuf.ByteString - getApplicationProtocolsBytes(int index) { - return applicationProtocols_.getByteString(index); - } - /** - *
-       * The application protocols supported by the server, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 1; - */ - public Builder setApplicationProtocols( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureApplicationProtocolsIsMutable(); - applicationProtocols_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * The application protocols supported by the server, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 1; - */ - public Builder addApplicationProtocols( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureApplicationProtocolsIsMutable(); - applicationProtocols_.add(value); - onChanged(); - return this; - } - /** - *
-       * The application protocols supported by the server, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 1; - */ - public Builder addAllApplicationProtocols( - java.lang.Iterable values) { - ensureApplicationProtocolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, applicationProtocols_); - onChanged(); - return this; - } - /** - *
-       * The application protocols supported by the server, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 1; - */ - public Builder clearApplicationProtocols() { - applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * The application protocols supported by the server, e.g., "h2" (for http2),
-       * "grpc".
-       * 
- * - * repeated string application_protocols = 1; - */ - public Builder addApplicationProtocolsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureApplicationProtocolsIsMutable(); - applicationProtocols_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.Integer, io.grpc.alts.internal.Handshaker.ServerHandshakeParameters> handshakeParameters_; - private com.google.protobuf.MapField - internalGetHandshakeParameters() { - if (handshakeParameters_ == null) { - return com.google.protobuf.MapField.emptyMapField( - HandshakeParametersDefaultEntryHolder.defaultEntry); - } - return handshakeParameters_; - } - private com.google.protobuf.MapField - internalGetMutableHandshakeParameters() { - onChanged();; - if (handshakeParameters_ == null) { - handshakeParameters_ = com.google.protobuf.MapField.newMapField( - HandshakeParametersDefaultEntryHolder.defaultEntry); - } - if (!handshakeParameters_.isMutable()) { - handshakeParameters_ = handshakeParameters_.copy(); - } - return handshakeParameters_; - } - - public int getHandshakeParametersCount() { - return internalGetHandshakeParameters().getMap().size(); - } - /** - *
-       * Handshake parameters (record protocols and local identities supported by
-       * the server) mapped by the handshake protocol. Each handshake security
-       * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-       * identities. Since protobuf does not support enum as key to the map, the key
-       * to handshake_parameters is the integer value of HandshakeProtocol enum.
-       * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - - public boolean containsHandshakeParameters( - int key) { - - return internalGetHandshakeParameters().getMap().containsKey(key); - } - /** - * Use {@link #getHandshakeParametersMap()} instead. - */ - @java.lang.Deprecated - public java.util.Map getHandshakeParameters() { - return getHandshakeParametersMap(); - } - /** - *
-       * Handshake parameters (record protocols and local identities supported by
-       * the server) mapped by the handshake protocol. Each handshake security
-       * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-       * identities. Since protobuf does not support enum as key to the map, the key
-       * to handshake_parameters is the integer value of HandshakeProtocol enum.
-       * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - - public java.util.Map getHandshakeParametersMap() { - return internalGetHandshakeParameters().getMap(); - } - /** - *
-       * Handshake parameters (record protocols and local identities supported by
-       * the server) mapped by the handshake protocol. Each handshake security
-       * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-       * identities. Since protobuf does not support enum as key to the map, the key
-       * to handshake_parameters is the integer value of HandshakeProtocol enum.
-       * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - - public io.grpc.alts.internal.Handshaker.ServerHandshakeParameters getHandshakeParametersOrDefault( - int key, - io.grpc.alts.internal.Handshaker.ServerHandshakeParameters defaultValue) { - - java.util.Map map = - internalGetHandshakeParameters().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-       * Handshake parameters (record protocols and local identities supported by
-       * the server) mapped by the handshake protocol. Each handshake security
-       * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-       * identities. Since protobuf does not support enum as key to the map, the key
-       * to handshake_parameters is the integer value of HandshakeProtocol enum.
-       * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - - public io.grpc.alts.internal.Handshaker.ServerHandshakeParameters getHandshakeParametersOrThrow( - int key) { - - java.util.Map map = - internalGetHandshakeParameters().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearHandshakeParameters() { - internalGetMutableHandshakeParameters().getMutableMap() - .clear(); - return this; - } - /** - *
-       * Handshake parameters (record protocols and local identities supported by
-       * the server) mapped by the handshake protocol. Each handshake security
-       * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-       * identities. Since protobuf does not support enum as key to the map, the key
-       * to handshake_parameters is the integer value of HandshakeProtocol enum.
-       * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - - public Builder removeHandshakeParameters( - int key) { - - internalGetMutableHandshakeParameters().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableHandshakeParameters() { - return internalGetMutableHandshakeParameters().getMutableMap(); - } - /** - *
-       * Handshake parameters (record protocols and local identities supported by
-       * the server) mapped by the handshake protocol. Each handshake security
-       * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-       * identities. Since protobuf does not support enum as key to the map, the key
-       * to handshake_parameters is the integer value of HandshakeProtocol enum.
-       * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - public Builder putHandshakeParameters( - int key, - io.grpc.alts.internal.Handshaker.ServerHandshakeParameters value) { - - if (value == null) { throw new java.lang.NullPointerException(); } - internalGetMutableHandshakeParameters().getMutableMap() - .put(key, value); - return this; - } - /** - *
-       * Handshake parameters (record protocols and local identities supported by
-       * the server) mapped by the handshake protocol. Each handshake security
-       * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
-       * identities. Since protobuf does not support enum as key to the map, the key
-       * to handshake_parameters is the integer value of HandshakeProtocol enum.
-       * 
- * - * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; - */ - - public Builder putAllHandshakeParameters( - java.util.Map values) { - internalGetMutableHandshakeParameters().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.ByteString inBytes_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-       * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
-       * that the peer's out_frames are split into multiple HandshakReq messages.
-       * 
- * - * bytes in_bytes = 3; - */ - public com.google.protobuf.ByteString getInBytes() { - return inBytes_; - } - /** - *
-       * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
-       * that the peer's out_frames are split into multiple HandshakReq messages.
-       * 
- * - * bytes in_bytes = 3; - */ - public Builder setInBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - inBytes_ = value; - onChanged(); - return this; - } - /** - *
-       * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
-       * that the peer's out_frames are split into multiple HandshakReq messages.
-       * 
- * - * bytes in_bytes = 3; - */ - public Builder clearInBytes() { - - inBytes_ = getDefaultInstance().getInBytes(); - onChanged(); - return this; - } - - private io.grpc.alts.internal.Handshaker.Endpoint localEndpoint_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Endpoint, io.grpc.alts.internal.Handshaker.Endpoint.Builder, io.grpc.alts.internal.Handshaker.EndpointOrBuilder> localEndpointBuilder_; - /** - *
-       * (Optional) Local endpoint information of the connection to the client,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - public boolean hasLocalEndpoint() { - return localEndpointBuilder_ != null || localEndpoint_ != null; - } - /** - *
-       * (Optional) Local endpoint information of the connection to the client,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - public io.grpc.alts.internal.Handshaker.Endpoint getLocalEndpoint() { - if (localEndpointBuilder_ == null) { - return localEndpoint_ == null ? io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance() : localEndpoint_; - } else { - return localEndpointBuilder_.getMessage(); - } - } - /** - *
-       * (Optional) Local endpoint information of the connection to the client,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - public Builder setLocalEndpoint(io.grpc.alts.internal.Handshaker.Endpoint value) { - if (localEndpointBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - localEndpoint_ = value; - onChanged(); - } else { - localEndpointBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * (Optional) Local endpoint information of the connection to the client,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - public Builder setLocalEndpoint( - io.grpc.alts.internal.Handshaker.Endpoint.Builder builderForValue) { - if (localEndpointBuilder_ == null) { - localEndpoint_ = builderForValue.build(); - onChanged(); - } else { - localEndpointBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * (Optional) Local endpoint information of the connection to the client,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - public Builder mergeLocalEndpoint(io.grpc.alts.internal.Handshaker.Endpoint value) { - if (localEndpointBuilder_ == null) { - if (localEndpoint_ != null) { - localEndpoint_ = - io.grpc.alts.internal.Handshaker.Endpoint.newBuilder(localEndpoint_).mergeFrom(value).buildPartial(); - } else { - localEndpoint_ = value; - } - onChanged(); - } else { - localEndpointBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * (Optional) Local endpoint information of the connection to the client,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - public Builder clearLocalEndpoint() { - if (localEndpointBuilder_ == null) { - localEndpoint_ = null; - onChanged(); - } else { - localEndpoint_ = null; - localEndpointBuilder_ = null; - } - - return this; - } - /** - *
-       * (Optional) Local endpoint information of the connection to the client,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - public io.grpc.alts.internal.Handshaker.Endpoint.Builder getLocalEndpointBuilder() { - - onChanged(); - return getLocalEndpointFieldBuilder().getBuilder(); - } - /** - *
-       * (Optional) Local endpoint information of the connection to the client,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - public io.grpc.alts.internal.Handshaker.EndpointOrBuilder getLocalEndpointOrBuilder() { - if (localEndpointBuilder_ != null) { - return localEndpointBuilder_.getMessageOrBuilder(); - } else { - return localEndpoint_ == null ? - io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance() : localEndpoint_; - } - } - /** - *
-       * (Optional) Local endpoint information of the connection to the client,
-       * such as local IP address, port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint local_endpoint = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Endpoint, io.grpc.alts.internal.Handshaker.Endpoint.Builder, io.grpc.alts.internal.Handshaker.EndpointOrBuilder> - getLocalEndpointFieldBuilder() { - if (localEndpointBuilder_ == null) { - localEndpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Endpoint, io.grpc.alts.internal.Handshaker.Endpoint.Builder, io.grpc.alts.internal.Handshaker.EndpointOrBuilder>( - getLocalEndpoint(), - getParentForChildren(), - isClean()); - localEndpoint_ = null; - } - return localEndpointBuilder_; - } - - private io.grpc.alts.internal.Handshaker.Endpoint remoteEndpoint_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Endpoint, io.grpc.alts.internal.Handshaker.Endpoint.Builder, io.grpc.alts.internal.Handshaker.EndpointOrBuilder> remoteEndpointBuilder_; - /** - *
-       * (Optional) Endpoint information of the remote client, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - public boolean hasRemoteEndpoint() { - return remoteEndpointBuilder_ != null || remoteEndpoint_ != null; - } - /** - *
-       * (Optional) Endpoint information of the remote client, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - public io.grpc.alts.internal.Handshaker.Endpoint getRemoteEndpoint() { - if (remoteEndpointBuilder_ == null) { - return remoteEndpoint_ == null ? io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance() : remoteEndpoint_; - } else { - return remoteEndpointBuilder_.getMessage(); - } - } - /** - *
-       * (Optional) Endpoint information of the remote client, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - public Builder setRemoteEndpoint(io.grpc.alts.internal.Handshaker.Endpoint value) { - if (remoteEndpointBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - remoteEndpoint_ = value; - onChanged(); - } else { - remoteEndpointBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * (Optional) Endpoint information of the remote client, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - public Builder setRemoteEndpoint( - io.grpc.alts.internal.Handshaker.Endpoint.Builder builderForValue) { - if (remoteEndpointBuilder_ == null) { - remoteEndpoint_ = builderForValue.build(); - onChanged(); - } else { - remoteEndpointBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * (Optional) Endpoint information of the remote client, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - public Builder mergeRemoteEndpoint(io.grpc.alts.internal.Handshaker.Endpoint value) { - if (remoteEndpointBuilder_ == null) { - if (remoteEndpoint_ != null) { - remoteEndpoint_ = - io.grpc.alts.internal.Handshaker.Endpoint.newBuilder(remoteEndpoint_).mergeFrom(value).buildPartial(); - } else { - remoteEndpoint_ = value; - } - onChanged(); - } else { - remoteEndpointBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * (Optional) Endpoint information of the remote client, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - public Builder clearRemoteEndpoint() { - if (remoteEndpointBuilder_ == null) { - remoteEndpoint_ = null; - onChanged(); - } else { - remoteEndpoint_ = null; - remoteEndpointBuilder_ = null; - } - - return this; - } - /** - *
-       * (Optional) Endpoint information of the remote client, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - public io.grpc.alts.internal.Handshaker.Endpoint.Builder getRemoteEndpointBuilder() { - - onChanged(); - return getRemoteEndpointFieldBuilder().getBuilder(); - } - /** - *
-       * (Optional) Endpoint information of the remote client, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - public io.grpc.alts.internal.Handshaker.EndpointOrBuilder getRemoteEndpointOrBuilder() { - if (remoteEndpointBuilder_ != null) { - return remoteEndpointBuilder_.getMessageOrBuilder(); - } else { - return remoteEndpoint_ == null ? - io.grpc.alts.internal.Handshaker.Endpoint.getDefaultInstance() : remoteEndpoint_; - } - } - /** - *
-       * (Optional) Endpoint information of the remote client, such as IP address,
-       * port number, and network protocol.
-       * 
- * - * .grpc.gcp.Endpoint remote_endpoint = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Endpoint, io.grpc.alts.internal.Handshaker.Endpoint.Builder, io.grpc.alts.internal.Handshaker.EndpointOrBuilder> - getRemoteEndpointFieldBuilder() { - if (remoteEndpointBuilder_ == null) { - remoteEndpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Endpoint, io.grpc.alts.internal.Handshaker.Endpoint.Builder, io.grpc.alts.internal.Handshaker.EndpointOrBuilder>( - getRemoteEndpoint(), - getParentForChildren(), - isClean()); - remoteEndpoint_ = null; - } - return remoteEndpointBuilder_; - } - - private io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions rpcVersions_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder> rpcVersionsBuilder_; - /** - *
-       * (Optional) RPC protocol versions supported by the server.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - public boolean hasRpcVersions() { - return rpcVersionsBuilder_ != null || rpcVersions_ != null; - } - /** - *
-       * (Optional) RPC protocol versions supported by the server.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getRpcVersions() { - if (rpcVersionsBuilder_ == null) { - return rpcVersions_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : rpcVersions_; - } else { - return rpcVersionsBuilder_.getMessage(); - } - } - /** - *
-       * (Optional) RPC protocol versions supported by the server.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - public Builder setRpcVersions(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions value) { - if (rpcVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - rpcVersions_ = value; - onChanged(); - } else { - rpcVersionsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * (Optional) RPC protocol versions supported by the server.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - public Builder setRpcVersions( - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder builderForValue) { - if (rpcVersionsBuilder_ == null) { - rpcVersions_ = builderForValue.build(); - onChanged(); - } else { - rpcVersionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * (Optional) RPC protocol versions supported by the server.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - public Builder mergeRpcVersions(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions value) { - if (rpcVersionsBuilder_ == null) { - if (rpcVersions_ != null) { - rpcVersions_ = - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.newBuilder(rpcVersions_).mergeFrom(value).buildPartial(); - } else { - rpcVersions_ = value; - } - onChanged(); - } else { - rpcVersionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * (Optional) RPC protocol versions supported by the server.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - public Builder clearRpcVersions() { - if (rpcVersionsBuilder_ == null) { - rpcVersions_ = null; - onChanged(); - } else { - rpcVersions_ = null; - rpcVersionsBuilder_ = null; - } - - return this; - } - /** - *
-       * (Optional) RPC protocol versions supported by the server.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder getRpcVersionsBuilder() { - - onChanged(); - return getRpcVersionsFieldBuilder().getBuilder(); - } - /** - *
-       * (Optional) RPC protocol versions supported by the server.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder() { - if (rpcVersionsBuilder_ != null) { - return rpcVersionsBuilder_.getMessageOrBuilder(); - } else { - return rpcVersions_ == null ? - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : rpcVersions_; - } - } - /** - *
-       * (Optional) RPC protocol versions supported by the server.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder> - getRpcVersionsFieldBuilder() { - if (rpcVersionsBuilder_ == null) { - rpcVersionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder>( - getRpcVersions(), - getParentForChildren(), - isClean()); - rpcVersions_ = null; - } - return rpcVersionsBuilder_; - } - 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.StartServerHandshakeReq) - } - - // @@protoc_insertion_point(class_scope:grpc.gcp.StartServerHandshakeReq) - private static final io.grpc.alts.internal.Handshaker.StartServerHandshakeReq DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.Handshaker.StartServerHandshakeReq(); - } - - public static io.grpc.alts.internal.Handshaker.StartServerHandshakeReq getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public StartServerHandshakeReq parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StartServerHandshakeReq(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.Handshaker.StartServerHandshakeReq getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface NextHandshakeMessageReqOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.NextHandshakeMessageReq) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
-     * that the peer's out_frames are split into multiple NextHandshakerMessageReq
-     * messages.
-     * 
- * - * bytes in_bytes = 1; - */ - com.google.protobuf.ByteString getInBytes(); - } - /** - * Protobuf type {@code grpc.gcp.NextHandshakeMessageReq} - */ - public static final class NextHandshakeMessageReq extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gcp.NextHandshakeMessageReq) - NextHandshakeMessageReqOrBuilder { - private static final long serialVersionUID = 0L; - // Use NextHandshakeMessageReq.newBuilder() to construct. - private NextHandshakeMessageReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NextHandshakeMessageReq() { - inBytes_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NextHandshakeMessageReq( - 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: { - - inBytes_ = input.readBytes(); - 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.Handshaker.internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_NextHandshakeMessageReq_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.class, io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.Builder.class); - } - - public static final int IN_BYTES_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString inBytes_; - /** - *
-     * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
-     * that the peer's out_frames are split into multiple NextHandshakerMessageReq
-     * messages.
-     * 
- * - * bytes in_bytes = 1; - */ - public com.google.protobuf.ByteString getInBytes() { - return inBytes_; - } - - 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 (!inBytes_.isEmpty()) { - output.writeBytes(1, inBytes_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!inBytes_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, inBytes_); - } - 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.Handshaker.NextHandshakeMessageReq)) { - return super.equals(obj); - } - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq other = (io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq) obj; - - boolean result = true; - result = result && getInBytes() - .equals(other.getInBytes()); - 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) + IN_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getInBytes().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq 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.Handshaker.NextHandshakeMessageReq parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq 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.Handshaker.NextHandshakeMessageReq parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq 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.Handshaker.NextHandshakeMessageReq parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq 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.Handshaker.NextHandshakeMessageReq parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq 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.Handshaker.NextHandshakeMessageReq 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.NextHandshakeMessageReq} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.NextHandshakeMessageReq) - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReqOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_NextHandshakeMessageReq_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.class, io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.Builder.class); - } - - // Construct using io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.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(); - inBytes_ = com.google.protobuf.ByteString.EMPTY; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor; - } - - public io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq getDefaultInstanceForType() { - return io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.getDefaultInstance(); - } - - public io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq build() { - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq buildPartial() { - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq result = new io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq(this); - result.inBytes_ = inBytes_; - 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.Handshaker.NextHandshakeMessageReq) { - return mergeFrom((io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq other) { - if (other == io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.getDefaultInstance()) return this; - if (other.getInBytes() != com.google.protobuf.ByteString.EMPTY) { - setInBytes(other.getInBytes()); - } - 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.Handshaker.NextHandshakeMessageReq parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.ByteString inBytes_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-       * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
-       * that the peer's out_frames are split into multiple NextHandshakerMessageReq
-       * messages.
-       * 
- * - * bytes in_bytes = 1; - */ - public com.google.protobuf.ByteString getInBytes() { - return inBytes_; - } - /** - *
-       * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
-       * that the peer's out_frames are split into multiple NextHandshakerMessageReq
-       * messages.
-       * 
- * - * bytes in_bytes = 1; - */ - public Builder setInBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - inBytes_ = value; - onChanged(); - return this; - } - /** - *
-       * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
-       * that the peer's out_frames are split into multiple NextHandshakerMessageReq
-       * messages.
-       * 
- * - * bytes in_bytes = 1; - */ - public Builder clearInBytes() { - - inBytes_ = getDefaultInstance().getInBytes(); - onChanged(); - return this; - } - 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.NextHandshakeMessageReq) - } - - // @@protoc_insertion_point(class_scope:grpc.gcp.NextHandshakeMessageReq) - private static final io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq(); - } - - public static io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public NextHandshakeMessageReq parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NextHandshakeMessageReq(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface HandshakerReqOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.HandshakerReq) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The start client handshake request message.
-     * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - boolean hasClientStart(); - /** - *
-     * The start client handshake request message.
-     * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - io.grpc.alts.internal.Handshaker.StartClientHandshakeReq getClientStart(); - /** - *
-     * The start client handshake request message.
-     * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - io.grpc.alts.internal.Handshaker.StartClientHandshakeReqOrBuilder getClientStartOrBuilder(); - - /** - *
-     * The start server handshake request message.
-     * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - boolean hasServerStart(); - /** - *
-     * The start server handshake request message.
-     * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - io.grpc.alts.internal.Handshaker.StartServerHandshakeReq getServerStart(); - /** - *
-     * The start server handshake request message.
-     * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - io.grpc.alts.internal.Handshaker.StartServerHandshakeReqOrBuilder getServerStartOrBuilder(); - - /** - *
-     * The next handshake request message.
-     * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - boolean hasNext(); - /** - *
-     * The next handshake request message.
-     * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq getNext(); - /** - *
-     * The next handshake request message.
-     * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReqOrBuilder getNextOrBuilder(); - - public io.grpc.alts.internal.Handshaker.HandshakerReq.ReqOneofCase getReqOneofCase(); - } - /** - * Protobuf type {@code grpc.gcp.HandshakerReq} - */ - public static final class HandshakerReq extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gcp.HandshakerReq) - HandshakerReqOrBuilder { - private static final long serialVersionUID = 0L; - // Use HandshakerReq.newBuilder() to construct. - private HandshakerReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HandshakerReq() { - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HandshakerReq( - 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: { - io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.Builder subBuilder = null; - if (reqOneofCase_ == 1) { - subBuilder = ((io.grpc.alts.internal.Handshaker.StartClientHandshakeReq) reqOneof_).toBuilder(); - } - reqOneof_ = - input.readMessage(io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((io.grpc.alts.internal.Handshaker.StartClientHandshakeReq) reqOneof_); - reqOneof_ = subBuilder.buildPartial(); - } - reqOneofCase_ = 1; - break; - } - case 18: { - io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.Builder subBuilder = null; - if (reqOneofCase_ == 2) { - subBuilder = ((io.grpc.alts.internal.Handshaker.StartServerHandshakeReq) reqOneof_).toBuilder(); - } - reqOneof_ = - input.readMessage(io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((io.grpc.alts.internal.Handshaker.StartServerHandshakeReq) reqOneof_); - reqOneof_ = subBuilder.buildPartial(); - } - reqOneofCase_ = 2; - break; - } - case 26: { - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.Builder subBuilder = null; - if (reqOneofCase_ == 3) { - subBuilder = ((io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq) reqOneof_).toBuilder(); - } - reqOneof_ = - input.readMessage(io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq) reqOneof_); - reqOneof_ = subBuilder.buildPartial(); - } - reqOneofCase_ = 3; - 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.Handshaker.internal_static_grpc_gcp_HandshakerReq_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerReq_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.HandshakerReq.class, io.grpc.alts.internal.Handshaker.HandshakerReq.Builder.class); - } - - private int reqOneofCase_ = 0; - private java.lang.Object reqOneof_; - public enum ReqOneofCase - implements com.google.protobuf.Internal.EnumLite { - CLIENT_START(1), - SERVER_START(2), - NEXT(3), - REQONEOF_NOT_SET(0); - private final int value; - private ReqOneofCase(int value) { - this.value = value; - } - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ReqOneofCase valueOf(int value) { - return forNumber(value); - } - - public static ReqOneofCase forNumber(int value) { - switch (value) { - case 1: return CLIENT_START; - case 2: return SERVER_START; - case 3: return NEXT; - case 0: return REQONEOF_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ReqOneofCase - getReqOneofCase() { - return ReqOneofCase.forNumber( - reqOneofCase_); - } - - public static final int CLIENT_START_FIELD_NUMBER = 1; - /** - *
-     * The start client handshake request message.
-     * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - public boolean hasClientStart() { - return reqOneofCase_ == 1; - } - /** - *
-     * The start client handshake request message.
-     * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - public io.grpc.alts.internal.Handshaker.StartClientHandshakeReq getClientStart() { - if (reqOneofCase_ == 1) { - return (io.grpc.alts.internal.Handshaker.StartClientHandshakeReq) reqOneof_; - } - return io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.getDefaultInstance(); - } - /** - *
-     * The start client handshake request message.
-     * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - public io.grpc.alts.internal.Handshaker.StartClientHandshakeReqOrBuilder getClientStartOrBuilder() { - if (reqOneofCase_ == 1) { - return (io.grpc.alts.internal.Handshaker.StartClientHandshakeReq) reqOneof_; - } - return io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.getDefaultInstance(); - } - - public static final int SERVER_START_FIELD_NUMBER = 2; - /** - *
-     * The start server handshake request message.
-     * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - public boolean hasServerStart() { - return reqOneofCase_ == 2; - } - /** - *
-     * The start server handshake request message.
-     * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - public io.grpc.alts.internal.Handshaker.StartServerHandshakeReq getServerStart() { - if (reqOneofCase_ == 2) { - return (io.grpc.alts.internal.Handshaker.StartServerHandshakeReq) reqOneof_; - } - return io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.getDefaultInstance(); - } - /** - *
-     * The start server handshake request message.
-     * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - public io.grpc.alts.internal.Handshaker.StartServerHandshakeReqOrBuilder getServerStartOrBuilder() { - if (reqOneofCase_ == 2) { - return (io.grpc.alts.internal.Handshaker.StartServerHandshakeReq) reqOneof_; - } - return io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.getDefaultInstance(); - } - - public static final int NEXT_FIELD_NUMBER = 3; - /** - *
-     * The next handshake request message.
-     * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - public boolean hasNext() { - return reqOneofCase_ == 3; - } - /** - *
-     * The next handshake request message.
-     * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - public io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq getNext() { - if (reqOneofCase_ == 3) { - return (io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq) reqOneof_; - } - return io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.getDefaultInstance(); - } - /** - *
-     * The next handshake request message.
-     * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - public io.grpc.alts.internal.Handshaker.NextHandshakeMessageReqOrBuilder getNextOrBuilder() { - if (reqOneofCase_ == 3) { - return (io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq) reqOneof_; - } - return io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.getDefaultInstance(); - } - - 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 (reqOneofCase_ == 1) { - output.writeMessage(1, (io.grpc.alts.internal.Handshaker.StartClientHandshakeReq) reqOneof_); - } - if (reqOneofCase_ == 2) { - output.writeMessage(2, (io.grpc.alts.internal.Handshaker.StartServerHandshakeReq) reqOneof_); - } - if (reqOneofCase_ == 3) { - output.writeMessage(3, (io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq) reqOneof_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (reqOneofCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (io.grpc.alts.internal.Handshaker.StartClientHandshakeReq) reqOneof_); - } - if (reqOneofCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (io.grpc.alts.internal.Handshaker.StartServerHandshakeReq) reqOneof_); - } - if (reqOneofCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq) reqOneof_); - } - 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.Handshaker.HandshakerReq)) { - return super.equals(obj); - } - io.grpc.alts.internal.Handshaker.HandshakerReq other = (io.grpc.alts.internal.Handshaker.HandshakerReq) obj; - - boolean result = true; - result = result && getReqOneofCase().equals( - other.getReqOneofCase()); - if (!result) return false; - switch (reqOneofCase_) { - case 1: - result = result && getClientStart() - .equals(other.getClientStart()); - break; - case 2: - result = result && getServerStart() - .equals(other.getServerStart()); - break; - case 3: - result = result && getNext() - .equals(other.getNext()); - break; - case 0: - default: - } - 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(); - switch (reqOneofCase_) { - case 1: - hash = (37 * hash) + CLIENT_START_FIELD_NUMBER; - hash = (53 * hash) + getClientStart().hashCode(); - break; - case 2: - hash = (37 * hash) + SERVER_START_FIELD_NUMBER; - hash = (53 * hash) + getServerStart().hashCode(); - break; - case 3: - hash = (37 * hash) + NEXT_FIELD_NUMBER; - hash = (53 * hash) + getNext().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grpc.alts.internal.Handshaker.HandshakerReq parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.HandshakerReq 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.Handshaker.HandshakerReq parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.HandshakerReq 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.Handshaker.HandshakerReq parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.HandshakerReq parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grpc.alts.internal.Handshaker.HandshakerReq parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.HandshakerReq 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.Handshaker.HandshakerReq parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.HandshakerReq 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.Handshaker.HandshakerReq parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.HandshakerReq 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.Handshaker.HandshakerReq 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.HandshakerReq} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.HandshakerReq) - io.grpc.alts.internal.Handshaker.HandshakerReqOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerReq_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerReq_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.HandshakerReq.class, io.grpc.alts.internal.Handshaker.HandshakerReq.Builder.class); - } - - // Construct using io.grpc.alts.internal.Handshaker.HandshakerReq.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(); - reqOneofCase_ = 0; - reqOneof_ = null; - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerReq_descriptor; - } - - public io.grpc.alts.internal.Handshaker.HandshakerReq getDefaultInstanceForType() { - return io.grpc.alts.internal.Handshaker.HandshakerReq.getDefaultInstance(); - } - - public io.grpc.alts.internal.Handshaker.HandshakerReq build() { - io.grpc.alts.internal.Handshaker.HandshakerReq result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.Handshaker.HandshakerReq buildPartial() { - io.grpc.alts.internal.Handshaker.HandshakerReq result = new io.grpc.alts.internal.Handshaker.HandshakerReq(this); - if (reqOneofCase_ == 1) { - if (clientStartBuilder_ == null) { - result.reqOneof_ = reqOneof_; - } else { - result.reqOneof_ = clientStartBuilder_.build(); - } - } - if (reqOneofCase_ == 2) { - if (serverStartBuilder_ == null) { - result.reqOneof_ = reqOneof_; - } else { - result.reqOneof_ = serverStartBuilder_.build(); - } - } - if (reqOneofCase_ == 3) { - if (nextBuilder_ == null) { - result.reqOneof_ = reqOneof_; - } else { - result.reqOneof_ = nextBuilder_.build(); - } - } - result.reqOneofCase_ = reqOneofCase_; - 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.Handshaker.HandshakerReq) { - return mergeFrom((io.grpc.alts.internal.Handshaker.HandshakerReq)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.Handshaker.HandshakerReq other) { - if (other == io.grpc.alts.internal.Handshaker.HandshakerReq.getDefaultInstance()) return this; - switch (other.getReqOneofCase()) { - case CLIENT_START: { - mergeClientStart(other.getClientStart()); - break; - } - case SERVER_START: { - mergeServerStart(other.getServerStart()); - break; - } - case NEXT: { - mergeNext(other.getNext()); - break; - } - case REQONEOF_NOT_SET: { - break; - } - } - 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.Handshaker.HandshakerReq parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.Handshaker.HandshakerReq) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int reqOneofCase_ = 0; - private java.lang.Object reqOneof_; - public ReqOneofCase - getReqOneofCase() { - return ReqOneofCase.forNumber( - reqOneofCase_); - } - - public Builder clearReqOneof() { - reqOneofCase_ = 0; - reqOneof_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.StartClientHandshakeReq, io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.Builder, io.grpc.alts.internal.Handshaker.StartClientHandshakeReqOrBuilder> clientStartBuilder_; - /** - *
-       * The start client handshake request message.
-       * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - public boolean hasClientStart() { - return reqOneofCase_ == 1; - } - /** - *
-       * The start client handshake request message.
-       * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - public io.grpc.alts.internal.Handshaker.StartClientHandshakeReq getClientStart() { - if (clientStartBuilder_ == null) { - if (reqOneofCase_ == 1) { - return (io.grpc.alts.internal.Handshaker.StartClientHandshakeReq) reqOneof_; - } - return io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.getDefaultInstance(); - } else { - if (reqOneofCase_ == 1) { - return clientStartBuilder_.getMessage(); - } - return io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.getDefaultInstance(); - } - } - /** - *
-       * The start client handshake request message.
-       * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - public Builder setClientStart(io.grpc.alts.internal.Handshaker.StartClientHandshakeReq value) { - if (clientStartBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reqOneof_ = value; - onChanged(); - } else { - clientStartBuilder_.setMessage(value); - } - reqOneofCase_ = 1; - return this; - } - /** - *
-       * The start client handshake request message.
-       * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - public Builder setClientStart( - io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.Builder builderForValue) { - if (clientStartBuilder_ == null) { - reqOneof_ = builderForValue.build(); - onChanged(); - } else { - clientStartBuilder_.setMessage(builderForValue.build()); - } - reqOneofCase_ = 1; - return this; - } - /** - *
-       * The start client handshake request message.
-       * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - public Builder mergeClientStart(io.grpc.alts.internal.Handshaker.StartClientHandshakeReq value) { - if (clientStartBuilder_ == null) { - if (reqOneofCase_ == 1 && - reqOneof_ != io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.getDefaultInstance()) { - reqOneof_ = io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.newBuilder((io.grpc.alts.internal.Handshaker.StartClientHandshakeReq) reqOneof_) - .mergeFrom(value).buildPartial(); - } else { - reqOneof_ = value; - } - onChanged(); - } else { - if (reqOneofCase_ == 1) { - clientStartBuilder_.mergeFrom(value); - } - clientStartBuilder_.setMessage(value); - } - reqOneofCase_ = 1; - return this; - } - /** - *
-       * The start client handshake request message.
-       * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - public Builder clearClientStart() { - if (clientStartBuilder_ == null) { - if (reqOneofCase_ == 1) { - reqOneofCase_ = 0; - reqOneof_ = null; - onChanged(); - } - } else { - if (reqOneofCase_ == 1) { - reqOneofCase_ = 0; - reqOneof_ = null; - } - clientStartBuilder_.clear(); - } - return this; - } - /** - *
-       * The start client handshake request message.
-       * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - public io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.Builder getClientStartBuilder() { - return getClientStartFieldBuilder().getBuilder(); - } - /** - *
-       * The start client handshake request message.
-       * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - public io.grpc.alts.internal.Handshaker.StartClientHandshakeReqOrBuilder getClientStartOrBuilder() { - if ((reqOneofCase_ == 1) && (clientStartBuilder_ != null)) { - return clientStartBuilder_.getMessageOrBuilder(); - } else { - if (reqOneofCase_ == 1) { - return (io.grpc.alts.internal.Handshaker.StartClientHandshakeReq) reqOneof_; - } - return io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.getDefaultInstance(); - } - } - /** - *
-       * The start client handshake request message.
-       * 
- * - * .grpc.gcp.StartClientHandshakeReq client_start = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.StartClientHandshakeReq, io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.Builder, io.grpc.alts.internal.Handshaker.StartClientHandshakeReqOrBuilder> - getClientStartFieldBuilder() { - if (clientStartBuilder_ == null) { - if (!(reqOneofCase_ == 1)) { - reqOneof_ = io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.getDefaultInstance(); - } - clientStartBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.StartClientHandshakeReq, io.grpc.alts.internal.Handshaker.StartClientHandshakeReq.Builder, io.grpc.alts.internal.Handshaker.StartClientHandshakeReqOrBuilder>( - (io.grpc.alts.internal.Handshaker.StartClientHandshakeReq) reqOneof_, - getParentForChildren(), - isClean()); - reqOneof_ = null; - } - reqOneofCase_ = 1; - onChanged();; - return clientStartBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.StartServerHandshakeReq, io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.Builder, io.grpc.alts.internal.Handshaker.StartServerHandshakeReqOrBuilder> serverStartBuilder_; - /** - *
-       * The start server handshake request message.
-       * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - public boolean hasServerStart() { - return reqOneofCase_ == 2; - } - /** - *
-       * The start server handshake request message.
-       * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - public io.grpc.alts.internal.Handshaker.StartServerHandshakeReq getServerStart() { - if (serverStartBuilder_ == null) { - if (reqOneofCase_ == 2) { - return (io.grpc.alts.internal.Handshaker.StartServerHandshakeReq) reqOneof_; - } - return io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.getDefaultInstance(); - } else { - if (reqOneofCase_ == 2) { - return serverStartBuilder_.getMessage(); - } - return io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.getDefaultInstance(); - } - } - /** - *
-       * The start server handshake request message.
-       * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - public Builder setServerStart(io.grpc.alts.internal.Handshaker.StartServerHandshakeReq value) { - if (serverStartBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reqOneof_ = value; - onChanged(); - } else { - serverStartBuilder_.setMessage(value); - } - reqOneofCase_ = 2; - return this; - } - /** - *
-       * The start server handshake request message.
-       * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - public Builder setServerStart( - io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.Builder builderForValue) { - if (serverStartBuilder_ == null) { - reqOneof_ = builderForValue.build(); - onChanged(); - } else { - serverStartBuilder_.setMessage(builderForValue.build()); - } - reqOneofCase_ = 2; - return this; - } - /** - *
-       * The start server handshake request message.
-       * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - public Builder mergeServerStart(io.grpc.alts.internal.Handshaker.StartServerHandshakeReq value) { - if (serverStartBuilder_ == null) { - if (reqOneofCase_ == 2 && - reqOneof_ != io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.getDefaultInstance()) { - reqOneof_ = io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.newBuilder((io.grpc.alts.internal.Handshaker.StartServerHandshakeReq) reqOneof_) - .mergeFrom(value).buildPartial(); - } else { - reqOneof_ = value; - } - onChanged(); - } else { - if (reqOneofCase_ == 2) { - serverStartBuilder_.mergeFrom(value); - } - serverStartBuilder_.setMessage(value); - } - reqOneofCase_ = 2; - return this; - } - /** - *
-       * The start server handshake request message.
-       * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - public Builder clearServerStart() { - if (serverStartBuilder_ == null) { - if (reqOneofCase_ == 2) { - reqOneofCase_ = 0; - reqOneof_ = null; - onChanged(); - } - } else { - if (reqOneofCase_ == 2) { - reqOneofCase_ = 0; - reqOneof_ = null; - } - serverStartBuilder_.clear(); - } - return this; - } - /** - *
-       * The start server handshake request message.
-       * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - public io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.Builder getServerStartBuilder() { - return getServerStartFieldBuilder().getBuilder(); - } - /** - *
-       * The start server handshake request message.
-       * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - public io.grpc.alts.internal.Handshaker.StartServerHandshakeReqOrBuilder getServerStartOrBuilder() { - if ((reqOneofCase_ == 2) && (serverStartBuilder_ != null)) { - return serverStartBuilder_.getMessageOrBuilder(); - } else { - if (reqOneofCase_ == 2) { - return (io.grpc.alts.internal.Handshaker.StartServerHandshakeReq) reqOneof_; - } - return io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.getDefaultInstance(); - } - } - /** - *
-       * The start server handshake request message.
-       * 
- * - * .grpc.gcp.StartServerHandshakeReq server_start = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.StartServerHandshakeReq, io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.Builder, io.grpc.alts.internal.Handshaker.StartServerHandshakeReqOrBuilder> - getServerStartFieldBuilder() { - if (serverStartBuilder_ == null) { - if (!(reqOneofCase_ == 2)) { - reqOneof_ = io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.getDefaultInstance(); - } - serverStartBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.StartServerHandshakeReq, io.grpc.alts.internal.Handshaker.StartServerHandshakeReq.Builder, io.grpc.alts.internal.Handshaker.StartServerHandshakeReqOrBuilder>( - (io.grpc.alts.internal.Handshaker.StartServerHandshakeReq) reqOneof_, - getParentForChildren(), - isClean()); - reqOneof_ = null; - } - reqOneofCase_ = 2; - onChanged();; - return serverStartBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq, io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.Builder, io.grpc.alts.internal.Handshaker.NextHandshakeMessageReqOrBuilder> nextBuilder_; - /** - *
-       * The next handshake request message.
-       * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - public boolean hasNext() { - return reqOneofCase_ == 3; - } - /** - *
-       * The next handshake request message.
-       * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - public io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq getNext() { - if (nextBuilder_ == null) { - if (reqOneofCase_ == 3) { - return (io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq) reqOneof_; - } - return io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.getDefaultInstance(); - } else { - if (reqOneofCase_ == 3) { - return nextBuilder_.getMessage(); - } - return io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.getDefaultInstance(); - } - } - /** - *
-       * The next handshake request message.
-       * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - public Builder setNext(io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq value) { - if (nextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reqOneof_ = value; - onChanged(); - } else { - nextBuilder_.setMessage(value); - } - reqOneofCase_ = 3; - return this; - } - /** - *
-       * The next handshake request message.
-       * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - public Builder setNext( - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.Builder builderForValue) { - if (nextBuilder_ == null) { - reqOneof_ = builderForValue.build(); - onChanged(); - } else { - nextBuilder_.setMessage(builderForValue.build()); - } - reqOneofCase_ = 3; - return this; - } - /** - *
-       * The next handshake request message.
-       * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - public Builder mergeNext(io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq value) { - if (nextBuilder_ == null) { - if (reqOneofCase_ == 3 && - reqOneof_ != io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.getDefaultInstance()) { - reqOneof_ = io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.newBuilder((io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq) reqOneof_) - .mergeFrom(value).buildPartial(); - } else { - reqOneof_ = value; - } - onChanged(); - } else { - if (reqOneofCase_ == 3) { - nextBuilder_.mergeFrom(value); - } - nextBuilder_.setMessage(value); - } - reqOneofCase_ = 3; - return this; - } - /** - *
-       * The next handshake request message.
-       * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - public Builder clearNext() { - if (nextBuilder_ == null) { - if (reqOneofCase_ == 3) { - reqOneofCase_ = 0; - reqOneof_ = null; - onChanged(); - } - } else { - if (reqOneofCase_ == 3) { - reqOneofCase_ = 0; - reqOneof_ = null; - } - nextBuilder_.clear(); - } - return this; - } - /** - *
-       * The next handshake request message.
-       * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - public io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.Builder getNextBuilder() { - return getNextFieldBuilder().getBuilder(); - } - /** - *
-       * The next handshake request message.
-       * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - public io.grpc.alts.internal.Handshaker.NextHandshakeMessageReqOrBuilder getNextOrBuilder() { - if ((reqOneofCase_ == 3) && (nextBuilder_ != null)) { - return nextBuilder_.getMessageOrBuilder(); - } else { - if (reqOneofCase_ == 3) { - return (io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq) reqOneof_; - } - return io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.getDefaultInstance(); - } - } - /** - *
-       * The next handshake request message.
-       * 
- * - * .grpc.gcp.NextHandshakeMessageReq next = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq, io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.Builder, io.grpc.alts.internal.Handshaker.NextHandshakeMessageReqOrBuilder> - getNextFieldBuilder() { - if (nextBuilder_ == null) { - if (!(reqOneofCase_ == 3)) { - reqOneof_ = io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.getDefaultInstance(); - } - nextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq, io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq.Builder, io.grpc.alts.internal.Handshaker.NextHandshakeMessageReqOrBuilder>( - (io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq) reqOneof_, - getParentForChildren(), - isClean()); - reqOneof_ = null; - } - reqOneofCase_ = 3; - onChanged();; - return nextBuilder_; - } - 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.HandshakerReq) - } - - // @@protoc_insertion_point(class_scope:grpc.gcp.HandshakerReq) - private static final io.grpc.alts.internal.Handshaker.HandshakerReq DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.Handshaker.HandshakerReq(); - } - - public static io.grpc.alts.internal.Handshaker.HandshakerReq getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public HandshakerReq parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HandshakerReq(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.Handshaker.HandshakerReq getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface HandshakerResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.HandshakerResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The application protocol negotiated for this connection.
-     * 
- * - * string application_protocol = 1; - */ - java.lang.String getApplicationProtocol(); - /** - *
-     * The application protocol negotiated for this connection.
-     * 
- * - * string application_protocol = 1; - */ - com.google.protobuf.ByteString - getApplicationProtocolBytes(); - - /** - *
-     * The record protocol negotiated for this connection.
-     * 
- * - * string record_protocol = 2; - */ - java.lang.String getRecordProtocol(); - /** - *
-     * The record protocol negotiated for this connection.
-     * 
- * - * string record_protocol = 2; - */ - com.google.protobuf.ByteString - getRecordProtocolBytes(); - - /** - *
-     * 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.
-     * 
- * - * bytes key_data = 3; - */ - com.google.protobuf.ByteString getKeyData(); - - /** - *
-     * The authenticated identity of the peer.
-     * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - boolean hasPeerIdentity(); - /** - *
-     * The authenticated identity of the peer.
-     * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - io.grpc.alts.internal.Handshaker.Identity getPeerIdentity(); - /** - *
-     * The authenticated identity of the peer.
-     * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - io.grpc.alts.internal.Handshaker.IdentityOrBuilder getPeerIdentityOrBuilder(); - - /** - *
-     * The local identity used in the handshake.
-     * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - boolean hasLocalIdentity(); - /** - *
-     * The local identity used in the handshake.
-     * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - io.grpc.alts.internal.Handshaker.Identity getLocalIdentity(); - /** - *
-     * The local identity used in the handshake.
-     * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - io.grpc.alts.internal.Handshaker.IdentityOrBuilder getLocalIdentityOrBuilder(); - - /** - *
-     * 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.
-     * 
- * - * bool keep_channel_open = 6; - */ - boolean getKeepChannelOpen(); - - /** - *
-     * The RPC protocol versions supported by the peer.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - boolean hasPeerRpcVersions(); - /** - *
-     * The RPC protocol versions supported by the peer.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getPeerRpcVersions(); - /** - *
-     * The RPC protocol versions supported by the peer.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder(); - } - /** - * Protobuf type {@code grpc.gcp.HandshakerResult} - */ - public static 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.Handshaker.Identity.Builder subBuilder = null; - if (peerIdentity_ != null) { - subBuilder = peerIdentity_.toBuilder(); - } - peerIdentity_ = input.readMessage(io.grpc.alts.internal.Handshaker.Identity.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(peerIdentity_); - peerIdentity_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - io.grpc.alts.internal.Handshaker.Identity.Builder subBuilder = null; - if (localIdentity_ != null) { - subBuilder = localIdentity_.toBuilder(); - } - localIdentity_ = input.readMessage(io.grpc.alts.internal.Handshaker.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.TransportSecurityCommon.RpcProtocolVersions.Builder subBuilder = null; - if (peerRpcVersions_ != null) { - subBuilder = peerRpcVersions_.toBuilder(); - } - peerRpcVersions_ = input.readMessage(io.grpc.alts.internal.TransportSecurityCommon.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.Handshaker.internal_static_grpc_gcp_HandshakerResult_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.HandshakerResult.class, io.grpc.alts.internal.Handshaker.HandshakerResult.Builder.class); - } - - public static final int APPLICATION_PROTOCOL_FIELD_NUMBER = 1; - private volatile java.lang.Object applicationProtocol_; - /** - *
-     * The application protocol negotiated for this connection.
-     * 
- * - * string application_protocol = 1; - */ - 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; - } - } - /** - *
-     * The application protocol negotiated for this connection.
-     * 
- * - * string application_protocol = 1; - */ - 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_; - /** - *
-     * The record protocol negotiated for this connection.
-     * 
- * - * string record_protocol = 2; - */ - 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; - } - } - /** - *
-     * The record protocol negotiated for this connection.
-     * 
- * - * string record_protocol = 2; - */ - 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_; - /** - *
-     * 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.
-     * 
- * - * bytes key_data = 3; - */ - public com.google.protobuf.ByteString getKeyData() { - return keyData_; - } - - public static final int PEER_IDENTITY_FIELD_NUMBER = 4; - private io.grpc.alts.internal.Handshaker.Identity peerIdentity_; - /** - *
-     * The authenticated identity of the peer.
-     * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - public boolean hasPeerIdentity() { - return peerIdentity_ != null; - } - /** - *
-     * The authenticated identity of the peer.
-     * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - public io.grpc.alts.internal.Handshaker.Identity getPeerIdentity() { - return peerIdentity_ == null ? io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance() : peerIdentity_; - } - /** - *
-     * The authenticated identity of the peer.
-     * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - public io.grpc.alts.internal.Handshaker.IdentityOrBuilder getPeerIdentityOrBuilder() { - return getPeerIdentity(); - } - - public static final int LOCAL_IDENTITY_FIELD_NUMBER = 5; - private io.grpc.alts.internal.Handshaker.Identity localIdentity_; - /** - *
-     * The local identity used in the handshake.
-     * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public boolean hasLocalIdentity() { - return localIdentity_ != null; - } - /** - *
-     * The local identity used in the handshake.
-     * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public io.grpc.alts.internal.Handshaker.Identity getLocalIdentity() { - return localIdentity_ == null ? io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance() : localIdentity_; - } - /** - *
-     * The local identity used in the handshake.
-     * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public io.grpc.alts.internal.Handshaker.IdentityOrBuilder getLocalIdentityOrBuilder() { - return getLocalIdentity(); - } - - public static final int KEEP_CHANNEL_OPEN_FIELD_NUMBER = 6; - private boolean keepChannelOpen_; - /** - *
-     * 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.
-     * 
- * - * bool keep_channel_open = 6; - */ - public boolean getKeepChannelOpen() { - return keepChannelOpen_; - } - - public static final int PEER_RPC_VERSIONS_FIELD_NUMBER = 7; - private io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions peerRpcVersions_; - /** - *
-     * The RPC protocol versions supported by the peer.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - public boolean hasPeerRpcVersions() { - return peerRpcVersions_ != null; - } - /** - *
-     * The RPC protocol versions supported by the peer.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getPeerRpcVersions() { - return peerRpcVersions_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_; - } - /** - *
-     * The RPC protocol versions supported by the peer.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - public io.grpc.alts.internal.TransportSecurityCommon.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.Handshaker.HandshakerResult)) { - return super.equals(obj); - } - io.grpc.alts.internal.Handshaker.HandshakerResult other = (io.grpc.alts.internal.Handshaker.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.Handshaker.HandshakerResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.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.Handshaker.HandshakerResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.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.Handshaker.HandshakerResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.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.Handshaker.HandshakerResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.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.Handshaker.HandshakerResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.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.Handshaker.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.Handshaker.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.Handshaker.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 implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.HandshakerResult) - io.grpc.alts.internal.Handshaker.HandshakerResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerResult_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.HandshakerResult.class, io.grpc.alts.internal.Handshaker.HandshakerResult.Builder.class); - } - - // Construct using io.grpc.alts.internal.Handshaker.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.Handshaker.internal_static_grpc_gcp_HandshakerResult_descriptor; - } - - public io.grpc.alts.internal.Handshaker.HandshakerResult getDefaultInstanceForType() { - return io.grpc.alts.internal.Handshaker.HandshakerResult.getDefaultInstance(); - } - - public io.grpc.alts.internal.Handshaker.HandshakerResult build() { - io.grpc.alts.internal.Handshaker.HandshakerResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.Handshaker.HandshakerResult buildPartial() { - io.grpc.alts.internal.Handshaker.HandshakerResult result = new io.grpc.alts.internal.Handshaker.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.Handshaker.HandshakerResult) { - return mergeFrom((io.grpc.alts.internal.Handshaker.HandshakerResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.Handshaker.HandshakerResult other) { - if (other == io.grpc.alts.internal.Handshaker.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.Handshaker.HandshakerResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.Handshaker.HandshakerResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object applicationProtocol_ = ""; - /** - *
-       * The application protocol negotiated for this connection.
-       * 
- * - * string application_protocol = 1; - */ - 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; - } - } - /** - *
-       * The application protocol negotiated for this connection.
-       * 
- * - * string application_protocol = 1; - */ - 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; - } - } - /** - *
-       * The application protocol negotiated for this connection.
-       * 
- * - * string application_protocol = 1; - */ - public Builder setApplicationProtocol( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - applicationProtocol_ = value; - onChanged(); - return this; - } - /** - *
-       * The application protocol negotiated for this connection.
-       * 
- * - * string application_protocol = 1; - */ - public Builder clearApplicationProtocol() { - - applicationProtocol_ = getDefaultInstance().getApplicationProtocol(); - onChanged(); - return this; - } - /** - *
-       * The application protocol negotiated for this connection.
-       * 
- * - * string application_protocol = 1; - */ - 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_ = ""; - /** - *
-       * The record protocol negotiated for this connection.
-       * 
- * - * string record_protocol = 2; - */ - 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; - } - } - /** - *
-       * The record protocol negotiated for this connection.
-       * 
- * - * string record_protocol = 2; - */ - 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; - } - } - /** - *
-       * The record protocol negotiated for this connection.
-       * 
- * - * string record_protocol = 2; - */ - public Builder setRecordProtocol( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - recordProtocol_ = value; - onChanged(); - return this; - } - /** - *
-       * The record protocol negotiated for this connection.
-       * 
- * - * string record_protocol = 2; - */ - public Builder clearRecordProtocol() { - - recordProtocol_ = getDefaultInstance().getRecordProtocol(); - onChanged(); - return this; - } - /** - *
-       * The record protocol negotiated for this connection.
-       * 
- * - * string record_protocol = 2; - */ - 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; - /** - *
-       * 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.
-       * 
- * - * bytes key_data = 3; - */ - public com.google.protobuf.ByteString getKeyData() { - return keyData_; - } - /** - *
-       * 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.
-       * 
- * - * bytes key_data = 3; - */ - public Builder setKeyData(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - keyData_ = value; - onChanged(); - return this; - } - /** - *
-       * 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.
-       * 
- * - * bytes key_data = 3; - */ - public Builder clearKeyData() { - - keyData_ = getDefaultInstance().getKeyData(); - onChanged(); - return this; - } - - private io.grpc.alts.internal.Handshaker.Identity peerIdentity_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder> peerIdentityBuilder_; - /** - *
-       * The authenticated identity of the peer.
-       * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - public boolean hasPeerIdentity() { - return peerIdentityBuilder_ != null || peerIdentity_ != null; - } - /** - *
-       * The authenticated identity of the peer.
-       * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - public io.grpc.alts.internal.Handshaker.Identity getPeerIdentity() { - if (peerIdentityBuilder_ == null) { - return peerIdentity_ == null ? io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance() : peerIdentity_; - } else { - return peerIdentityBuilder_.getMessage(); - } - } - /** - *
-       * The authenticated identity of the peer.
-       * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - public Builder setPeerIdentity(io.grpc.alts.internal.Handshaker.Identity value) { - if (peerIdentityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - peerIdentity_ = value; - onChanged(); - } else { - peerIdentityBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The authenticated identity of the peer.
-       * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - public Builder setPeerIdentity( - io.grpc.alts.internal.Handshaker.Identity.Builder builderForValue) { - if (peerIdentityBuilder_ == null) { - peerIdentity_ = builderForValue.build(); - onChanged(); - } else { - peerIdentityBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The authenticated identity of the peer.
-       * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - public Builder mergePeerIdentity(io.grpc.alts.internal.Handshaker.Identity value) { - if (peerIdentityBuilder_ == null) { - if (peerIdentity_ != null) { - peerIdentity_ = - io.grpc.alts.internal.Handshaker.Identity.newBuilder(peerIdentity_).mergeFrom(value).buildPartial(); - } else { - peerIdentity_ = value; - } - onChanged(); - } else { - peerIdentityBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The authenticated identity of the peer.
-       * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - public Builder clearPeerIdentity() { - if (peerIdentityBuilder_ == null) { - peerIdentity_ = null; - onChanged(); - } else { - peerIdentity_ = null; - peerIdentityBuilder_ = null; - } - - return this; - } - /** - *
-       * The authenticated identity of the peer.
-       * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - public io.grpc.alts.internal.Handshaker.Identity.Builder getPeerIdentityBuilder() { - - onChanged(); - return getPeerIdentityFieldBuilder().getBuilder(); - } - /** - *
-       * The authenticated identity of the peer.
-       * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - public io.grpc.alts.internal.Handshaker.IdentityOrBuilder getPeerIdentityOrBuilder() { - if (peerIdentityBuilder_ != null) { - return peerIdentityBuilder_.getMessageOrBuilder(); - } else { - return peerIdentity_ == null ? - io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance() : peerIdentity_; - } - } - /** - *
-       * The authenticated identity of the peer.
-       * 
- * - * .grpc.gcp.Identity peer_identity = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder> - getPeerIdentityFieldBuilder() { - if (peerIdentityBuilder_ == null) { - peerIdentityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder>( - getPeerIdentity(), - getParentForChildren(), - isClean()); - peerIdentity_ = null; - } - return peerIdentityBuilder_; - } - - private io.grpc.alts.internal.Handshaker.Identity localIdentity_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder> localIdentityBuilder_; - /** - *
-       * The local identity used in the handshake.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public boolean hasLocalIdentity() { - return localIdentityBuilder_ != null || localIdentity_ != null; - } - /** - *
-       * The local identity used in the handshake.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public io.grpc.alts.internal.Handshaker.Identity getLocalIdentity() { - if (localIdentityBuilder_ == null) { - return localIdentity_ == null ? io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance() : localIdentity_; - } else { - return localIdentityBuilder_.getMessage(); - } - } - /** - *
-       * The local identity used in the handshake.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public Builder setLocalIdentity(io.grpc.alts.internal.Handshaker.Identity value) { - if (localIdentityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - localIdentity_ = value; - onChanged(); - } else { - localIdentityBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The local identity used in the handshake.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public Builder setLocalIdentity( - io.grpc.alts.internal.Handshaker.Identity.Builder builderForValue) { - if (localIdentityBuilder_ == null) { - localIdentity_ = builderForValue.build(); - onChanged(); - } else { - localIdentityBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The local identity used in the handshake.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public Builder mergeLocalIdentity(io.grpc.alts.internal.Handshaker.Identity value) { - if (localIdentityBuilder_ == null) { - if (localIdentity_ != null) { - localIdentity_ = - io.grpc.alts.internal.Handshaker.Identity.newBuilder(localIdentity_).mergeFrom(value).buildPartial(); - } else { - localIdentity_ = value; - } - onChanged(); - } else { - localIdentityBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The local identity used in the handshake.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public Builder clearLocalIdentity() { - if (localIdentityBuilder_ == null) { - localIdentity_ = null; - onChanged(); - } else { - localIdentity_ = null; - localIdentityBuilder_ = null; - } - - return this; - } - /** - *
-       * The local identity used in the handshake.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public io.grpc.alts.internal.Handshaker.Identity.Builder getLocalIdentityBuilder() { - - onChanged(); - return getLocalIdentityFieldBuilder().getBuilder(); - } - /** - *
-       * The local identity used in the handshake.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - public io.grpc.alts.internal.Handshaker.IdentityOrBuilder getLocalIdentityOrBuilder() { - if (localIdentityBuilder_ != null) { - return localIdentityBuilder_.getMessageOrBuilder(); - } else { - return localIdentity_ == null ? - io.grpc.alts.internal.Handshaker.Identity.getDefaultInstance() : localIdentity_; - } - } - /** - *
-       * The local identity used in the handshake.
-       * 
- * - * .grpc.gcp.Identity local_identity = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder> - getLocalIdentityFieldBuilder() { - if (localIdentityBuilder_ == null) { - localIdentityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.Identity, io.grpc.alts.internal.Handshaker.Identity.Builder, io.grpc.alts.internal.Handshaker.IdentityOrBuilder>( - getLocalIdentity(), - getParentForChildren(), - isClean()); - localIdentity_ = null; - } - return localIdentityBuilder_; - } - - private boolean keepChannelOpen_ ; - /** - *
-       * 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.
-       * 
- * - * bool keep_channel_open = 6; - */ - public boolean getKeepChannelOpen() { - return keepChannelOpen_; - } - /** - *
-       * 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.
-       * 
- * - * bool keep_channel_open = 6; - */ - public Builder setKeepChannelOpen(boolean value) { - - keepChannelOpen_ = value; - onChanged(); - return this; - } - /** - *
-       * 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.
-       * 
- * - * bool keep_channel_open = 6; - */ - public Builder clearKeepChannelOpen() { - - keepChannelOpen_ = false; - onChanged(); - return this; - } - - private io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions peerRpcVersions_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder> peerRpcVersionsBuilder_; - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - public boolean hasPeerRpcVersions() { - return peerRpcVersionsBuilder_ != null || peerRpcVersions_ != null; - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getPeerRpcVersions() { - if (peerRpcVersionsBuilder_ == null) { - return peerRpcVersions_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_; - } else { - return peerRpcVersionsBuilder_.getMessage(); - } - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - public Builder setPeerRpcVersions(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions value) { - if (peerRpcVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - peerRpcVersions_ = value; - onChanged(); - } else { - peerRpcVersionsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - public Builder setPeerRpcVersions( - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder builderForValue) { - if (peerRpcVersionsBuilder_ == null) { - peerRpcVersions_ = builderForValue.build(); - onChanged(); - } else { - peerRpcVersionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - public Builder mergePeerRpcVersions(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions value) { - if (peerRpcVersionsBuilder_ == null) { - if (peerRpcVersions_ != null) { - peerRpcVersions_ = - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.newBuilder(peerRpcVersions_).mergeFrom(value).buildPartial(); - } else { - peerRpcVersions_ = value; - } - onChanged(); - } else { - peerRpcVersionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - public Builder clearPeerRpcVersions() { - if (peerRpcVersionsBuilder_ == null) { - peerRpcVersions_ = null; - onChanged(); - } else { - peerRpcVersions_ = null; - peerRpcVersionsBuilder_ = null; - } - - return this; - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder getPeerRpcVersionsBuilder() { - - onChanged(); - return getPeerRpcVersionsFieldBuilder().getBuilder(); - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder() { - if (peerRpcVersionsBuilder_ != null) { - return peerRpcVersionsBuilder_.getMessageOrBuilder(); - } else { - return peerRpcVersions_ == null ? - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_; - } - } - /** - *
-       * The RPC protocol versions supported by the peer.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder> - getPeerRpcVersionsFieldBuilder() { - if (peerRpcVersionsBuilder_ == null) { - peerRpcVersionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder, io.grpc.alts.internal.TransportSecurityCommon.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.Handshaker.HandshakerResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.Handshaker.HandshakerResult(); - } - - public static io.grpc.alts.internal.Handshaker.HandshakerResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - 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 parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.Handshaker.HandshakerResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface HandshakerStatusOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.HandshakerStatus) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The status code. This could be the gRPC status code.
-     * 
- * - * uint32 code = 1; - */ - int getCode(); - - /** - *
-     * The status details.
-     * 
- * - * string details = 2; - */ - java.lang.String getDetails(); - /** - *
-     * The status details.
-     * 
- * - * string details = 2; - */ - com.google.protobuf.ByteString - getDetailsBytes(); - } - /** - * Protobuf type {@code grpc.gcp.HandshakerStatus} - */ - public static final class HandshakerStatus extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gcp.HandshakerStatus) - HandshakerStatusOrBuilder { - private static final long serialVersionUID = 0L; - // Use HandshakerStatus.newBuilder() to construct. - private HandshakerStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HandshakerStatus() { - code_ = 0; - details_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HandshakerStatus( - 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 8: { - - code_ = input.readUInt32(); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - details_ = s; - 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.Handshaker.internal_static_grpc_gcp_HandshakerStatus_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.HandshakerStatus.class, io.grpc.alts.internal.Handshaker.HandshakerStatus.Builder.class); - } - - public static final int CODE_FIELD_NUMBER = 1; - private int code_; - /** - *
-     * The status code. This could be the gRPC status code.
-     * 
- * - * uint32 code = 1; - */ - public int getCode() { - return code_; - } - - public static final int DETAILS_FIELD_NUMBER = 2; - private volatile java.lang.Object details_; - /** - *
-     * The status details.
-     * 
- * - * string details = 2; - */ - public java.lang.String getDetails() { - java.lang.Object ref = details_; - 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(); - details_ = s; - return s; - } - } - /** - *
-     * The status details.
-     * 
- * - * string details = 2; - */ - public com.google.protobuf.ByteString - getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (code_ != 0) { - output.writeUInt32(1, code_); - } - if (!getDetailsBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, details_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (code_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, code_); - } - if (!getDetailsBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_); - } - 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.Handshaker.HandshakerStatus)) { - return super.equals(obj); - } - io.grpc.alts.internal.Handshaker.HandshakerStatus other = (io.grpc.alts.internal.Handshaker.HandshakerStatus) obj; - - boolean result = true; - result = result && (getCode() - == other.getCode()); - result = result && getDetails() - .equals(other.getDetails()); - 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) + CODE_FIELD_NUMBER; - hash = (53 * hash) + getCode(); - hash = (37 * hash) + DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDetails().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grpc.alts.internal.Handshaker.HandshakerStatus parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.HandshakerStatus 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.Handshaker.HandshakerStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.HandshakerStatus 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.Handshaker.HandshakerStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.HandshakerStatus parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grpc.alts.internal.Handshaker.HandshakerStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.HandshakerStatus 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.Handshaker.HandshakerStatus parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.HandshakerStatus 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.Handshaker.HandshakerStatus parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.HandshakerStatus 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.Handshaker.HandshakerStatus 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.HandshakerStatus} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.HandshakerStatus) - io.grpc.alts.internal.Handshaker.HandshakerStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerStatus_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.HandshakerStatus.class, io.grpc.alts.internal.Handshaker.HandshakerStatus.Builder.class); - } - - // Construct using io.grpc.alts.internal.Handshaker.HandshakerStatus.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(); - code_ = 0; - - details_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerStatus_descriptor; - } - - public io.grpc.alts.internal.Handshaker.HandshakerStatus getDefaultInstanceForType() { - return io.grpc.alts.internal.Handshaker.HandshakerStatus.getDefaultInstance(); - } - - public io.grpc.alts.internal.Handshaker.HandshakerStatus build() { - io.grpc.alts.internal.Handshaker.HandshakerStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.Handshaker.HandshakerStatus buildPartial() { - io.grpc.alts.internal.Handshaker.HandshakerStatus result = new io.grpc.alts.internal.Handshaker.HandshakerStatus(this); - result.code_ = code_; - result.details_ = details_; - 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.Handshaker.HandshakerStatus) { - return mergeFrom((io.grpc.alts.internal.Handshaker.HandshakerStatus)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.Handshaker.HandshakerStatus other) { - if (other == io.grpc.alts.internal.Handshaker.HandshakerStatus.getDefaultInstance()) return this; - if (other.getCode() != 0) { - setCode(other.getCode()); - } - if (!other.getDetails().isEmpty()) { - details_ = other.details_; - onChanged(); - } - 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.Handshaker.HandshakerStatus parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.Handshaker.HandshakerStatus) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int code_ ; - /** - *
-       * The status code. This could be the gRPC status code.
-       * 
- * - * uint32 code = 1; - */ - public int getCode() { - return code_; - } - /** - *
-       * The status code. This could be the gRPC status code.
-       * 
- * - * uint32 code = 1; - */ - public Builder setCode(int value) { - - code_ = value; - onChanged(); - return this; - } - /** - *
-       * The status code. This could be the gRPC status code.
-       * 
- * - * uint32 code = 1; - */ - public Builder clearCode() { - - code_ = 0; - onChanged(); - return this; - } - - private java.lang.Object details_ = ""; - /** - *
-       * The status details.
-       * 
- * - * string details = 2; - */ - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The status details.
-       * 
- * - * string details = 2; - */ - public com.google.protobuf.ByteString - getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The status details.
-       * 
- * - * string details = 2; - */ - public Builder setDetails( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - details_ = value; - onChanged(); - return this; - } - /** - *
-       * The status details.
-       * 
- * - * string details = 2; - */ - public Builder clearDetails() { - - details_ = getDefaultInstance().getDetails(); - onChanged(); - return this; - } - /** - *
-       * The status details.
-       * 
- * - * string details = 2; - */ - public Builder setDetailsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - details_ = value; - onChanged(); - return this; - } - 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.HandshakerStatus) - } - - // @@protoc_insertion_point(class_scope:grpc.gcp.HandshakerStatus) - private static final io.grpc.alts.internal.Handshaker.HandshakerStatus DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.Handshaker.HandshakerStatus(); - } - - public static io.grpc.alts.internal.Handshaker.HandshakerStatus getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public HandshakerStatus parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HandshakerStatus(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.Handshaker.HandshakerStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface HandshakerRespOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.HandshakerResp) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Frames to be given to the peer for the NextHandshakeMessageReq. May be
-     * empty if no out_frames have to be sent to the peer or if in_bytes in the
-     * HandshakerReq are incomplete. All the non-empty out frames must be sent to
-     * the peer even if the handshaker status is not OK as these frames may
-     * contain the alert frames.
-     * 
- * - * bytes out_frames = 1; - */ - com.google.protobuf.ByteString getOutFrames(); - - /** - *
-     * Number of bytes in the in_bytes consumed by the handshaker. It is possible
-     * that part of in_bytes in HandshakerReq was unrelated to the handshake
-     * process.
-     * 
- * - * uint32 bytes_consumed = 2; - */ - int getBytesConsumed(); - - /** - *
-     * This is set iff the handshake was successful. out_frames may still be set
-     * to frames that needs to be forwarded to the peer.
-     * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - boolean hasResult(); - /** - *
-     * This is set iff the handshake was successful. out_frames may still be set
-     * to frames that needs to be forwarded to the peer.
-     * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - io.grpc.alts.internal.Handshaker.HandshakerResult getResult(); - /** - *
-     * This is set iff the handshake was successful. out_frames may still be set
-     * to frames that needs to be forwarded to the peer.
-     * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - io.grpc.alts.internal.Handshaker.HandshakerResultOrBuilder getResultOrBuilder(); - - /** - *
-     * Status of the handshaker.
-     * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - boolean hasStatus(); - /** - *
-     * Status of the handshaker.
-     * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - io.grpc.alts.internal.Handshaker.HandshakerStatus getStatus(); - /** - *
-     * Status of the handshaker.
-     * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - io.grpc.alts.internal.Handshaker.HandshakerStatusOrBuilder getStatusOrBuilder(); - } - /** - * Protobuf type {@code grpc.gcp.HandshakerResp} - */ - public static final class HandshakerResp extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gcp.HandshakerResp) - HandshakerRespOrBuilder { - private static final long serialVersionUID = 0L; - // Use HandshakerResp.newBuilder() to construct. - private HandshakerResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HandshakerResp() { - outFrames_ = com.google.protobuf.ByteString.EMPTY; - bytesConsumed_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HandshakerResp( - 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: { - - outFrames_ = input.readBytes(); - break; - } - case 16: { - - bytesConsumed_ = input.readUInt32(); - break; - } - case 26: { - io.grpc.alts.internal.Handshaker.HandshakerResult.Builder subBuilder = null; - if (result_ != null) { - subBuilder = result_.toBuilder(); - } - result_ = input.readMessage(io.grpc.alts.internal.Handshaker.HandshakerResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(result_); - result_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - io.grpc.alts.internal.Handshaker.HandshakerStatus.Builder subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = input.readMessage(io.grpc.alts.internal.Handshaker.HandshakerStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(status_); - status_ = 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.Handshaker.internal_static_grpc_gcp_HandshakerResp_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerResp_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.HandshakerResp.class, io.grpc.alts.internal.Handshaker.HandshakerResp.Builder.class); - } - - public static final int OUT_FRAMES_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString outFrames_; - /** - *
-     * Frames to be given to the peer for the NextHandshakeMessageReq. May be
-     * empty if no out_frames have to be sent to the peer or if in_bytes in the
-     * HandshakerReq are incomplete. All the non-empty out frames must be sent to
-     * the peer even if the handshaker status is not OK as these frames may
-     * contain the alert frames.
-     * 
- * - * bytes out_frames = 1; - */ - public com.google.protobuf.ByteString getOutFrames() { - return outFrames_; - } - - public static final int BYTES_CONSUMED_FIELD_NUMBER = 2; - private int bytesConsumed_; - /** - *
-     * Number of bytes in the in_bytes consumed by the handshaker. It is possible
-     * that part of in_bytes in HandshakerReq was unrelated to the handshake
-     * process.
-     * 
- * - * uint32 bytes_consumed = 2; - */ - public int getBytesConsumed() { - return bytesConsumed_; - } - - public static final int RESULT_FIELD_NUMBER = 3; - private io.grpc.alts.internal.Handshaker.HandshakerResult result_; - /** - *
-     * This is set iff the handshake was successful. out_frames may still be set
-     * to frames that needs to be forwarded to the peer.
-     * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - public boolean hasResult() { - return result_ != null; - } - /** - *
-     * This is set iff the handshake was successful. out_frames may still be set
-     * to frames that needs to be forwarded to the peer.
-     * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - public io.grpc.alts.internal.Handshaker.HandshakerResult getResult() { - return result_ == null ? io.grpc.alts.internal.Handshaker.HandshakerResult.getDefaultInstance() : result_; - } - /** - *
-     * This is set iff the handshake was successful. out_frames may still be set
-     * to frames that needs to be forwarded to the peer.
-     * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - public io.grpc.alts.internal.Handshaker.HandshakerResultOrBuilder getResultOrBuilder() { - return getResult(); - } - - public static final int STATUS_FIELD_NUMBER = 4; - private io.grpc.alts.internal.Handshaker.HandshakerStatus status_; - /** - *
-     * Status of the handshaker.
-     * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - public boolean hasStatus() { - return status_ != null; - } - /** - *
-     * Status of the handshaker.
-     * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - public io.grpc.alts.internal.Handshaker.HandshakerStatus getStatus() { - return status_ == null ? io.grpc.alts.internal.Handshaker.HandshakerStatus.getDefaultInstance() : status_; - } - /** - *
-     * Status of the handshaker.
-     * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - public io.grpc.alts.internal.Handshaker.HandshakerStatusOrBuilder getStatusOrBuilder() { - return getStatus(); - } - - 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 (!outFrames_.isEmpty()) { - output.writeBytes(1, outFrames_); - } - if (bytesConsumed_ != 0) { - output.writeUInt32(2, bytesConsumed_); - } - if (result_ != null) { - output.writeMessage(3, getResult()); - } - if (status_ != null) { - output.writeMessage(4, getStatus()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!outFrames_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, outFrames_); - } - if (bytesConsumed_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, bytesConsumed_); - } - if (result_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getResult()); - } - if (status_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getStatus()); - } - 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.Handshaker.HandshakerResp)) { - return super.equals(obj); - } - io.grpc.alts.internal.Handshaker.HandshakerResp other = (io.grpc.alts.internal.Handshaker.HandshakerResp) obj; - - boolean result = true; - result = result && getOutFrames() - .equals(other.getOutFrames()); - result = result && (getBytesConsumed() - == other.getBytesConsumed()); - result = result && (hasResult() == other.hasResult()); - if (hasResult()) { - result = result && getResult() - .equals(other.getResult()); - } - result = result && (hasStatus() == other.hasStatus()); - if (hasStatus()) { - result = result && getStatus() - .equals(other.getStatus()); - } - 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) + OUT_FRAMES_FIELD_NUMBER; - hash = (53 * hash) + getOutFrames().hashCode(); - hash = (37 * hash) + BYTES_CONSUMED_FIELD_NUMBER; - hash = (53 * hash) + getBytesConsumed(); - if (hasResult()) { - hash = (37 * hash) + RESULT_FIELD_NUMBER; - hash = (53 * hash) + getResult().hashCode(); - } - if (hasStatus()) { - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + getStatus().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grpc.alts.internal.Handshaker.HandshakerResp parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.HandshakerResp 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.Handshaker.HandshakerResp parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.HandshakerResp 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.Handshaker.HandshakerResp parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.Handshaker.HandshakerResp parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grpc.alts.internal.Handshaker.HandshakerResp parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.HandshakerResp 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.Handshaker.HandshakerResp parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.HandshakerResp 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.Handshaker.HandshakerResp parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.Handshaker.HandshakerResp 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.Handshaker.HandshakerResp 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.HandshakerResp} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.HandshakerResp) - io.grpc.alts.internal.Handshaker.HandshakerRespOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerResp_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerResp_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.Handshaker.HandshakerResp.class, io.grpc.alts.internal.Handshaker.HandshakerResp.Builder.class); - } - - // Construct using io.grpc.alts.internal.Handshaker.HandshakerResp.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(); - outFrames_ = com.google.protobuf.ByteString.EMPTY; - - bytesConsumed_ = 0; - - if (resultBuilder_ == null) { - result_ = null; - } else { - result_ = null; - resultBuilder_ = null; - } - if (statusBuilder_ == null) { - status_ = null; - } else { - status_ = null; - statusBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grpc.alts.internal.Handshaker.internal_static_grpc_gcp_HandshakerResp_descriptor; - } - - public io.grpc.alts.internal.Handshaker.HandshakerResp getDefaultInstanceForType() { - return io.grpc.alts.internal.Handshaker.HandshakerResp.getDefaultInstance(); - } - - public io.grpc.alts.internal.Handshaker.HandshakerResp build() { - io.grpc.alts.internal.Handshaker.HandshakerResp result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.Handshaker.HandshakerResp buildPartial() { - io.grpc.alts.internal.Handshaker.HandshakerResp result = new io.grpc.alts.internal.Handshaker.HandshakerResp(this); - result.outFrames_ = outFrames_; - result.bytesConsumed_ = bytesConsumed_; - if (resultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = resultBuilder_.build(); - } - if (statusBuilder_ == null) { - result.status_ = status_; - } else { - result.status_ = statusBuilder_.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.Handshaker.HandshakerResp) { - return mergeFrom((io.grpc.alts.internal.Handshaker.HandshakerResp)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.Handshaker.HandshakerResp other) { - if (other == io.grpc.alts.internal.Handshaker.HandshakerResp.getDefaultInstance()) return this; - if (other.getOutFrames() != com.google.protobuf.ByteString.EMPTY) { - setOutFrames(other.getOutFrames()); - } - if (other.getBytesConsumed() != 0) { - setBytesConsumed(other.getBytesConsumed()); - } - if (other.hasResult()) { - mergeResult(other.getResult()); - } - if (other.hasStatus()) { - mergeStatus(other.getStatus()); - } - 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.Handshaker.HandshakerResp parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.Handshaker.HandshakerResp) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.ByteString outFrames_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-       * Frames to be given to the peer for the NextHandshakeMessageReq. May be
-       * empty if no out_frames have to be sent to the peer or if in_bytes in the
-       * HandshakerReq are incomplete. All the non-empty out frames must be sent to
-       * the peer even if the handshaker status is not OK as these frames may
-       * contain the alert frames.
-       * 
- * - * bytes out_frames = 1; - */ - public com.google.protobuf.ByteString getOutFrames() { - return outFrames_; - } - /** - *
-       * Frames to be given to the peer for the NextHandshakeMessageReq. May be
-       * empty if no out_frames have to be sent to the peer or if in_bytes in the
-       * HandshakerReq are incomplete. All the non-empty out frames must be sent to
-       * the peer even if the handshaker status is not OK as these frames may
-       * contain the alert frames.
-       * 
- * - * bytes out_frames = 1; - */ - public Builder setOutFrames(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - outFrames_ = value; - onChanged(); - return this; - } - /** - *
-       * Frames to be given to the peer for the NextHandshakeMessageReq. May be
-       * empty if no out_frames have to be sent to the peer or if in_bytes in the
-       * HandshakerReq are incomplete. All the non-empty out frames must be sent to
-       * the peer even if the handshaker status is not OK as these frames may
-       * contain the alert frames.
-       * 
- * - * bytes out_frames = 1; - */ - public Builder clearOutFrames() { - - outFrames_ = getDefaultInstance().getOutFrames(); - onChanged(); - return this; - } - - private int bytesConsumed_ ; - /** - *
-       * Number of bytes in the in_bytes consumed by the handshaker. It is possible
-       * that part of in_bytes in HandshakerReq was unrelated to the handshake
-       * process.
-       * 
- * - * uint32 bytes_consumed = 2; - */ - public int getBytesConsumed() { - return bytesConsumed_; - } - /** - *
-       * Number of bytes in the in_bytes consumed by the handshaker. It is possible
-       * that part of in_bytes in HandshakerReq was unrelated to the handshake
-       * process.
-       * 
- * - * uint32 bytes_consumed = 2; - */ - public Builder setBytesConsumed(int value) { - - bytesConsumed_ = value; - onChanged(); - return this; - } - /** - *
-       * Number of bytes in the in_bytes consumed by the handshaker. It is possible
-       * that part of in_bytes in HandshakerReq was unrelated to the handshake
-       * process.
-       * 
- * - * uint32 bytes_consumed = 2; - */ - public Builder clearBytesConsumed() { - - bytesConsumed_ = 0; - onChanged(); - return this; - } - - private io.grpc.alts.internal.Handshaker.HandshakerResult result_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.HandshakerResult, io.grpc.alts.internal.Handshaker.HandshakerResult.Builder, io.grpc.alts.internal.Handshaker.HandshakerResultOrBuilder> resultBuilder_; - /** - *
-       * This is set iff the handshake was successful. out_frames may still be set
-       * to frames that needs to be forwarded to the peer.
-       * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - public boolean hasResult() { - return resultBuilder_ != null || result_ != null; - } - /** - *
-       * This is set iff the handshake was successful. out_frames may still be set
-       * to frames that needs to be forwarded to the peer.
-       * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - public io.grpc.alts.internal.Handshaker.HandshakerResult getResult() { - if (resultBuilder_ == null) { - return result_ == null ? io.grpc.alts.internal.Handshaker.HandshakerResult.getDefaultInstance() : result_; - } else { - return resultBuilder_.getMessage(); - } - } - /** - *
-       * This is set iff the handshake was successful. out_frames may still be set
-       * to frames that needs to be forwarded to the peer.
-       * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - public Builder setResult(io.grpc.alts.internal.Handshaker.HandshakerResult value) { - if (resultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - resultBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * This is set iff the handshake was successful. out_frames may still be set
-       * to frames that needs to be forwarded to the peer.
-       * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - public Builder setResult( - io.grpc.alts.internal.Handshaker.HandshakerResult.Builder builderForValue) { - if (resultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - resultBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * This is set iff the handshake was successful. out_frames may still be set
-       * to frames that needs to be forwarded to the peer.
-       * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - public Builder mergeResult(io.grpc.alts.internal.Handshaker.HandshakerResult value) { - if (resultBuilder_ == null) { - if (result_ != null) { - result_ = - io.grpc.alts.internal.Handshaker.HandshakerResult.newBuilder(result_).mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - resultBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * This is set iff the handshake was successful. out_frames may still be set
-       * to frames that needs to be forwarded to the peer.
-       * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - public Builder clearResult() { - if (resultBuilder_ == null) { - result_ = null; - onChanged(); - } else { - result_ = null; - resultBuilder_ = null; - } - - return this; - } - /** - *
-       * This is set iff the handshake was successful. out_frames may still be set
-       * to frames that needs to be forwarded to the peer.
-       * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - public io.grpc.alts.internal.Handshaker.HandshakerResult.Builder getResultBuilder() { - - onChanged(); - return getResultFieldBuilder().getBuilder(); - } - /** - *
-       * This is set iff the handshake was successful. out_frames may still be set
-       * to frames that needs to be forwarded to the peer.
-       * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - public io.grpc.alts.internal.Handshaker.HandshakerResultOrBuilder getResultOrBuilder() { - if (resultBuilder_ != null) { - return resultBuilder_.getMessageOrBuilder(); - } else { - return result_ == null ? - io.grpc.alts.internal.Handshaker.HandshakerResult.getDefaultInstance() : result_; - } - } - /** - *
-       * This is set iff the handshake was successful. out_frames may still be set
-       * to frames that needs to be forwarded to the peer.
-       * 
- * - * .grpc.gcp.HandshakerResult result = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.HandshakerResult, io.grpc.alts.internal.Handshaker.HandshakerResult.Builder, io.grpc.alts.internal.Handshaker.HandshakerResultOrBuilder> - getResultFieldBuilder() { - if (resultBuilder_ == null) { - resultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.HandshakerResult, io.grpc.alts.internal.Handshaker.HandshakerResult.Builder, io.grpc.alts.internal.Handshaker.HandshakerResultOrBuilder>( - getResult(), - getParentForChildren(), - isClean()); - result_ = null; - } - return resultBuilder_; - } - - private io.grpc.alts.internal.Handshaker.HandshakerStatus status_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.HandshakerStatus, io.grpc.alts.internal.Handshaker.HandshakerStatus.Builder, io.grpc.alts.internal.Handshaker.HandshakerStatusOrBuilder> statusBuilder_; - /** - *
-       * Status of the handshaker.
-       * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - public boolean hasStatus() { - return statusBuilder_ != null || status_ != null; - } - /** - *
-       * Status of the handshaker.
-       * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - public io.grpc.alts.internal.Handshaker.HandshakerStatus getStatus() { - if (statusBuilder_ == null) { - return status_ == null ? io.grpc.alts.internal.Handshaker.HandshakerStatus.getDefaultInstance() : status_; - } else { - return statusBuilder_.getMessage(); - } - } - /** - *
-       * Status of the handshaker.
-       * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - public Builder setStatus(io.grpc.alts.internal.Handshaker.HandshakerStatus value) { - if (statusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - status_ = value; - onChanged(); - } else { - statusBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Status of the handshaker.
-       * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - public Builder setStatus( - io.grpc.alts.internal.Handshaker.HandshakerStatus.Builder builderForValue) { - if (statusBuilder_ == null) { - status_ = builderForValue.build(); - onChanged(); - } else { - statusBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Status of the handshaker.
-       * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - public Builder mergeStatus(io.grpc.alts.internal.Handshaker.HandshakerStatus value) { - if (statusBuilder_ == null) { - if (status_ != null) { - status_ = - io.grpc.alts.internal.Handshaker.HandshakerStatus.newBuilder(status_).mergeFrom(value).buildPartial(); - } else { - status_ = value; - } - onChanged(); - } else { - statusBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Status of the handshaker.
-       * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - public Builder clearStatus() { - if (statusBuilder_ == null) { - status_ = null; - onChanged(); - } else { - status_ = null; - statusBuilder_ = null; - } - - return this; - } - /** - *
-       * Status of the handshaker.
-       * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - public io.grpc.alts.internal.Handshaker.HandshakerStatus.Builder getStatusBuilder() { - - onChanged(); - return getStatusFieldBuilder().getBuilder(); - } - /** - *
-       * Status of the handshaker.
-       * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - public io.grpc.alts.internal.Handshaker.HandshakerStatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); - } else { - return status_ == null ? - io.grpc.alts.internal.Handshaker.HandshakerStatus.getDefaultInstance() : status_; - } - } - /** - *
-       * Status of the handshaker.
-       * 
- * - * .grpc.gcp.HandshakerStatus status = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.HandshakerStatus, io.grpc.alts.internal.Handshaker.HandshakerStatus.Builder, io.grpc.alts.internal.Handshaker.HandshakerStatusOrBuilder> - getStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.Handshaker.HandshakerStatus, io.grpc.alts.internal.Handshaker.HandshakerStatus.Builder, io.grpc.alts.internal.Handshaker.HandshakerStatusOrBuilder>( - getStatus(), - getParentForChildren(), - isClean()); - status_ = null; - } - return statusBuilder_; - } - 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.HandshakerResp) - } - - // @@protoc_insertion_point(class_scope:grpc.gcp.HandshakerResp) - private static final io.grpc.alts.internal.Handshaker.HandshakerResp DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.Handshaker.HandshakerResp(); - } - - public static io.grpc.alts.internal.Handshaker.HandshakerResp getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public HandshakerResp parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HandshakerResp(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.Handshaker.HandshakerResp getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_Endpoint_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_Endpoint_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_Identity_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_Identity_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_Identity_AttributesEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_Identity_AttributesEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_StartClientHandshakeReq_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_StartClientHandshakeReq_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_ServerHandshakeParameters_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_ServerHandshakeParameters_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_StartServerHandshakeReq_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_StartServerHandshakeReq_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_NextHandshakeMessageReq_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_HandshakerReq_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_HandshakerReq_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_HandshakerResult_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_HandshakerResult_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_HandshakerStatus_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_HandshakerStatus_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_HandshakerResp_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_HandshakerResp_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\031grpc/gcp/handshaker.proto\022\010grpc.gcp\032(g" + - "rpc/gcp/transport_security_common.proto\"" + - "Y\n\010Endpoint\022\022\n\nip_address\030\001 \001(\t\022\014\n\004port\030" + - "\002 \001(\005\022+\n\010protocol\030\003 \001(\0162\031.grpc.gcp.Netwo" + - "rkProtocol\"\266\001\n\010Identity\022\031\n\017service_accou" + - "nt\030\001 \001(\tH\000\022\022\n\010hostname\030\002 \001(\tH\000\0226\n\nattrib" + - "utes\030\003 \003(\0132\".grpc.gcp.Identity.Attribute" + - "sEntry\0321\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t\022\r" + - "\n\005value\030\002 \001(\t:\0028\001B\020\n\016identity_oneof\"\222\003\n\027" + - "StartClientHandshakeReq\022@\n\033handshake_sec" + - "urity_protocol\030\001 \001(\0162\033.grpc.gcp.Handshak" + - "eProtocol\022\035\n\025application_protocols\030\002 \003(\t" + - "\022\030\n\020record_protocols\030\003 \003(\t\022-\n\021target_ide" + - "ntities\030\004 \003(\0132\022.grpc.gcp.Identity\022*\n\016loc" + - "al_identity\030\005 \001(\0132\022.grpc.gcp.Identity\022*\n" + - "\016local_endpoint\030\006 \001(\0132\022.grpc.gcp.Endpoin" + - "t\022+\n\017remote_endpoint\030\007 \001(\0132\022.grpc.gcp.En" + - "dpoint\022\023\n\013target_name\030\010 \001(\t\0223\n\014rpc_versi" + - "ons\030\t \001(\0132\035.grpc.gcp.RpcProtocolVersions" + - "\"c\n\031ServerHandshakeParameters\022\030\n\020record_" + - "protocols\030\001 \003(\t\022,\n\020local_identities\030\002 \003(" + - "\0132\022.grpc.gcp.Identity\"\223\003\n\027StartServerHan" + - "dshakeReq\022\035\n\025application_protocols\030\001 \003(\t" + - "\022X\n\024handshake_parameters\030\002 \003(\0132:.grpc.gc" + - "p.StartServerHandshakeReq.HandshakeParam" + - "etersEntry\022\020\n\010in_bytes\030\003 \001(\014\022*\n\016local_en" + - "dpoint\030\004 \001(\0132\022.grpc.gcp.Endpoint\022+\n\017remo" + - "te_endpoint\030\005 \001(\0132\022.grpc.gcp.Endpoint\0223\n" + - "\014rpc_versions\030\006 \001(\0132\035.grpc.gcp.RpcProtoc" + - "olVersions\032_\n\030HandshakeParametersEntry\022\013" + - "\n\003key\030\001 \001(\005\0222\n\005value\030\002 \001(\0132#.grpc.gcp.Se" + - "rverHandshakeParameters:\0028\001\"+\n\027NextHands" + - "hakeMessageReq\022\020\n\010in_bytes\030\001 \001(\014\"\305\001\n\rHan" + - "dshakerReq\0229\n\014client_start\030\001 \001(\0132!.grpc." + - "gcp.StartClientHandshakeReqH\000\0229\n\014server_" + - "start\030\002 \001(\0132!.grpc.gcp.StartServerHandsh" + - "akeReqH\000\0221\n\004next\030\003 \001(\0132!.grpc.gcp.NextHa" + - "ndshakeMessageReqH\000B\013\n\treq_oneof\"\207\002\n\020Han" + - "dshakerResult\022\034\n\024application_protocol\030\001 " + - "\001(\t\022\027\n\017record_protocol\030\002 \001(\t\022\020\n\010key_data" + - "\030\003 \001(\014\022)\n\rpeer_identity\030\004 \001(\0132\022.grpc.gcp" + - ".Identity\022*\n\016local_identity\030\005 \001(\0132\022.grpc" + - ".gcp.Identity\022\031\n\021keep_channel_open\030\006 \001(\010" + - "\0228\n\021peer_rpc_versions\030\007 \001(\0132\035.grpc.gcp.R" + - "pcProtocolVersions\"1\n\020HandshakerStatus\022\014" + - "\n\004code\030\001 \001(\r\022\017\n\007details\030\002 \001(\t\"\224\001\n\016Handsh" + - "akerResp\022\022\n\nout_frames\030\001 \001(\014\022\026\n\016bytes_co" + - "nsumed\030\002 \001(\r\022*\n\006result\030\003 \001(\0132\032.grpc.gcp." + - "HandshakerResult\022*\n\006status\030\004 \001(\0132\032.grpc." + - "gcp.HandshakerStatus*J\n\021HandshakeProtoco" + - "l\022\"\n\036HANDSHAKE_PROTOCOL_UNSPECIFIED\020\000\022\007\n" + - "\003TLS\020\001\022\010\n\004ALTS\020\002*E\n\017NetworkProtocol\022 \n\034N" + - "ETWORK_PROTOCOL_UNSPECIFIED\020\000\022\007\n\003TCP\020\001\022\007" + - "\n\003UDP\020\0022[\n\021HandshakerService\022F\n\013DoHandsh" + - "ake\022\027.grpc.gcp.HandshakerReq\032\030.grpc.gcp." + - "HandshakerResp\"\000(\0010\001B\027\n\025io.grpc.alts.int" + - "ernalb\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.grpc.alts.internal.TransportSecurityCommon.getDescriptor(), - }, assigner); - internal_static_grpc_gcp_Endpoint_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grpc_gcp_Endpoint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_Endpoint_descriptor, - new java.lang.String[] { "IpAddress", "Port", "Protocol", }); - internal_static_grpc_gcp_Identity_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grpc_gcp_Identity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_Identity_descriptor, - new java.lang.String[] { "ServiceAccount", "Hostname", "Attributes", "IdentityOneof", }); - internal_static_grpc_gcp_Identity_AttributesEntry_descriptor = - internal_static_grpc_gcp_Identity_descriptor.getNestedTypes().get(0); - internal_static_grpc_gcp_Identity_AttributesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_Identity_AttributesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gcp_StartClientHandshakeReq_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grpc_gcp_StartClientHandshakeReq_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_StartClientHandshakeReq_descriptor, - new java.lang.String[] { "HandshakeSecurityProtocol", "ApplicationProtocols", "RecordProtocols", "TargetIdentities", "LocalIdentity", "LocalEndpoint", "RemoteEndpoint", "TargetName", "RpcVersions", }); - internal_static_grpc_gcp_ServerHandshakeParameters_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grpc_gcp_ServerHandshakeParameters_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_ServerHandshakeParameters_descriptor, - new java.lang.String[] { "RecordProtocols", "LocalIdentities", }); - internal_static_grpc_gcp_StartServerHandshakeReq_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_grpc_gcp_StartServerHandshakeReq_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_StartServerHandshakeReq_descriptor, - new java.lang.String[] { "ApplicationProtocols", "HandshakeParameters", "InBytes", "LocalEndpoint", "RemoteEndpoint", "RpcVersions", }); - internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_descriptor = - internal_static_grpc_gcp_StartServerHandshakeReq_descriptor.getNestedTypes().get(0); - internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_grpc_gcp_NextHandshakeMessageReq_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor, - new java.lang.String[] { "InBytes", }); - internal_static_grpc_gcp_HandshakerReq_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_grpc_gcp_HandshakerReq_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_HandshakerReq_descriptor, - new java.lang.String[] { "ClientStart", "ServerStart", "Next", "ReqOneof", }); - internal_static_grpc_gcp_HandshakerResult_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_grpc_gcp_HandshakerResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_HandshakerResult_descriptor, - new java.lang.String[] { "ApplicationProtocol", "RecordProtocol", "KeyData", "PeerIdentity", "LocalIdentity", "KeepChannelOpen", "PeerRpcVersions", }); - internal_static_grpc_gcp_HandshakerStatus_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_grpc_gcp_HandshakerStatus_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_HandshakerStatus_descriptor, - new java.lang.String[] { "Code", "Details", }); - internal_static_grpc_gcp_HandshakerResp_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_grpc_gcp_HandshakerResp_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_HandshakerResp_descriptor, - new java.lang.String[] { "OutFrames", "BytesConsumed", "Result", "Status", }); - io.grpc.alts.internal.TransportSecurityCommon.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerProto.java b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerProto.java new file mode 100644 index 0000000000..60ffa51a73 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerProto.java @@ -0,0 +1,235 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +public final class HandshakerProto { + private HandshakerProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_Endpoint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_Endpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_Identity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_Identity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_Identity_AttributesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_Identity_AttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_StartClientHandshakeReq_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_StartClientHandshakeReq_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_ServerHandshakeParameters_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_ServerHandshakeParameters_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_StartServerHandshakeReq_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_StartServerHandshakeReq_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_NextHandshakeMessageReq_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_HandshakerReq_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_HandshakerReq_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_HandshakerResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_HandshakerResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_HandshakerStatus_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_HandshakerStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_HandshakerResp_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_HandshakerResp_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031grpc/gcp/handshaker.proto\022\010grpc.gcp\032(g" + + "rpc/gcp/transport_security_common.proto\"" + + "Y\n\010Endpoint\022\022\n\nip_address\030\001 \001(\t\022\014\n\004port\030" + + "\002 \001(\005\022+\n\010protocol\030\003 \001(\0162\031.grpc.gcp.Netwo" + + "rkProtocol\"\266\001\n\010Identity\022\031\n\017service_accou" + + "nt\030\001 \001(\tH\000\022\022\n\010hostname\030\002 \001(\tH\000\0226\n\nattrib" + + "utes\030\003 \003(\0132\".grpc.gcp.Identity.Attribute" + + "sEntry\0321\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001B\020\n\016identity_oneof\"\222\003\n\027" + + "StartClientHandshakeReq\022@\n\033handshake_sec" + + "urity_protocol\030\001 \001(\0162\033.grpc.gcp.Handshak" + + "eProtocol\022\035\n\025application_protocols\030\002 \003(\t" + + "\022\030\n\020record_protocols\030\003 \003(\t\022-\n\021target_ide" + + "ntities\030\004 \003(\0132\022.grpc.gcp.Identity\022*\n\016loc" + + "al_identity\030\005 \001(\0132\022.grpc.gcp.Identity\022*\n" + + "\016local_endpoint\030\006 \001(\0132\022.grpc.gcp.Endpoin" + + "t\022+\n\017remote_endpoint\030\007 \001(\0132\022.grpc.gcp.En" + + "dpoint\022\023\n\013target_name\030\010 \001(\t\0223\n\014rpc_versi" + + "ons\030\t \001(\0132\035.grpc.gcp.RpcProtocolVersions" + + "\"c\n\031ServerHandshakeParameters\022\030\n\020record_" + + "protocols\030\001 \003(\t\022,\n\020local_identities\030\002 \003(" + + "\0132\022.grpc.gcp.Identity\"\223\003\n\027StartServerHan" + + "dshakeReq\022\035\n\025application_protocols\030\001 \003(\t" + + "\022X\n\024handshake_parameters\030\002 \003(\0132:.grpc.gc" + + "p.StartServerHandshakeReq.HandshakeParam" + + "etersEntry\022\020\n\010in_bytes\030\003 \001(\014\022*\n\016local_en" + + "dpoint\030\004 \001(\0132\022.grpc.gcp.Endpoint\022+\n\017remo" + + "te_endpoint\030\005 \001(\0132\022.grpc.gcp.Endpoint\0223\n" + + "\014rpc_versions\030\006 \001(\0132\035.grpc.gcp.RpcProtoc" + + "olVersions\032_\n\030HandshakeParametersEntry\022\013" + + "\n\003key\030\001 \001(\005\0222\n\005value\030\002 \001(\0132#.grpc.gcp.Se" + + "rverHandshakeParameters:\0028\001\"+\n\027NextHands" + + "hakeMessageReq\022\020\n\010in_bytes\030\001 \001(\014\"\305\001\n\rHan" + + "dshakerReq\0229\n\014client_start\030\001 \001(\0132!.grpc." + + "gcp.StartClientHandshakeReqH\000\0229\n\014server_" + + "start\030\002 \001(\0132!.grpc.gcp.StartServerHandsh" + + "akeReqH\000\0221\n\004next\030\003 \001(\0132!.grpc.gcp.NextHa" + + "ndshakeMessageReqH\000B\013\n\treq_oneof\"\207\002\n\020Han" + + "dshakerResult\022\034\n\024application_protocol\030\001 " + + "\001(\t\022\027\n\017record_protocol\030\002 \001(\t\022\020\n\010key_data" + + "\030\003 \001(\014\022)\n\rpeer_identity\030\004 \001(\0132\022.grpc.gcp" + + ".Identity\022*\n\016local_identity\030\005 \001(\0132\022.grpc" + + ".gcp.Identity\022\031\n\021keep_channel_open\030\006 \001(\010" + + "\0228\n\021peer_rpc_versions\030\007 \001(\0132\035.grpc.gcp.R" + + "pcProtocolVersions\"1\n\020HandshakerStatus\022\014" + + "\n\004code\030\001 \001(\r\022\017\n\007details\030\002 \001(\t\"\224\001\n\016Handsh" + + "akerResp\022\022\n\nout_frames\030\001 \001(\014\022\026\n\016bytes_co" + + "nsumed\030\002 \001(\r\022*\n\006result\030\003 \001(\0132\032.grpc.gcp." + + "HandshakerResult\022*\n\006status\030\004 \001(\0132\032.grpc." + + "gcp.HandshakerStatus*J\n\021HandshakeProtoco" + + "l\022\"\n\036HANDSHAKE_PROTOCOL_UNSPECIFIED\020\000\022\007\n" + + "\003TLS\020\001\022\010\n\004ALTS\020\002*E\n\017NetworkProtocol\022 \n\034N" + + "ETWORK_PROTOCOL_UNSPECIFIED\020\000\022\007\n\003TCP\020\001\022\007" + + "\n\003UDP\020\0022[\n\021HandshakerService\022F\n\013DoHandsh" + + "ake\022\027.grpc.gcp.HandshakerReq\032\030.grpc.gcp." + + "HandshakerResp\"\000(\0010\001Bk\n\025io.grpc.alts.int" + + "ernalB\017HandshakerProtoP\001Z?google.golang." + + "org/grpc/credentials/alts/internal/proto" + + "/grpc_gcpb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.grpc.alts.internal.TransportSecurityCommonProto.getDescriptor(), + }, assigner); + internal_static_grpc_gcp_Endpoint_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grpc_gcp_Endpoint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_Endpoint_descriptor, + new java.lang.String[] { "IpAddress", "Port", "Protocol", }); + internal_static_grpc_gcp_Identity_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grpc_gcp_Identity_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_Identity_descriptor, + new java.lang.String[] { "ServiceAccount", "Hostname", "Attributes", "IdentityOneof", }); + internal_static_grpc_gcp_Identity_AttributesEntry_descriptor = + internal_static_grpc_gcp_Identity_descriptor.getNestedTypes().get(0); + internal_static_grpc_gcp_Identity_AttributesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_Identity_AttributesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gcp_StartClientHandshakeReq_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grpc_gcp_StartClientHandshakeReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_StartClientHandshakeReq_descriptor, + new java.lang.String[] { "HandshakeSecurityProtocol", "ApplicationProtocols", "RecordProtocols", "TargetIdentities", "LocalIdentity", "LocalEndpoint", "RemoteEndpoint", "TargetName", "RpcVersions", }); + internal_static_grpc_gcp_ServerHandshakeParameters_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grpc_gcp_ServerHandshakeParameters_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_ServerHandshakeParameters_descriptor, + new java.lang.String[] { "RecordProtocols", "LocalIdentities", }); + internal_static_grpc_gcp_StartServerHandshakeReq_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grpc_gcp_StartServerHandshakeReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_StartServerHandshakeReq_descriptor, + new java.lang.String[] { "ApplicationProtocols", "HandshakeParameters", "InBytes", "LocalEndpoint", "RemoteEndpoint", "RpcVersions", }); + internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_descriptor = + internal_static_grpc_gcp_StartServerHandshakeReq_descriptor.getNestedTypes().get(0); + internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_grpc_gcp_NextHandshakeMessageReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor, + new java.lang.String[] { "InBytes", }); + internal_static_grpc_gcp_HandshakerReq_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_grpc_gcp_HandshakerReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_HandshakerReq_descriptor, + new java.lang.String[] { "ClientStart", "ServerStart", "Next", "ReqOneof", }); + internal_static_grpc_gcp_HandshakerResult_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_grpc_gcp_HandshakerResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_HandshakerResult_descriptor, + new java.lang.String[] { "ApplicationProtocol", "RecordProtocol", "KeyData", "PeerIdentity", "LocalIdentity", "KeepChannelOpen", "PeerRpcVersions", }); + internal_static_grpc_gcp_HandshakerStatus_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_grpc_gcp_HandshakerStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_HandshakerStatus_descriptor, + new java.lang.String[] { "Code", "Details", }); + internal_static_grpc_gcp_HandshakerResp_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_grpc_gcp_HandshakerResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_HandshakerResp_descriptor, + new java.lang.String[] { "OutFrames", "BytesConsumed", "Result", "Status", }); + io.grpc.alts.internal.TransportSecurityCommonProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerReq.java b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerReq.java new file mode 100644 index 0000000000..57ab28351d --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerReq.java @@ -0,0 +1,1213 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +/** + * Protobuf type {@code grpc.gcp.HandshakerReq} + */ +public final class HandshakerReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gcp.HandshakerReq) + HandshakerReqOrBuilder { +private static final long serialVersionUID = 0L; + // Use HandshakerReq.newBuilder() to construct. + private HandshakerReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HandshakerReq() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HandshakerReq( + 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: { + io.grpc.alts.internal.StartClientHandshakeReq.Builder subBuilder = null; + if (reqOneofCase_ == 1) { + subBuilder = ((io.grpc.alts.internal.StartClientHandshakeReq) reqOneof_).toBuilder(); + } + reqOneof_ = + input.readMessage(io.grpc.alts.internal.StartClientHandshakeReq.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.grpc.alts.internal.StartClientHandshakeReq) reqOneof_); + reqOneof_ = subBuilder.buildPartial(); + } + reqOneofCase_ = 1; + break; + } + case 18: { + io.grpc.alts.internal.StartServerHandshakeReq.Builder subBuilder = null; + if (reqOneofCase_ == 2) { + subBuilder = ((io.grpc.alts.internal.StartServerHandshakeReq) reqOneof_).toBuilder(); + } + reqOneof_ = + input.readMessage(io.grpc.alts.internal.StartServerHandshakeReq.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.grpc.alts.internal.StartServerHandshakeReq) reqOneof_); + reqOneof_ = subBuilder.buildPartial(); + } + reqOneofCase_ = 2; + break; + } + case 26: { + io.grpc.alts.internal.NextHandshakeMessageReq.Builder subBuilder = null; + if (reqOneofCase_ == 3) { + subBuilder = ((io.grpc.alts.internal.NextHandshakeMessageReq) reqOneof_).toBuilder(); + } + reqOneof_ = + input.readMessage(io.grpc.alts.internal.NextHandshakeMessageReq.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.grpc.alts.internal.NextHandshakeMessageReq) reqOneof_); + reqOneof_ = subBuilder.buildPartial(); + } + reqOneofCase_ = 3; + 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_HandshakerReq_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.HandshakerReq.class, io.grpc.alts.internal.HandshakerReq.Builder.class); + } + + private int reqOneofCase_ = 0; + private java.lang.Object reqOneof_; + public enum ReqOneofCase + implements com.google.protobuf.Internal.EnumLite { + CLIENT_START(1), + SERVER_START(2), + NEXT(3), + REQONEOF_NOT_SET(0); + private final int value; + private ReqOneofCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ReqOneofCase valueOf(int value) { + return forNumber(value); + } + + public static ReqOneofCase forNumber(int value) { + switch (value) { + case 1: return CLIENT_START; + case 2: return SERVER_START; + case 3: return NEXT; + case 0: return REQONEOF_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ReqOneofCase + getReqOneofCase() { + return ReqOneofCase.forNumber( + reqOneofCase_); + } + + public static final int CLIENT_START_FIELD_NUMBER = 1; + /** + *
+   * The start client handshake request message.
+   * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + public boolean hasClientStart() { + return reqOneofCase_ == 1; + } + /** + *
+   * The start client handshake request message.
+   * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + public io.grpc.alts.internal.StartClientHandshakeReq getClientStart() { + if (reqOneofCase_ == 1) { + return (io.grpc.alts.internal.StartClientHandshakeReq) reqOneof_; + } + return io.grpc.alts.internal.StartClientHandshakeReq.getDefaultInstance(); + } + /** + *
+   * The start client handshake request message.
+   * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + public io.grpc.alts.internal.StartClientHandshakeReqOrBuilder getClientStartOrBuilder() { + if (reqOneofCase_ == 1) { + return (io.grpc.alts.internal.StartClientHandshakeReq) reqOneof_; + } + return io.grpc.alts.internal.StartClientHandshakeReq.getDefaultInstance(); + } + + public static final int SERVER_START_FIELD_NUMBER = 2; + /** + *
+   * The start server handshake request message.
+   * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + public boolean hasServerStart() { + return reqOneofCase_ == 2; + } + /** + *
+   * The start server handshake request message.
+   * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + public io.grpc.alts.internal.StartServerHandshakeReq getServerStart() { + if (reqOneofCase_ == 2) { + return (io.grpc.alts.internal.StartServerHandshakeReq) reqOneof_; + } + return io.grpc.alts.internal.StartServerHandshakeReq.getDefaultInstance(); + } + /** + *
+   * The start server handshake request message.
+   * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + public io.grpc.alts.internal.StartServerHandshakeReqOrBuilder getServerStartOrBuilder() { + if (reqOneofCase_ == 2) { + return (io.grpc.alts.internal.StartServerHandshakeReq) reqOneof_; + } + return io.grpc.alts.internal.StartServerHandshakeReq.getDefaultInstance(); + } + + public static final int NEXT_FIELD_NUMBER = 3; + /** + *
+   * The next handshake request message.
+   * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + public boolean hasNext() { + return reqOneofCase_ == 3; + } + /** + *
+   * The next handshake request message.
+   * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + public io.grpc.alts.internal.NextHandshakeMessageReq getNext() { + if (reqOneofCase_ == 3) { + return (io.grpc.alts.internal.NextHandshakeMessageReq) reqOneof_; + } + return io.grpc.alts.internal.NextHandshakeMessageReq.getDefaultInstance(); + } + /** + *
+   * The next handshake request message.
+   * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + public io.grpc.alts.internal.NextHandshakeMessageReqOrBuilder getNextOrBuilder() { + if (reqOneofCase_ == 3) { + return (io.grpc.alts.internal.NextHandshakeMessageReq) reqOneof_; + } + return io.grpc.alts.internal.NextHandshakeMessageReq.getDefaultInstance(); + } + + 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 (reqOneofCase_ == 1) { + output.writeMessage(1, (io.grpc.alts.internal.StartClientHandshakeReq) reqOneof_); + } + if (reqOneofCase_ == 2) { + output.writeMessage(2, (io.grpc.alts.internal.StartServerHandshakeReq) reqOneof_); + } + if (reqOneofCase_ == 3) { + output.writeMessage(3, (io.grpc.alts.internal.NextHandshakeMessageReq) reqOneof_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (reqOneofCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (io.grpc.alts.internal.StartClientHandshakeReq) reqOneof_); + } + if (reqOneofCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (io.grpc.alts.internal.StartServerHandshakeReq) reqOneof_); + } + if (reqOneofCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (io.grpc.alts.internal.NextHandshakeMessageReq) reqOneof_); + } + 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.HandshakerReq)) { + return super.equals(obj); + } + io.grpc.alts.internal.HandshakerReq other = (io.grpc.alts.internal.HandshakerReq) obj; + + boolean result = true; + result = result && getReqOneofCase().equals( + other.getReqOneofCase()); + if (!result) return false; + switch (reqOneofCase_) { + case 1: + result = result && getClientStart() + .equals(other.getClientStart()); + break; + case 2: + result = result && getServerStart() + .equals(other.getServerStart()); + break; + case 3: + result = result && getNext() + .equals(other.getNext()); + break; + case 0: + default: + } + 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(); + switch (reqOneofCase_) { + case 1: + hash = (37 * hash) + CLIENT_START_FIELD_NUMBER; + hash = (53 * hash) + getClientStart().hashCode(); + break; + case 2: + hash = (37 * hash) + SERVER_START_FIELD_NUMBER; + hash = (53 * hash) + getServerStart().hashCode(); + break; + case 3: + hash = (37 * hash) + NEXT_FIELD_NUMBER; + hash = (53 * hash) + getNext().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.alts.internal.HandshakerReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.HandshakerReq 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.HandshakerReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.HandshakerReq 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.HandshakerReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.HandshakerReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.alts.internal.HandshakerReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.HandshakerReq 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.HandshakerReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.HandshakerReq 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.HandshakerReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.HandshakerReq 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.HandshakerReq 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.HandshakerReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gcp.HandshakerReq) + io.grpc.alts.internal.HandshakerReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerReq_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.HandshakerReq.class, io.grpc.alts.internal.HandshakerReq.Builder.class); + } + + // Construct using io.grpc.alts.internal.HandshakerReq.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(); + reqOneofCase_ = 0; + reqOneof_ = null; + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerReq_descriptor; + } + + public io.grpc.alts.internal.HandshakerReq getDefaultInstanceForType() { + return io.grpc.alts.internal.HandshakerReq.getDefaultInstance(); + } + + public io.grpc.alts.internal.HandshakerReq build() { + io.grpc.alts.internal.HandshakerReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.alts.internal.HandshakerReq buildPartial() { + io.grpc.alts.internal.HandshakerReq result = new io.grpc.alts.internal.HandshakerReq(this); + if (reqOneofCase_ == 1) { + if (clientStartBuilder_ == null) { + result.reqOneof_ = reqOneof_; + } else { + result.reqOneof_ = clientStartBuilder_.build(); + } + } + if (reqOneofCase_ == 2) { + if (serverStartBuilder_ == null) { + result.reqOneof_ = reqOneof_; + } else { + result.reqOneof_ = serverStartBuilder_.build(); + } + } + if (reqOneofCase_ == 3) { + if (nextBuilder_ == null) { + result.reqOneof_ = reqOneof_; + } else { + result.reqOneof_ = nextBuilder_.build(); + } + } + result.reqOneofCase_ = reqOneofCase_; + 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.HandshakerReq) { + return mergeFrom((io.grpc.alts.internal.HandshakerReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.alts.internal.HandshakerReq other) { + if (other == io.grpc.alts.internal.HandshakerReq.getDefaultInstance()) return this; + switch (other.getReqOneofCase()) { + case CLIENT_START: { + mergeClientStart(other.getClientStart()); + break; + } + case SERVER_START: { + mergeServerStart(other.getServerStart()); + break; + } + case NEXT: { + mergeNext(other.getNext()); + break; + } + case REQONEOF_NOT_SET: { + break; + } + } + 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.HandshakerReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.alts.internal.HandshakerReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int reqOneofCase_ = 0; + private java.lang.Object reqOneof_; + public ReqOneofCase + getReqOneofCase() { + return ReqOneofCase.forNumber( + reqOneofCase_); + } + + public Builder clearReqOneof() { + reqOneofCase_ = 0; + reqOneof_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.StartClientHandshakeReq, io.grpc.alts.internal.StartClientHandshakeReq.Builder, io.grpc.alts.internal.StartClientHandshakeReqOrBuilder> clientStartBuilder_; + /** + *
+     * The start client handshake request message.
+     * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + public boolean hasClientStart() { + return reqOneofCase_ == 1; + } + /** + *
+     * The start client handshake request message.
+     * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + public io.grpc.alts.internal.StartClientHandshakeReq getClientStart() { + if (clientStartBuilder_ == null) { + if (reqOneofCase_ == 1) { + return (io.grpc.alts.internal.StartClientHandshakeReq) reqOneof_; + } + return io.grpc.alts.internal.StartClientHandshakeReq.getDefaultInstance(); + } else { + if (reqOneofCase_ == 1) { + return clientStartBuilder_.getMessage(); + } + return io.grpc.alts.internal.StartClientHandshakeReq.getDefaultInstance(); + } + } + /** + *
+     * The start client handshake request message.
+     * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + public Builder setClientStart(io.grpc.alts.internal.StartClientHandshakeReq value) { + if (clientStartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reqOneof_ = value; + onChanged(); + } else { + clientStartBuilder_.setMessage(value); + } + reqOneofCase_ = 1; + return this; + } + /** + *
+     * The start client handshake request message.
+     * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + public Builder setClientStart( + io.grpc.alts.internal.StartClientHandshakeReq.Builder builderForValue) { + if (clientStartBuilder_ == null) { + reqOneof_ = builderForValue.build(); + onChanged(); + } else { + clientStartBuilder_.setMessage(builderForValue.build()); + } + reqOneofCase_ = 1; + return this; + } + /** + *
+     * The start client handshake request message.
+     * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + public Builder mergeClientStart(io.grpc.alts.internal.StartClientHandshakeReq value) { + if (clientStartBuilder_ == null) { + if (reqOneofCase_ == 1 && + reqOneof_ != io.grpc.alts.internal.StartClientHandshakeReq.getDefaultInstance()) { + reqOneof_ = io.grpc.alts.internal.StartClientHandshakeReq.newBuilder((io.grpc.alts.internal.StartClientHandshakeReq) reqOneof_) + .mergeFrom(value).buildPartial(); + } else { + reqOneof_ = value; + } + onChanged(); + } else { + if (reqOneofCase_ == 1) { + clientStartBuilder_.mergeFrom(value); + } + clientStartBuilder_.setMessage(value); + } + reqOneofCase_ = 1; + return this; + } + /** + *
+     * The start client handshake request message.
+     * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + public Builder clearClientStart() { + if (clientStartBuilder_ == null) { + if (reqOneofCase_ == 1) { + reqOneofCase_ = 0; + reqOneof_ = null; + onChanged(); + } + } else { + if (reqOneofCase_ == 1) { + reqOneofCase_ = 0; + reqOneof_ = null; + } + clientStartBuilder_.clear(); + } + return this; + } + /** + *
+     * The start client handshake request message.
+     * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + public io.grpc.alts.internal.StartClientHandshakeReq.Builder getClientStartBuilder() { + return getClientStartFieldBuilder().getBuilder(); + } + /** + *
+     * The start client handshake request message.
+     * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + public io.grpc.alts.internal.StartClientHandshakeReqOrBuilder getClientStartOrBuilder() { + if ((reqOneofCase_ == 1) && (clientStartBuilder_ != null)) { + return clientStartBuilder_.getMessageOrBuilder(); + } else { + if (reqOneofCase_ == 1) { + return (io.grpc.alts.internal.StartClientHandshakeReq) reqOneof_; + } + return io.grpc.alts.internal.StartClientHandshakeReq.getDefaultInstance(); + } + } + /** + *
+     * The start client handshake request message.
+     * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.StartClientHandshakeReq, io.grpc.alts.internal.StartClientHandshakeReq.Builder, io.grpc.alts.internal.StartClientHandshakeReqOrBuilder> + getClientStartFieldBuilder() { + if (clientStartBuilder_ == null) { + if (!(reqOneofCase_ == 1)) { + reqOneof_ = io.grpc.alts.internal.StartClientHandshakeReq.getDefaultInstance(); + } + clientStartBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.StartClientHandshakeReq, io.grpc.alts.internal.StartClientHandshakeReq.Builder, io.grpc.alts.internal.StartClientHandshakeReqOrBuilder>( + (io.grpc.alts.internal.StartClientHandshakeReq) reqOneof_, + getParentForChildren(), + isClean()); + reqOneof_ = null; + } + reqOneofCase_ = 1; + onChanged();; + return clientStartBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.StartServerHandshakeReq, io.grpc.alts.internal.StartServerHandshakeReq.Builder, io.grpc.alts.internal.StartServerHandshakeReqOrBuilder> serverStartBuilder_; + /** + *
+     * The start server handshake request message.
+     * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + public boolean hasServerStart() { + return reqOneofCase_ == 2; + } + /** + *
+     * The start server handshake request message.
+     * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + public io.grpc.alts.internal.StartServerHandshakeReq getServerStart() { + if (serverStartBuilder_ == null) { + if (reqOneofCase_ == 2) { + return (io.grpc.alts.internal.StartServerHandshakeReq) reqOneof_; + } + return io.grpc.alts.internal.StartServerHandshakeReq.getDefaultInstance(); + } else { + if (reqOneofCase_ == 2) { + return serverStartBuilder_.getMessage(); + } + return io.grpc.alts.internal.StartServerHandshakeReq.getDefaultInstance(); + } + } + /** + *
+     * The start server handshake request message.
+     * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + public Builder setServerStart(io.grpc.alts.internal.StartServerHandshakeReq value) { + if (serverStartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reqOneof_ = value; + onChanged(); + } else { + serverStartBuilder_.setMessage(value); + } + reqOneofCase_ = 2; + return this; + } + /** + *
+     * The start server handshake request message.
+     * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + public Builder setServerStart( + io.grpc.alts.internal.StartServerHandshakeReq.Builder builderForValue) { + if (serverStartBuilder_ == null) { + reqOneof_ = builderForValue.build(); + onChanged(); + } else { + serverStartBuilder_.setMessage(builderForValue.build()); + } + reqOneofCase_ = 2; + return this; + } + /** + *
+     * The start server handshake request message.
+     * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + public Builder mergeServerStart(io.grpc.alts.internal.StartServerHandshakeReq value) { + if (serverStartBuilder_ == null) { + if (reqOneofCase_ == 2 && + reqOneof_ != io.grpc.alts.internal.StartServerHandshakeReq.getDefaultInstance()) { + reqOneof_ = io.grpc.alts.internal.StartServerHandshakeReq.newBuilder((io.grpc.alts.internal.StartServerHandshakeReq) reqOneof_) + .mergeFrom(value).buildPartial(); + } else { + reqOneof_ = value; + } + onChanged(); + } else { + if (reqOneofCase_ == 2) { + serverStartBuilder_.mergeFrom(value); + } + serverStartBuilder_.setMessage(value); + } + reqOneofCase_ = 2; + return this; + } + /** + *
+     * The start server handshake request message.
+     * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + public Builder clearServerStart() { + if (serverStartBuilder_ == null) { + if (reqOneofCase_ == 2) { + reqOneofCase_ = 0; + reqOneof_ = null; + onChanged(); + } + } else { + if (reqOneofCase_ == 2) { + reqOneofCase_ = 0; + reqOneof_ = null; + } + serverStartBuilder_.clear(); + } + return this; + } + /** + *
+     * The start server handshake request message.
+     * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + public io.grpc.alts.internal.StartServerHandshakeReq.Builder getServerStartBuilder() { + return getServerStartFieldBuilder().getBuilder(); + } + /** + *
+     * The start server handshake request message.
+     * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + public io.grpc.alts.internal.StartServerHandshakeReqOrBuilder getServerStartOrBuilder() { + if ((reqOneofCase_ == 2) && (serverStartBuilder_ != null)) { + return serverStartBuilder_.getMessageOrBuilder(); + } else { + if (reqOneofCase_ == 2) { + return (io.grpc.alts.internal.StartServerHandshakeReq) reqOneof_; + } + return io.grpc.alts.internal.StartServerHandshakeReq.getDefaultInstance(); + } + } + /** + *
+     * The start server handshake request message.
+     * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.StartServerHandshakeReq, io.grpc.alts.internal.StartServerHandshakeReq.Builder, io.grpc.alts.internal.StartServerHandshakeReqOrBuilder> + getServerStartFieldBuilder() { + if (serverStartBuilder_ == null) { + if (!(reqOneofCase_ == 2)) { + reqOneof_ = io.grpc.alts.internal.StartServerHandshakeReq.getDefaultInstance(); + } + serverStartBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.StartServerHandshakeReq, io.grpc.alts.internal.StartServerHandshakeReq.Builder, io.grpc.alts.internal.StartServerHandshakeReqOrBuilder>( + (io.grpc.alts.internal.StartServerHandshakeReq) reqOneof_, + getParentForChildren(), + isClean()); + reqOneof_ = null; + } + reqOneofCase_ = 2; + onChanged();; + return serverStartBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.NextHandshakeMessageReq, io.grpc.alts.internal.NextHandshakeMessageReq.Builder, io.grpc.alts.internal.NextHandshakeMessageReqOrBuilder> nextBuilder_; + /** + *
+     * The next handshake request message.
+     * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + public boolean hasNext() { + return reqOneofCase_ == 3; + } + /** + *
+     * The next handshake request message.
+     * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + public io.grpc.alts.internal.NextHandshakeMessageReq getNext() { + if (nextBuilder_ == null) { + if (reqOneofCase_ == 3) { + return (io.grpc.alts.internal.NextHandshakeMessageReq) reqOneof_; + } + return io.grpc.alts.internal.NextHandshakeMessageReq.getDefaultInstance(); + } else { + if (reqOneofCase_ == 3) { + return nextBuilder_.getMessage(); + } + return io.grpc.alts.internal.NextHandshakeMessageReq.getDefaultInstance(); + } + } + /** + *
+     * The next handshake request message.
+     * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + public Builder setNext(io.grpc.alts.internal.NextHandshakeMessageReq value) { + if (nextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reqOneof_ = value; + onChanged(); + } else { + nextBuilder_.setMessage(value); + } + reqOneofCase_ = 3; + return this; + } + /** + *
+     * The next handshake request message.
+     * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + public Builder setNext( + io.grpc.alts.internal.NextHandshakeMessageReq.Builder builderForValue) { + if (nextBuilder_ == null) { + reqOneof_ = builderForValue.build(); + onChanged(); + } else { + nextBuilder_.setMessage(builderForValue.build()); + } + reqOneofCase_ = 3; + return this; + } + /** + *
+     * The next handshake request message.
+     * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + public Builder mergeNext(io.grpc.alts.internal.NextHandshakeMessageReq value) { + if (nextBuilder_ == null) { + if (reqOneofCase_ == 3 && + reqOneof_ != io.grpc.alts.internal.NextHandshakeMessageReq.getDefaultInstance()) { + reqOneof_ = io.grpc.alts.internal.NextHandshakeMessageReq.newBuilder((io.grpc.alts.internal.NextHandshakeMessageReq) reqOneof_) + .mergeFrom(value).buildPartial(); + } else { + reqOneof_ = value; + } + onChanged(); + } else { + if (reqOneofCase_ == 3) { + nextBuilder_.mergeFrom(value); + } + nextBuilder_.setMessage(value); + } + reqOneofCase_ = 3; + return this; + } + /** + *
+     * The next handshake request message.
+     * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + public Builder clearNext() { + if (nextBuilder_ == null) { + if (reqOneofCase_ == 3) { + reqOneofCase_ = 0; + reqOneof_ = null; + onChanged(); + } + } else { + if (reqOneofCase_ == 3) { + reqOneofCase_ = 0; + reqOneof_ = null; + } + nextBuilder_.clear(); + } + return this; + } + /** + *
+     * The next handshake request message.
+     * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + public io.grpc.alts.internal.NextHandshakeMessageReq.Builder getNextBuilder() { + return getNextFieldBuilder().getBuilder(); + } + /** + *
+     * The next handshake request message.
+     * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + public io.grpc.alts.internal.NextHandshakeMessageReqOrBuilder getNextOrBuilder() { + if ((reqOneofCase_ == 3) && (nextBuilder_ != null)) { + return nextBuilder_.getMessageOrBuilder(); + } else { + if (reqOneofCase_ == 3) { + return (io.grpc.alts.internal.NextHandshakeMessageReq) reqOneof_; + } + return io.grpc.alts.internal.NextHandshakeMessageReq.getDefaultInstance(); + } + } + /** + *
+     * The next handshake request message.
+     * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.NextHandshakeMessageReq, io.grpc.alts.internal.NextHandshakeMessageReq.Builder, io.grpc.alts.internal.NextHandshakeMessageReqOrBuilder> + getNextFieldBuilder() { + if (nextBuilder_ == null) { + if (!(reqOneofCase_ == 3)) { + reqOneof_ = io.grpc.alts.internal.NextHandshakeMessageReq.getDefaultInstance(); + } + nextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.NextHandshakeMessageReq, io.grpc.alts.internal.NextHandshakeMessageReq.Builder, io.grpc.alts.internal.NextHandshakeMessageReqOrBuilder>( + (io.grpc.alts.internal.NextHandshakeMessageReq) reqOneof_, + getParentForChildren(), + isClean()); + reqOneof_ = null; + } + reqOneofCase_ = 3; + onChanged();; + return nextBuilder_; + } + 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.HandshakerReq) + } + + // @@protoc_insertion_point(class_scope:grpc.gcp.HandshakerReq) + private static final io.grpc.alts.internal.HandshakerReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.alts.internal.HandshakerReq(); + } + + public static io.grpc.alts.internal.HandshakerReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HandshakerReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HandshakerReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.HandshakerReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerReqOrBuilder.java b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerReqOrBuilder.java new file mode 100644 index 0000000000..5dedca8a73 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerReqOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +public interface HandshakerReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.HandshakerReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The start client handshake request message.
+   * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + boolean hasClientStart(); + /** + *
+   * The start client handshake request message.
+   * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + io.grpc.alts.internal.StartClientHandshakeReq getClientStart(); + /** + *
+   * The start client handshake request message.
+   * 
+ * + * .grpc.gcp.StartClientHandshakeReq client_start = 1; + */ + io.grpc.alts.internal.StartClientHandshakeReqOrBuilder getClientStartOrBuilder(); + + /** + *
+   * The start server handshake request message.
+   * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + boolean hasServerStart(); + /** + *
+   * The start server handshake request message.
+   * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + io.grpc.alts.internal.StartServerHandshakeReq getServerStart(); + /** + *
+   * The start server handshake request message.
+   * 
+ * + * .grpc.gcp.StartServerHandshakeReq server_start = 2; + */ + io.grpc.alts.internal.StartServerHandshakeReqOrBuilder getServerStartOrBuilder(); + + /** + *
+   * The next handshake request message.
+   * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + boolean hasNext(); + /** + *
+   * The next handshake request message.
+   * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + io.grpc.alts.internal.NextHandshakeMessageReq getNext(); + /** + *
+   * The next handshake request message.
+   * 
+ * + * .grpc.gcp.NextHandshakeMessageReq next = 3; + */ + io.grpc.alts.internal.NextHandshakeMessageReqOrBuilder getNextOrBuilder(); + + public io.grpc.alts.internal.HandshakerReq.ReqOneofCase getReqOneofCase(); +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerResp.java b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerResp.java new file mode 100644 index 0000000000..483e5da688 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerResp.java @@ -0,0 +1,1034 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +/** + * Protobuf type {@code grpc.gcp.HandshakerResp} + */ +public final class HandshakerResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gcp.HandshakerResp) + HandshakerRespOrBuilder { +private static final long serialVersionUID = 0L; + // Use HandshakerResp.newBuilder() to construct. + private HandshakerResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HandshakerResp() { + outFrames_ = com.google.protobuf.ByteString.EMPTY; + bytesConsumed_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HandshakerResp( + 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: { + + outFrames_ = input.readBytes(); + break; + } + case 16: { + + bytesConsumed_ = input.readUInt32(); + break; + } + case 26: { + io.grpc.alts.internal.HandshakerResult.Builder subBuilder = null; + if (result_ != null) { + subBuilder = result_.toBuilder(); + } + result_ = input.readMessage(io.grpc.alts.internal.HandshakerResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(result_); + result_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + io.grpc.alts.internal.HandshakerStatus.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(io.grpc.alts.internal.HandshakerStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = 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_HandshakerResp_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.HandshakerResp.class, io.grpc.alts.internal.HandshakerResp.Builder.class); + } + + public static final int OUT_FRAMES_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString outFrames_; + /** + *
+   * Frames to be given to the peer for the NextHandshakeMessageReq. May be
+   * empty if no out_frames have to be sent to the peer or if in_bytes in the
+   * HandshakerReq are incomplete. All the non-empty out frames must be sent to
+   * the peer even if the handshaker status is not OK as these frames may
+   * contain the alert frames.
+   * 
+ * + * bytes out_frames = 1; + */ + public com.google.protobuf.ByteString getOutFrames() { + return outFrames_; + } + + public static final int BYTES_CONSUMED_FIELD_NUMBER = 2; + private int bytesConsumed_; + /** + *
+   * Number of bytes in the in_bytes consumed by the handshaker. It is possible
+   * that part of in_bytes in HandshakerReq was unrelated to the handshake
+   * process.
+   * 
+ * + * uint32 bytes_consumed = 2; + */ + public int getBytesConsumed() { + return bytesConsumed_; + } + + public static final int RESULT_FIELD_NUMBER = 3; + private io.grpc.alts.internal.HandshakerResult result_; + /** + *
+   * This is set iff the handshake was successful. out_frames may still be set
+   * to frames that needs to be forwarded to the peer.
+   * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + public boolean hasResult() { + return result_ != null; + } + /** + *
+   * This is set iff the handshake was successful. out_frames may still be set
+   * to frames that needs to be forwarded to the peer.
+   * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + public io.grpc.alts.internal.HandshakerResult getResult() { + return result_ == null ? io.grpc.alts.internal.HandshakerResult.getDefaultInstance() : result_; + } + /** + *
+   * This is set iff the handshake was successful. out_frames may still be set
+   * to frames that needs to be forwarded to the peer.
+   * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + public io.grpc.alts.internal.HandshakerResultOrBuilder getResultOrBuilder() { + return getResult(); + } + + public static final int STATUS_FIELD_NUMBER = 4; + private io.grpc.alts.internal.HandshakerStatus status_; + /** + *
+   * Status of the handshaker.
+   * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + public boolean hasStatus() { + return status_ != null; + } + /** + *
+   * Status of the handshaker.
+   * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + public io.grpc.alts.internal.HandshakerStatus getStatus() { + return status_ == null ? io.grpc.alts.internal.HandshakerStatus.getDefaultInstance() : status_; + } + /** + *
+   * Status of the handshaker.
+   * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + public io.grpc.alts.internal.HandshakerStatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + 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 (!outFrames_.isEmpty()) { + output.writeBytes(1, outFrames_); + } + if (bytesConsumed_ != 0) { + output.writeUInt32(2, bytesConsumed_); + } + if (result_ != null) { + output.writeMessage(3, getResult()); + } + if (status_ != null) { + output.writeMessage(4, getStatus()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!outFrames_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, outFrames_); + } + if (bytesConsumed_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, bytesConsumed_); + } + if (result_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getResult()); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getStatus()); + } + 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.HandshakerResp)) { + return super.equals(obj); + } + io.grpc.alts.internal.HandshakerResp other = (io.grpc.alts.internal.HandshakerResp) obj; + + boolean result = true; + result = result && getOutFrames() + .equals(other.getOutFrames()); + result = result && (getBytesConsumed() + == other.getBytesConsumed()); + result = result && (hasResult() == other.hasResult()); + if (hasResult()) { + result = result && getResult() + .equals(other.getResult()); + } + result = result && (hasStatus() == other.hasStatus()); + if (hasStatus()) { + result = result && getStatus() + .equals(other.getStatus()); + } + 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) + OUT_FRAMES_FIELD_NUMBER; + hash = (53 * hash) + getOutFrames().hashCode(); + hash = (37 * hash) + BYTES_CONSUMED_FIELD_NUMBER; + hash = (53 * hash) + getBytesConsumed(); + if (hasResult()) { + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.alts.internal.HandshakerResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.HandshakerResp 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.HandshakerResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.HandshakerResp 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.HandshakerResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.HandshakerResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.alts.internal.HandshakerResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.HandshakerResp 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.HandshakerResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.HandshakerResp 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.HandshakerResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.HandshakerResp 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.HandshakerResp 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.HandshakerResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gcp.HandshakerResp) + io.grpc.alts.internal.HandshakerRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerResp_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.HandshakerResp.class, io.grpc.alts.internal.HandshakerResp.Builder.class); + } + + // Construct using io.grpc.alts.internal.HandshakerResp.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(); + outFrames_ = com.google.protobuf.ByteString.EMPTY; + + bytesConsumed_ = 0; + + if (resultBuilder_ == null) { + result_ = null; + } else { + result_ = null; + resultBuilder_ = null; + } + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerResp_descriptor; + } + + public io.grpc.alts.internal.HandshakerResp getDefaultInstanceForType() { + return io.grpc.alts.internal.HandshakerResp.getDefaultInstance(); + } + + public io.grpc.alts.internal.HandshakerResp build() { + io.grpc.alts.internal.HandshakerResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.alts.internal.HandshakerResp buildPartial() { + io.grpc.alts.internal.HandshakerResp result = new io.grpc.alts.internal.HandshakerResp(this); + result.outFrames_ = outFrames_; + result.bytesConsumed_ = bytesConsumed_; + if (resultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = resultBuilder_.build(); + } + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.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.HandshakerResp) { + return mergeFrom((io.grpc.alts.internal.HandshakerResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.alts.internal.HandshakerResp other) { + if (other == io.grpc.alts.internal.HandshakerResp.getDefaultInstance()) return this; + if (other.getOutFrames() != com.google.protobuf.ByteString.EMPTY) { + setOutFrames(other.getOutFrames()); + } + if (other.getBytesConsumed() != 0) { + setBytesConsumed(other.getBytesConsumed()); + } + if (other.hasResult()) { + mergeResult(other.getResult()); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + 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.HandshakerResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.alts.internal.HandshakerResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString outFrames_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Frames to be given to the peer for the NextHandshakeMessageReq. May be
+     * empty if no out_frames have to be sent to the peer or if in_bytes in the
+     * HandshakerReq are incomplete. All the non-empty out frames must be sent to
+     * the peer even if the handshaker status is not OK as these frames may
+     * contain the alert frames.
+     * 
+ * + * bytes out_frames = 1; + */ + public com.google.protobuf.ByteString getOutFrames() { + return outFrames_; + } + /** + *
+     * Frames to be given to the peer for the NextHandshakeMessageReq. May be
+     * empty if no out_frames have to be sent to the peer or if in_bytes in the
+     * HandshakerReq are incomplete. All the non-empty out frames must be sent to
+     * the peer even if the handshaker status is not OK as these frames may
+     * contain the alert frames.
+     * 
+ * + * bytes out_frames = 1; + */ + public Builder setOutFrames(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + outFrames_ = value; + onChanged(); + return this; + } + /** + *
+     * Frames to be given to the peer for the NextHandshakeMessageReq. May be
+     * empty if no out_frames have to be sent to the peer or if in_bytes in the
+     * HandshakerReq are incomplete. All the non-empty out frames must be sent to
+     * the peer even if the handshaker status is not OK as these frames may
+     * contain the alert frames.
+     * 
+ * + * bytes out_frames = 1; + */ + public Builder clearOutFrames() { + + outFrames_ = getDefaultInstance().getOutFrames(); + onChanged(); + return this; + } + + private int bytesConsumed_ ; + /** + *
+     * Number of bytes in the in_bytes consumed by the handshaker. It is possible
+     * that part of in_bytes in HandshakerReq was unrelated to the handshake
+     * process.
+     * 
+ * + * uint32 bytes_consumed = 2; + */ + public int getBytesConsumed() { + return bytesConsumed_; + } + /** + *
+     * Number of bytes in the in_bytes consumed by the handshaker. It is possible
+     * that part of in_bytes in HandshakerReq was unrelated to the handshake
+     * process.
+     * 
+ * + * uint32 bytes_consumed = 2; + */ + public Builder setBytesConsumed(int value) { + + bytesConsumed_ = value; + onChanged(); + return this; + } + /** + *
+     * Number of bytes in the in_bytes consumed by the handshaker. It is possible
+     * that part of in_bytes in HandshakerReq was unrelated to the handshake
+     * process.
+     * 
+ * + * uint32 bytes_consumed = 2; + */ + public Builder clearBytesConsumed() { + + bytesConsumed_ = 0; + onChanged(); + return this; + } + + private io.grpc.alts.internal.HandshakerResult result_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.HandshakerResult, io.grpc.alts.internal.HandshakerResult.Builder, io.grpc.alts.internal.HandshakerResultOrBuilder> resultBuilder_; + /** + *
+     * This is set iff the handshake was successful. out_frames may still be set
+     * to frames that needs to be forwarded to the peer.
+     * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + public boolean hasResult() { + return resultBuilder_ != null || result_ != null; + } + /** + *
+     * This is set iff the handshake was successful. out_frames may still be set
+     * to frames that needs to be forwarded to the peer.
+     * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + public io.grpc.alts.internal.HandshakerResult getResult() { + if (resultBuilder_ == null) { + return result_ == null ? io.grpc.alts.internal.HandshakerResult.getDefaultInstance() : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + *
+     * This is set iff the handshake was successful. out_frames may still be set
+     * to frames that needs to be forwarded to the peer.
+     * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + public Builder setResult(io.grpc.alts.internal.HandshakerResult value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + resultBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * This is set iff the handshake was successful. out_frames may still be set
+     * to frames that needs to be forwarded to the peer.
+     * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + public Builder setResult( + io.grpc.alts.internal.HandshakerResult.Builder builderForValue) { + if (resultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * This is set iff the handshake was successful. out_frames may still be set
+     * to frames that needs to be forwarded to the peer.
+     * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + public Builder mergeResult(io.grpc.alts.internal.HandshakerResult value) { + if (resultBuilder_ == null) { + if (result_ != null) { + result_ = + io.grpc.alts.internal.HandshakerResult.newBuilder(result_).mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + resultBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * This is set iff the handshake was successful. out_frames may still be set
+     * to frames that needs to be forwarded to the peer.
+     * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + public Builder clearResult() { + if (resultBuilder_ == null) { + result_ = null; + onChanged(); + } else { + result_ = null; + resultBuilder_ = null; + } + + return this; + } + /** + *
+     * This is set iff the handshake was successful. out_frames may still be set
+     * to frames that needs to be forwarded to the peer.
+     * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + public io.grpc.alts.internal.HandshakerResult.Builder getResultBuilder() { + + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + *
+     * This is set iff the handshake was successful. out_frames may still be set
+     * to frames that needs to be forwarded to the peer.
+     * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + public io.grpc.alts.internal.HandshakerResultOrBuilder getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null ? + io.grpc.alts.internal.HandshakerResult.getDefaultInstance() : result_; + } + } + /** + *
+     * This is set iff the handshake was successful. out_frames may still be set
+     * to frames that needs to be forwarded to the peer.
+     * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.HandshakerResult, io.grpc.alts.internal.HandshakerResult.Builder, io.grpc.alts.internal.HandshakerResultOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.HandshakerResult, io.grpc.alts.internal.HandshakerResult.Builder, io.grpc.alts.internal.HandshakerResultOrBuilder>( + getResult(), + getParentForChildren(), + isClean()); + result_ = null; + } + return resultBuilder_; + } + + private io.grpc.alts.internal.HandshakerStatus status_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.HandshakerStatus, io.grpc.alts.internal.HandshakerStatus.Builder, io.grpc.alts.internal.HandshakerStatusOrBuilder> statusBuilder_; + /** + *
+     * Status of the handshaker.
+     * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + *
+     * Status of the handshaker.
+     * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + public io.grpc.alts.internal.HandshakerStatus getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? io.grpc.alts.internal.HandshakerStatus.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + *
+     * Status of the handshaker.
+     * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + public Builder setStatus(io.grpc.alts.internal.HandshakerStatus value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Status of the handshaker.
+     * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + public Builder setStatus( + io.grpc.alts.internal.HandshakerStatus.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Status of the handshaker.
+     * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + public Builder mergeStatus(io.grpc.alts.internal.HandshakerStatus value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = + io.grpc.alts.internal.HandshakerStatus.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Status of the handshaker.
+     * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + *
+     * Status of the handshaker.
+     * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + public io.grpc.alts.internal.HandshakerStatus.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + *
+     * Status of the handshaker.
+     * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + public io.grpc.alts.internal.HandshakerStatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? + io.grpc.alts.internal.HandshakerStatus.getDefaultInstance() : status_; + } + } + /** + *
+     * Status of the handshaker.
+     * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.HandshakerStatus, io.grpc.alts.internal.HandshakerStatus.Builder, io.grpc.alts.internal.HandshakerStatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.HandshakerStatus, io.grpc.alts.internal.HandshakerStatus.Builder, io.grpc.alts.internal.HandshakerStatusOrBuilder>( + getStatus(), + getParentForChildren(), + isClean()); + status_ = null; + } + return statusBuilder_; + } + 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.HandshakerResp) + } + + // @@protoc_insertion_point(class_scope:grpc.gcp.HandshakerResp) + private static final io.grpc.alts.internal.HandshakerResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.alts.internal.HandshakerResp(); + } + + public static io.grpc.alts.internal.HandshakerResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HandshakerResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HandshakerResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.HandshakerResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerRespOrBuilder.java b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerRespOrBuilder.java new file mode 100644 index 0000000000..e75909bf17 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerRespOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +public interface HandshakerRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.HandshakerResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Frames to be given to the peer for the NextHandshakeMessageReq. May be
+   * empty if no out_frames have to be sent to the peer or if in_bytes in the
+   * HandshakerReq are incomplete. All the non-empty out frames must be sent to
+   * the peer even if the handshaker status is not OK as these frames may
+   * contain the alert frames.
+   * 
+ * + * bytes out_frames = 1; + */ + com.google.protobuf.ByteString getOutFrames(); + + /** + *
+   * Number of bytes in the in_bytes consumed by the handshaker. It is possible
+   * that part of in_bytes in HandshakerReq was unrelated to the handshake
+   * process.
+   * 
+ * + * uint32 bytes_consumed = 2; + */ + int getBytesConsumed(); + + /** + *
+   * This is set iff the handshake was successful. out_frames may still be set
+   * to frames that needs to be forwarded to the peer.
+   * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + boolean hasResult(); + /** + *
+   * This is set iff the handshake was successful. out_frames may still be set
+   * to frames that needs to be forwarded to the peer.
+   * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + io.grpc.alts.internal.HandshakerResult getResult(); + /** + *
+   * This is set iff the handshake was successful. out_frames may still be set
+   * to frames that needs to be forwarded to the peer.
+   * 
+ * + * .grpc.gcp.HandshakerResult result = 3; + */ + io.grpc.alts.internal.HandshakerResultOrBuilder getResultOrBuilder(); + + /** + *
+   * Status of the handshaker.
+   * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + boolean hasStatus(); + /** + *
+   * Status of the handshaker.
+   * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + io.grpc.alts.internal.HandshakerStatus getStatus(); + /** + *
+   * Status of the handshaker.
+   * 
+ * + * .grpc.gcp.HandshakerStatus status = 4; + */ + io.grpc.alts.internal.HandshakerStatusOrBuilder getStatusOrBuilder(); +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerResult.java b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerResult.java new file mode 100644 index 0000000000..16680c73a3 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerResult.java @@ -0,0 +1,1554 @@ +// 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_; + /** + *
+   * The application protocol negotiated for this connection.
+   * 
+ * + * string application_protocol = 1; + */ + 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; + } + } + /** + *
+   * The application protocol negotiated for this connection.
+   * 
+ * + * string application_protocol = 1; + */ + 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_; + /** + *
+   * The record protocol negotiated for this connection.
+   * 
+ * + * string record_protocol = 2; + */ + 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; + } + } + /** + *
+   * The record protocol negotiated for this connection.
+   * 
+ * + * string record_protocol = 2; + */ + 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_; + /** + *
+   * 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.
+   * 
+ * + * bytes key_data = 3; + */ + public com.google.protobuf.ByteString getKeyData() { + return keyData_; + } + + public static final int PEER_IDENTITY_FIELD_NUMBER = 4; + private io.grpc.alts.internal.Identity peerIdentity_; + /** + *
+   * The authenticated identity of the peer.
+   * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + public boolean hasPeerIdentity() { + return peerIdentity_ != null; + } + /** + *
+   * The authenticated identity of the peer.
+   * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + public io.grpc.alts.internal.Identity getPeerIdentity() { + return peerIdentity_ == null ? io.grpc.alts.internal.Identity.getDefaultInstance() : peerIdentity_; + } + /** + *
+   * The authenticated identity of the peer.
+   * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + 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_; + /** + *
+   * The local identity used in the handshake.
+   * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public boolean hasLocalIdentity() { + return localIdentity_ != null; + } + /** + *
+   * The local identity used in the handshake.
+   * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public io.grpc.alts.internal.Identity getLocalIdentity() { + return localIdentity_ == null ? io.grpc.alts.internal.Identity.getDefaultInstance() : localIdentity_; + } + /** + *
+   * The local identity used in the handshake.
+   * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public io.grpc.alts.internal.IdentityOrBuilder getLocalIdentityOrBuilder() { + return getLocalIdentity(); + } + + public static final int KEEP_CHANNEL_OPEN_FIELD_NUMBER = 6; + private boolean keepChannelOpen_; + /** + *
+   * 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.
+   * 
+ * + * bool keep_channel_open = 6; + */ + public boolean getKeepChannelOpen() { + return keepChannelOpen_; + } + + public static final int PEER_RPC_VERSIONS_FIELD_NUMBER = 7; + private io.grpc.alts.internal.RpcProtocolVersions peerRpcVersions_; + /** + *
+   * The RPC protocol versions supported by the peer.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + public boolean hasPeerRpcVersions() { + return peerRpcVersions_ != null; + } + /** + *
+   * The RPC protocol versions supported by the peer.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + public io.grpc.alts.internal.RpcProtocolVersions getPeerRpcVersions() { + return peerRpcVersions_ == null ? io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_; + } + /** + *
+   * The RPC protocol versions supported by the peer.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + 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 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_ = ""; + /** + *
+     * The application protocol negotiated for this connection.
+     * 
+ * + * string application_protocol = 1; + */ + 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; + } + } + /** + *
+     * The application protocol negotiated for this connection.
+     * 
+ * + * string application_protocol = 1; + */ + 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; + } + } + /** + *
+     * The application protocol negotiated for this connection.
+     * 
+ * + * string application_protocol = 1; + */ + public Builder setApplicationProtocol( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + applicationProtocol_ = value; + onChanged(); + return this; + } + /** + *
+     * The application protocol negotiated for this connection.
+     * 
+ * + * string application_protocol = 1; + */ + public Builder clearApplicationProtocol() { + + applicationProtocol_ = getDefaultInstance().getApplicationProtocol(); + onChanged(); + return this; + } + /** + *
+     * The application protocol negotiated for this connection.
+     * 
+ * + * string application_protocol = 1; + */ + 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_ = ""; + /** + *
+     * The record protocol negotiated for this connection.
+     * 
+ * + * string record_protocol = 2; + */ + 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; + } + } + /** + *
+     * The record protocol negotiated for this connection.
+     * 
+ * + * string record_protocol = 2; + */ + 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; + } + } + /** + *
+     * The record protocol negotiated for this connection.
+     * 
+ * + * string record_protocol = 2; + */ + public Builder setRecordProtocol( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + recordProtocol_ = value; + onChanged(); + return this; + } + /** + *
+     * The record protocol negotiated for this connection.
+     * 
+ * + * string record_protocol = 2; + */ + public Builder clearRecordProtocol() { + + recordProtocol_ = getDefaultInstance().getRecordProtocol(); + onChanged(); + return this; + } + /** + *
+     * The record protocol negotiated for this connection.
+     * 
+ * + * string record_protocol = 2; + */ + 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; + /** + *
+     * 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.
+     * 
+ * + * bytes key_data = 3; + */ + public com.google.protobuf.ByteString getKeyData() { + return keyData_; + } + /** + *
+     * 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.
+     * 
+ * + * bytes key_data = 3; + */ + public Builder setKeyData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + keyData_ = value; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * bytes key_data = 3; + */ + 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_; + /** + *
+     * The authenticated identity of the peer.
+     * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + public boolean hasPeerIdentity() { + return peerIdentityBuilder_ != null || peerIdentity_ != null; + } + /** + *
+     * The authenticated identity of the peer.
+     * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + public io.grpc.alts.internal.Identity getPeerIdentity() { + if (peerIdentityBuilder_ == null) { + return peerIdentity_ == null ? io.grpc.alts.internal.Identity.getDefaultInstance() : peerIdentity_; + } else { + return peerIdentityBuilder_.getMessage(); + } + } + /** + *
+     * The authenticated identity of the peer.
+     * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + 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; + } + /** + *
+     * The authenticated identity of the peer.
+     * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + public Builder setPeerIdentity( + io.grpc.alts.internal.Identity.Builder builderForValue) { + if (peerIdentityBuilder_ == null) { + peerIdentity_ = builderForValue.build(); + onChanged(); + } else { + peerIdentityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The authenticated identity of the peer.
+     * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + 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; + } + /** + *
+     * The authenticated identity of the peer.
+     * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + public Builder clearPeerIdentity() { + if (peerIdentityBuilder_ == null) { + peerIdentity_ = null; + onChanged(); + } else { + peerIdentity_ = null; + peerIdentityBuilder_ = null; + } + + return this; + } + /** + *
+     * The authenticated identity of the peer.
+     * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + public io.grpc.alts.internal.Identity.Builder getPeerIdentityBuilder() { + + onChanged(); + return getPeerIdentityFieldBuilder().getBuilder(); + } + /** + *
+     * The authenticated identity of the peer.
+     * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + public io.grpc.alts.internal.IdentityOrBuilder getPeerIdentityOrBuilder() { + if (peerIdentityBuilder_ != null) { + return peerIdentityBuilder_.getMessageOrBuilder(); + } else { + return peerIdentity_ == null ? + io.grpc.alts.internal.Identity.getDefaultInstance() : peerIdentity_; + } + } + /** + *
+     * The authenticated identity of the peer.
+     * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + 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_; + /** + *
+     * The local identity used in the handshake.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public boolean hasLocalIdentity() { + return localIdentityBuilder_ != null || localIdentity_ != null; + } + /** + *
+     * The local identity used in the handshake.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public io.grpc.alts.internal.Identity getLocalIdentity() { + if (localIdentityBuilder_ == null) { + return localIdentity_ == null ? io.grpc.alts.internal.Identity.getDefaultInstance() : localIdentity_; + } else { + return localIdentityBuilder_.getMessage(); + } + } + /** + *
+     * The local identity used in the handshake.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + 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; + } + /** + *
+     * The local identity used in the handshake.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public Builder setLocalIdentity( + io.grpc.alts.internal.Identity.Builder builderForValue) { + if (localIdentityBuilder_ == null) { + localIdentity_ = builderForValue.build(); + onChanged(); + } else { + localIdentityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The local identity used in the handshake.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + 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; + } + /** + *
+     * The local identity used in the handshake.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public Builder clearLocalIdentity() { + if (localIdentityBuilder_ == null) { + localIdentity_ = null; + onChanged(); + } else { + localIdentity_ = null; + localIdentityBuilder_ = null; + } + + return this; + } + /** + *
+     * The local identity used in the handshake.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public io.grpc.alts.internal.Identity.Builder getLocalIdentityBuilder() { + + onChanged(); + return getLocalIdentityFieldBuilder().getBuilder(); + } + /** + *
+     * The local identity used in the handshake.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public io.grpc.alts.internal.IdentityOrBuilder getLocalIdentityOrBuilder() { + if (localIdentityBuilder_ != null) { + return localIdentityBuilder_.getMessageOrBuilder(); + } else { + return localIdentity_ == null ? + io.grpc.alts.internal.Identity.getDefaultInstance() : localIdentity_; + } + } + /** + *
+     * The local identity used in the handshake.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + 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_ ; + /** + *
+     * 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.
+     * 
+ * + * bool keep_channel_open = 6; + */ + public boolean getKeepChannelOpen() { + return keepChannelOpen_; + } + /** + *
+     * 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.
+     * 
+ * + * bool keep_channel_open = 6; + */ + public Builder setKeepChannelOpen(boolean value) { + + keepChannelOpen_ = value; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * bool keep_channel_open = 6; + */ + 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_; + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + public boolean hasPeerRpcVersions() { + return peerRpcVersionsBuilder_ != null || peerRpcVersions_ != null; + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + public io.grpc.alts.internal.RpcProtocolVersions getPeerRpcVersions() { + if (peerRpcVersionsBuilder_ == null) { + return peerRpcVersions_ == null ? io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_; + } else { + return peerRpcVersionsBuilder_.getMessage(); + } + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + 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; + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + public Builder setPeerRpcVersions( + io.grpc.alts.internal.RpcProtocolVersions.Builder builderForValue) { + if (peerRpcVersionsBuilder_ == null) { + peerRpcVersions_ = builderForValue.build(); + onChanged(); + } else { + peerRpcVersionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + 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; + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + public Builder clearPeerRpcVersions() { + if (peerRpcVersionsBuilder_ == null) { + peerRpcVersions_ = null; + onChanged(); + } else { + peerRpcVersions_ = null; + peerRpcVersionsBuilder_ = null; + } + + return this; + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + public io.grpc.alts.internal.RpcProtocolVersions.Builder getPeerRpcVersionsBuilder() { + + onChanged(); + return getPeerRpcVersionsFieldBuilder().getBuilder(); + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + public io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder() { + if (peerRpcVersionsBuilder_ != null) { + return peerRpcVersionsBuilder_.getMessageOrBuilder(); + } else { + return peerRpcVersions_ == null ? + io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_; + } + } + /** + *
+     * The RPC protocol versions supported by the peer.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + 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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.HandshakerResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerResultOrBuilder.java b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerResultOrBuilder.java new file mode 100644 index 0000000000..fbf0f5d061 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerResultOrBuilder.java @@ -0,0 +1,142 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +public interface HandshakerResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.HandshakerResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The application protocol negotiated for this connection.
+   * 
+ * + * string application_protocol = 1; + */ + java.lang.String getApplicationProtocol(); + /** + *
+   * The application protocol negotiated for this connection.
+   * 
+ * + * string application_protocol = 1; + */ + com.google.protobuf.ByteString + getApplicationProtocolBytes(); + + /** + *
+   * The record protocol negotiated for this connection.
+   * 
+ * + * string record_protocol = 2; + */ + java.lang.String getRecordProtocol(); + /** + *
+   * The record protocol negotiated for this connection.
+   * 
+ * + * string record_protocol = 2; + */ + com.google.protobuf.ByteString + getRecordProtocolBytes(); + + /** + *
+   * 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.
+   * 
+ * + * bytes key_data = 3; + */ + com.google.protobuf.ByteString getKeyData(); + + /** + *
+   * The authenticated identity of the peer.
+   * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + boolean hasPeerIdentity(); + /** + *
+   * The authenticated identity of the peer.
+   * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + io.grpc.alts.internal.Identity getPeerIdentity(); + /** + *
+   * The authenticated identity of the peer.
+   * 
+ * + * .grpc.gcp.Identity peer_identity = 4; + */ + io.grpc.alts.internal.IdentityOrBuilder getPeerIdentityOrBuilder(); + + /** + *
+   * The local identity used in the handshake.
+   * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + boolean hasLocalIdentity(); + /** + *
+   * The local identity used in the handshake.
+   * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + io.grpc.alts.internal.Identity getLocalIdentity(); + /** + *
+   * The local identity used in the handshake.
+   * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + io.grpc.alts.internal.IdentityOrBuilder getLocalIdentityOrBuilder(); + + /** + *
+   * 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.
+   * 
+ * + * bool keep_channel_open = 6; + */ + boolean getKeepChannelOpen(); + + /** + *
+   * The RPC protocol versions supported by the peer.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + boolean hasPeerRpcVersions(); + /** + *
+   * The RPC protocol versions supported by the peer.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + io.grpc.alts.internal.RpcProtocolVersions getPeerRpcVersions(); + /** + *
+   * The RPC protocol versions supported by the peer.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions peer_rpc_versions = 7; + */ + io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder(); +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerStatus.java b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerStatus.java new file mode 100644 index 0000000000..3fd497daf2 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerStatus.java @@ -0,0 +1,618 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +/** + * Protobuf type {@code grpc.gcp.HandshakerStatus} + */ +public final class HandshakerStatus extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gcp.HandshakerStatus) + HandshakerStatusOrBuilder { +private static final long serialVersionUID = 0L; + // Use HandshakerStatus.newBuilder() to construct. + private HandshakerStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HandshakerStatus() { + code_ = 0; + details_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HandshakerStatus( + 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 8: { + + code_ = input.readUInt32(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + details_ = s; + 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_HandshakerStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.HandshakerStatus.class, io.grpc.alts.internal.HandshakerStatus.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_; + /** + *
+   * The status code. This could be the gRPC status code.
+   * 
+ * + * uint32 code = 1; + */ + public int getCode() { + return code_; + } + + public static final int DETAILS_FIELD_NUMBER = 2; + private volatile java.lang.Object details_; + /** + *
+   * The status details.
+   * 
+ * + * string details = 2; + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + 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(); + details_ = s; + return s; + } + } + /** + *
+   * The status details.
+   * 
+ * + * string details = 2; + */ + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (code_ != 0) { + output.writeUInt32(1, code_); + } + if (!getDetailsBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, details_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, code_); + } + if (!getDetailsBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_); + } + 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.HandshakerStatus)) { + return super.equals(obj); + } + io.grpc.alts.internal.HandshakerStatus other = (io.grpc.alts.internal.HandshakerStatus) obj; + + boolean result = true; + result = result && (getCode() + == other.getCode()); + result = result && getDetails() + .equals(other.getDetails()); + 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) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode(); + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.alts.internal.HandshakerStatus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.HandshakerStatus 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.HandshakerStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.HandshakerStatus 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.HandshakerStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.HandshakerStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.alts.internal.HandshakerStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.HandshakerStatus 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.HandshakerStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.HandshakerStatus 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.HandshakerStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.HandshakerStatus 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.HandshakerStatus 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.HandshakerStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gcp.HandshakerStatus) + io.grpc.alts.internal.HandshakerStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.HandshakerStatus.class, io.grpc.alts.internal.HandshakerStatus.Builder.class); + } + + // Construct using io.grpc.alts.internal.HandshakerStatus.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(); + code_ = 0; + + details_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_HandshakerStatus_descriptor; + } + + public io.grpc.alts.internal.HandshakerStatus getDefaultInstanceForType() { + return io.grpc.alts.internal.HandshakerStatus.getDefaultInstance(); + } + + public io.grpc.alts.internal.HandshakerStatus build() { + io.grpc.alts.internal.HandshakerStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.alts.internal.HandshakerStatus buildPartial() { + io.grpc.alts.internal.HandshakerStatus result = new io.grpc.alts.internal.HandshakerStatus(this); + result.code_ = code_; + result.details_ = details_; + 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.HandshakerStatus) { + return mergeFrom((io.grpc.alts.internal.HandshakerStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.alts.internal.HandshakerStatus other) { + if (other == io.grpc.alts.internal.HandshakerStatus.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + onChanged(); + } + 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.HandshakerStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.alts.internal.HandshakerStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int code_ ; + /** + *
+     * The status code. This could be the gRPC status code.
+     * 
+ * + * uint32 code = 1; + */ + public int getCode() { + return code_; + } + /** + *
+     * The status code. This could be the gRPC status code.
+     * 
+ * + * uint32 code = 1; + */ + public Builder setCode(int value) { + + code_ = value; + onChanged(); + return this; + } + /** + *
+     * The status code. This could be the gRPC status code.
+     * 
+ * + * uint32 code = 1; + */ + public Builder clearCode() { + + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + *
+     * The status details.
+     * 
+ * + * string details = 2; + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The status details.
+     * 
+ * + * string details = 2; + */ + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The status details.
+     * 
+ * + * string details = 2; + */ + public Builder setDetails( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + details_ = value; + onChanged(); + return this; + } + /** + *
+     * The status details.
+     * 
+ * + * string details = 2; + */ + public Builder clearDetails() { + + details_ = getDefaultInstance().getDetails(); + onChanged(); + return this; + } + /** + *
+     * The status details.
+     * 
+ * + * string details = 2; + */ + public Builder setDetailsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + details_ = value; + onChanged(); + return this; + } + 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.HandshakerStatus) + } + + // @@protoc_insertion_point(class_scope:grpc.gcp.HandshakerStatus) + private static final io.grpc.alts.internal.HandshakerStatus DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.alts.internal.HandshakerStatus(); + } + + public static io.grpc.alts.internal.HandshakerStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public HandshakerStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HandshakerStatus(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.HandshakerStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerStatusOrBuilder.java b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerStatusOrBuilder.java new file mode 100644 index 0000000000..0ac69753fe --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/HandshakerStatusOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +public interface HandshakerStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.HandshakerStatus) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The status code. This could be the gRPC status code.
+   * 
+ * + * uint32 code = 1; + */ + int getCode(); + + /** + *
+   * The status details.
+   * 
+ * + * string details = 2; + */ + java.lang.String getDetails(); + /** + *
+   * The status details.
+   * 
+ * + * string details = 2; + */ + com.google.protobuf.ByteString + getDetailsBytes(); +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/Identity.java b/alts/src/generated/main/java/io/grpc/alts/internal/Identity.java new file mode 100644 index 0000000000..235bb3366a --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/Identity.java @@ -0,0 +1,1142 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +/** + * Protobuf type {@code grpc.gcp.Identity} + */ +public final class Identity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gcp.Identity) + IdentityOrBuilder { +private static final long serialVersionUID = 0L; + // Use Identity.newBuilder() to construct. + private Identity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Identity() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Identity( + 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(); + identityOneofCase_ = 1; + identityOneof_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + identityOneofCase_ = 2; + identityOneof_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + attributes_ = com.google.protobuf.MapField.newMapField( + AttributesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry + attributes__ = input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + attributes_.getMutableMap().put( + attributes__.getKey(), attributes__.getValue()); + 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_Identity_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetAttributes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.Identity.class, io.grpc.alts.internal.Identity.Builder.class); + } + + private int bitField0_; + private int identityOneofCase_ = 0; + private java.lang.Object identityOneof_; + public enum IdentityOneofCase + implements com.google.protobuf.Internal.EnumLite { + SERVICE_ACCOUNT(1), + HOSTNAME(2), + IDENTITYONEOF_NOT_SET(0); + private final int value; + private IdentityOneofCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IdentityOneofCase valueOf(int value) { + return forNumber(value); + } + + public static IdentityOneofCase forNumber(int value) { + switch (value) { + case 1: return SERVICE_ACCOUNT; + case 2: return HOSTNAME; + case 0: return IDENTITYONEOF_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public IdentityOneofCase + getIdentityOneofCase() { + return IdentityOneofCase.forNumber( + identityOneofCase_); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 1; + /** + *
+   * Service account of a connection endpoint.
+   * 
+ * + * string service_account = 1; + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = ""; + if (identityOneofCase_ == 1) { + ref = identityOneof_; + } + 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(); + if (identityOneofCase_ == 1) { + identityOneof_ = s; + } + return s; + } + } + /** + *
+   * Service account of a connection endpoint.
+   * 
+ * + * string service_account = 1; + */ + public com.google.protobuf.ByteString + getServiceAccountBytes() { + java.lang.Object ref = ""; + if (identityOneofCase_ == 1) { + ref = identityOneof_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (identityOneofCase_ == 1) { + identityOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HOSTNAME_FIELD_NUMBER = 2; + /** + *
+   * Hostname of a connection endpoint.
+   * 
+ * + * string hostname = 2; + */ + public java.lang.String getHostname() { + java.lang.Object ref = ""; + if (identityOneofCase_ == 2) { + ref = identityOneof_; + } + 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(); + if (identityOneofCase_ == 2) { + identityOneof_ = s; + } + return s; + } + } + /** + *
+   * Hostname of a connection endpoint.
+   * 
+ * + * string hostname = 2; + */ + public com.google.protobuf.ByteString + getHostnameBytes() { + java.lang.Object ref = ""; + if (identityOneofCase_ == 2) { + ref = identityOneof_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (identityOneofCase_ == 2) { + identityOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 3; + private static final class AttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Identity_AttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> attributes_; + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + *
+   * Additional attributes of the identity.
+   * 
+ * + * map<string, string> attributes = 3; + */ + + public boolean containsAttributes( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttributes().getMap().containsKey(key); + } + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + *
+   * Additional attributes of the identity.
+   * 
+ * + * map<string, string> attributes = 3; + */ + + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + *
+   * Additional attributes of the identity.
+   * 
+ * + * map<string, string> attributes = 3; + */ + + public java.lang.String getAttributesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Additional attributes of the identity.
+   * 
+ * + * map<string, string> attributes = 3; + */ + + public java.lang.String getAttributesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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 (identityOneofCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, identityOneof_); + } + if (identityOneofCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, identityOneof_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAttributes(), + AttributesDefaultEntryHolder.defaultEntry, + 3); + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (identityOneofCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, identityOneof_); + } + if (identityOneofCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, identityOneof_); + } + for (java.util.Map.Entry entry + : internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry + attributes__ = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, attributes__); + } + 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.Identity)) { + return super.equals(obj); + } + io.grpc.alts.internal.Identity other = (io.grpc.alts.internal.Identity) obj; + + boolean result = true; + result = result && internalGetAttributes().equals( + other.internalGetAttributes()); + result = result && getIdentityOneofCase().equals( + other.getIdentityOneofCase()); + if (!result) return false; + switch (identityOneofCase_) { + case 1: + result = result && getServiceAccount() + .equals(other.getServiceAccount()); + break; + case 2: + result = result && getHostname() + .equals(other.getHostname()); + break; + case 0: + default: + } + 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 (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + switch (identityOneofCase_) { + case 1: + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + break; + case 2: + hash = (37 * hash) + HOSTNAME_FIELD_NUMBER; + hash = (53 * hash) + getHostname().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.alts.internal.Identity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.Identity 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.Identity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.Identity 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.Identity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.Identity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.alts.internal.Identity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.Identity 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.Identity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.Identity 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.Identity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.Identity 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.Identity 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.Identity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gcp.Identity) + io.grpc.alts.internal.IdentityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Identity_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetAttributes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 3: + return internalGetMutableAttributes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.Identity.class, io.grpc.alts.internal.Identity.Builder.class); + } + + // Construct using io.grpc.alts.internal.Identity.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(); + internalGetMutableAttributes().clear(); + identityOneofCase_ = 0; + identityOneof_ = null; + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Identity_descriptor; + } + + public io.grpc.alts.internal.Identity getDefaultInstanceForType() { + return io.grpc.alts.internal.Identity.getDefaultInstance(); + } + + public io.grpc.alts.internal.Identity build() { + io.grpc.alts.internal.Identity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.alts.internal.Identity buildPartial() { + io.grpc.alts.internal.Identity result = new io.grpc.alts.internal.Identity(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (identityOneofCase_ == 1) { + result.identityOneof_ = identityOneof_; + } + if (identityOneofCase_ == 2) { + result.identityOneof_ = identityOneof_; + } + result.attributes_ = internalGetAttributes(); + result.attributes_.makeImmutable(); + result.bitField0_ = to_bitField0_; + result.identityOneofCase_ = identityOneofCase_; + 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.Identity) { + return mergeFrom((io.grpc.alts.internal.Identity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.alts.internal.Identity other) { + if (other == io.grpc.alts.internal.Identity.getDefaultInstance()) return this; + internalGetMutableAttributes().mergeFrom( + other.internalGetAttributes()); + switch (other.getIdentityOneofCase()) { + case SERVICE_ACCOUNT: { + identityOneofCase_ = 1; + identityOneof_ = other.identityOneof_; + onChanged(); + break; + } + case HOSTNAME: { + identityOneofCase_ = 2; + identityOneof_ = other.identityOneof_; + onChanged(); + break; + } + case IDENTITYONEOF_NOT_SET: { + break; + } + } + 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.Identity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.alts.internal.Identity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int identityOneofCase_ = 0; + private java.lang.Object identityOneof_; + public IdentityOneofCase + getIdentityOneofCase() { + return IdentityOneofCase.forNumber( + identityOneofCase_); + } + + public Builder clearIdentityOneof() { + identityOneofCase_ = 0; + identityOneof_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * Service account of a connection endpoint.
+     * 
+ * + * string service_account = 1; + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = ""; + if (identityOneofCase_ == 1) { + ref = identityOneof_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (identityOneofCase_ == 1) { + identityOneof_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Service account of a connection endpoint.
+     * 
+ * + * string service_account = 1; + */ + public com.google.protobuf.ByteString + getServiceAccountBytes() { + java.lang.Object ref = ""; + if (identityOneofCase_ == 1) { + ref = identityOneof_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (identityOneofCase_ == 1) { + identityOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Service account of a connection endpoint.
+     * 
+ * + * string service_account = 1; + */ + public Builder setServiceAccount( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + identityOneofCase_ = 1; + identityOneof_ = value; + onChanged(); + return this; + } + /** + *
+     * Service account of a connection endpoint.
+     * 
+ * + * string service_account = 1; + */ + public Builder clearServiceAccount() { + if (identityOneofCase_ == 1) { + identityOneofCase_ = 0; + identityOneof_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Service account of a connection endpoint.
+     * 
+ * + * string service_account = 1; + */ + public Builder setServiceAccountBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + identityOneofCase_ = 1; + identityOneof_ = value; + onChanged(); + return this; + } + + /** + *
+     * Hostname of a connection endpoint.
+     * 
+ * + * string hostname = 2; + */ + public java.lang.String getHostname() { + java.lang.Object ref = ""; + if (identityOneofCase_ == 2) { + ref = identityOneof_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (identityOneofCase_ == 2) { + identityOneof_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Hostname of a connection endpoint.
+     * 
+ * + * string hostname = 2; + */ + public com.google.protobuf.ByteString + getHostnameBytes() { + java.lang.Object ref = ""; + if (identityOneofCase_ == 2) { + ref = identityOneof_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (identityOneofCase_ == 2) { + identityOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Hostname of a connection endpoint.
+     * 
+ * + * string hostname = 2; + */ + public Builder setHostname( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + identityOneofCase_ = 2; + identityOneof_ = value; + onChanged(); + return this; + } + /** + *
+     * Hostname of a connection endpoint.
+     * 
+ * + * string hostname = 2; + */ + public Builder clearHostname() { + if (identityOneofCase_ == 2) { + identityOneofCase_ = 0; + identityOneof_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Hostname of a connection endpoint.
+     * 
+ * + * string hostname = 2; + */ + public Builder setHostnameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + identityOneofCase_ = 2; + identityOneof_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> attributes_; + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + private com.google.protobuf.MapField + internalGetMutableAttributes() { + onChanged();; + if (attributes_ == null) { + attributes_ = com.google.protobuf.MapField.newMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + if (!attributes_.isMutable()) { + attributes_ = attributes_.copy(); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + *
+     * Additional attributes of the identity.
+     * 
+ * + * map<string, string> attributes = 3; + */ + + public boolean containsAttributes( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttributes().getMap().containsKey(key); + } + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + *
+     * Additional attributes of the identity.
+     * 
+ * + * map<string, string> attributes = 3; + */ + + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + *
+     * Additional attributes of the identity.
+     * 
+ * + * map<string, string> attributes = 3; + */ + + public java.lang.String getAttributesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Additional attributes of the identity.
+     * 
+ * + * map<string, string> attributes = 3; + */ + + public java.lang.String getAttributesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttributes() { + internalGetMutableAttributes().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Additional attributes of the identity.
+     * 
+ * + * map<string, string> attributes = 3; + */ + + public Builder removeAttributes( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttributes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAttributes() { + return internalGetMutableAttributes().getMutableMap(); + } + /** + *
+     * Additional attributes of the identity.
+     * 
+ * + * map<string, string> attributes = 3; + */ + public Builder putAttributes( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttributes().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Additional attributes of the identity.
+     * 
+ * + * map<string, string> attributes = 3; + */ + + public Builder putAllAttributes( + java.util.Map values) { + internalGetMutableAttributes().getMutableMap() + .putAll(values); + return this; + } + 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.Identity) + } + + // @@protoc_insertion_point(class_scope:grpc.gcp.Identity) + private static final io.grpc.alts.internal.Identity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.alts.internal.Identity(); + } + + public static io.grpc.alts.internal.Identity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Identity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Identity(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.Identity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/IdentityOrBuilder.java b/alts/src/generated/main/java/io/grpc/alts/internal/IdentityOrBuilder.java new file mode 100644 index 0000000000..0cf096c4aa --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/IdentityOrBuilder.java @@ -0,0 +1,101 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +public interface IdentityOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.Identity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Service account of a connection endpoint.
+   * 
+ * + * string service_account = 1; + */ + java.lang.String getServiceAccount(); + /** + *
+   * Service account of a connection endpoint.
+   * 
+ * + * string service_account = 1; + */ + com.google.protobuf.ByteString + getServiceAccountBytes(); + + /** + *
+   * Hostname of a connection endpoint.
+   * 
+ * + * string hostname = 2; + */ + java.lang.String getHostname(); + /** + *
+   * Hostname of a connection endpoint.
+   * 
+ * + * string hostname = 2; + */ + com.google.protobuf.ByteString + getHostnameBytes(); + + /** + *
+   * Additional attributes of the identity.
+   * 
+ * + * map<string, string> attributes = 3; + */ + int getAttributesCount(); + /** + *
+   * Additional attributes of the identity.
+   * 
+ * + * map<string, string> attributes = 3; + */ + boolean containsAttributes( + java.lang.String key); + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAttributes(); + /** + *
+   * Additional attributes of the identity.
+   * 
+ * + * map<string, string> attributes = 3; + */ + java.util.Map + getAttributesMap(); + /** + *
+   * Additional attributes of the identity.
+   * 
+ * + * map<string, string> attributes = 3; + */ + + java.lang.String getAttributesOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+   * Additional attributes of the identity.
+   * 
+ * + * map<string, string> attributes = 3; + */ + + java.lang.String getAttributesOrThrow( + java.lang.String key); + + public io.grpc.alts.internal.Identity.IdentityOneofCase getIdentityOneofCase(); +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/NetworkProtocol.java b/alts/src/generated/main/java/io/grpc/alts/internal/NetworkProtocol.java new file mode 100644 index 0000000000..78b78a79dc --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/NetworkProtocol.java @@ -0,0 +1,112 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +/** + * Protobuf enum {@code grpc.gcp.NetworkProtocol} + */ +public enum NetworkProtocol + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NETWORK_PROTOCOL_UNSPECIFIED = 0; + */ + NETWORK_PROTOCOL_UNSPECIFIED(0), + /** + * TCP = 1; + */ + TCP(1), + /** + * UDP = 2; + */ + UDP(2), + UNRECOGNIZED(-1), + ; + + /** + * NETWORK_PROTOCOL_UNSPECIFIED = 0; + */ + public static final int NETWORK_PROTOCOL_UNSPECIFIED_VALUE = 0; + /** + * TCP = 1; + */ + public static final int TCP_VALUE = 1; + /** + * UDP = 2; + */ + public static final int UDP_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NetworkProtocol valueOf(int value) { + return forNumber(value); + } + + public static NetworkProtocol forNumber(int value) { + switch (value) { + case 0: return NETWORK_PROTOCOL_UNSPECIFIED; + case 1: return TCP; + case 2: return UDP; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + NetworkProtocol> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NetworkProtocol findValueByNumber(int number) { + return NetworkProtocol.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grpc.alts.internal.HandshakerProto.getDescriptor().getEnumTypes().get(1); + } + + private static final NetworkProtocol[] VALUES = values(); + + public static NetworkProtocol valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NetworkProtocol(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gcp.NetworkProtocol) +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/NextHandshakeMessageReq.java b/alts/src/generated/main/java/io/grpc/alts/internal/NextHandshakeMessageReq.java new file mode 100644 index 0000000000..7028aa9cca --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/NextHandshakeMessageReq.java @@ -0,0 +1,474 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +/** + * Protobuf type {@code grpc.gcp.NextHandshakeMessageReq} + */ +public final class NextHandshakeMessageReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gcp.NextHandshakeMessageReq) + NextHandshakeMessageReqOrBuilder { +private static final long serialVersionUID = 0L; + // Use NextHandshakeMessageReq.newBuilder() to construct. + private NextHandshakeMessageReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NextHandshakeMessageReq() { + inBytes_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NextHandshakeMessageReq( + 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: { + + inBytes_ = input.readBytes(); + 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_NextHandshakeMessageReq_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_NextHandshakeMessageReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.NextHandshakeMessageReq.class, io.grpc.alts.internal.NextHandshakeMessageReq.Builder.class); + } + + public static final int IN_BYTES_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString inBytes_; + /** + *
+   * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
+   * that the peer's out_frames are split into multiple NextHandshakerMessageReq
+   * messages.
+   * 
+ * + * bytes in_bytes = 1; + */ + public com.google.protobuf.ByteString getInBytes() { + return inBytes_; + } + + 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 (!inBytes_.isEmpty()) { + output.writeBytes(1, inBytes_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!inBytes_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, inBytes_); + } + 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.NextHandshakeMessageReq)) { + return super.equals(obj); + } + io.grpc.alts.internal.NextHandshakeMessageReq other = (io.grpc.alts.internal.NextHandshakeMessageReq) obj; + + boolean result = true; + result = result && getInBytes() + .equals(other.getInBytes()); + 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) + IN_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getInBytes().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.NextHandshakeMessageReq 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.NextHandshakeMessageReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.NextHandshakeMessageReq 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.NextHandshakeMessageReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.alts.internal.NextHandshakeMessageReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.NextHandshakeMessageReq 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.NextHandshakeMessageReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.NextHandshakeMessageReq 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.NextHandshakeMessageReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.NextHandshakeMessageReq 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.NextHandshakeMessageReq 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.NextHandshakeMessageReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gcp.NextHandshakeMessageReq) + io.grpc.alts.internal.NextHandshakeMessageReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_NextHandshakeMessageReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.NextHandshakeMessageReq.class, io.grpc.alts.internal.NextHandshakeMessageReq.Builder.class); + } + + // Construct using io.grpc.alts.internal.NextHandshakeMessageReq.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(); + inBytes_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_NextHandshakeMessageReq_descriptor; + } + + public io.grpc.alts.internal.NextHandshakeMessageReq getDefaultInstanceForType() { + return io.grpc.alts.internal.NextHandshakeMessageReq.getDefaultInstance(); + } + + public io.grpc.alts.internal.NextHandshakeMessageReq build() { + io.grpc.alts.internal.NextHandshakeMessageReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.alts.internal.NextHandshakeMessageReq buildPartial() { + io.grpc.alts.internal.NextHandshakeMessageReq result = new io.grpc.alts.internal.NextHandshakeMessageReq(this); + result.inBytes_ = inBytes_; + 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.NextHandshakeMessageReq) { + return mergeFrom((io.grpc.alts.internal.NextHandshakeMessageReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.alts.internal.NextHandshakeMessageReq other) { + if (other == io.grpc.alts.internal.NextHandshakeMessageReq.getDefaultInstance()) return this; + if (other.getInBytes() != com.google.protobuf.ByteString.EMPTY) { + setInBytes(other.getInBytes()); + } + 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.NextHandshakeMessageReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.alts.internal.NextHandshakeMessageReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString inBytes_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
+     * that the peer's out_frames are split into multiple NextHandshakerMessageReq
+     * messages.
+     * 
+ * + * bytes in_bytes = 1; + */ + public com.google.protobuf.ByteString getInBytes() { + return inBytes_; + } + /** + *
+     * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
+     * that the peer's out_frames are split into multiple NextHandshakerMessageReq
+     * messages.
+     * 
+ * + * bytes in_bytes = 1; + */ + public Builder setInBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + inBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
+     * that the peer's out_frames are split into multiple NextHandshakerMessageReq
+     * messages.
+     * 
+ * + * bytes in_bytes = 1; + */ + public Builder clearInBytes() { + + inBytes_ = getDefaultInstance().getInBytes(); + onChanged(); + return this; + } + 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.NextHandshakeMessageReq) + } + + // @@protoc_insertion_point(class_scope:grpc.gcp.NextHandshakeMessageReq) + private static final io.grpc.alts.internal.NextHandshakeMessageReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.alts.internal.NextHandshakeMessageReq(); + } + + public static io.grpc.alts.internal.NextHandshakeMessageReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public NextHandshakeMessageReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NextHandshakeMessageReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.NextHandshakeMessageReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/NextHandshakeMessageReqOrBuilder.java b/alts/src/generated/main/java/io/grpc/alts/internal/NextHandshakeMessageReqOrBuilder.java new file mode 100644 index 0000000000..3c3f0a57fc --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/NextHandshakeMessageReqOrBuilder.java @@ -0,0 +1,20 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +public interface NextHandshakeMessageReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.NextHandshakeMessageReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
+   * that the peer's out_frames are split into multiple NextHandshakerMessageReq
+   * messages.
+   * 
+ * + * bytes in_bytes = 1; + */ + com.google.protobuf.ByteString getInBytes(); +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/RpcProtocolVersions.java b/alts/src/generated/main/java/io/grpc/alts/internal/RpcProtocolVersions.java new file mode 100644 index 0000000000..e415be2616 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/RpcProtocolVersions.java @@ -0,0 +1,1377 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/transport_security_common.proto + +package io.grpc.alts.internal; + +/** + *
+ * Max and min supported RPC protocol versions.
+ * 
+ * + * Protobuf type {@code grpc.gcp.RpcProtocolVersions} + */ +public final class RpcProtocolVersions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gcp.RpcProtocolVersions) + RpcProtocolVersionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use RpcProtocolVersions.newBuilder() to construct. + private RpcProtocolVersions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RpcProtocolVersions() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RpcProtocolVersions( + 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: { + io.grpc.alts.internal.RpcProtocolVersions.Version.Builder subBuilder = null; + if (maxRpcVersion_ != null) { + subBuilder = maxRpcVersion_.toBuilder(); + } + maxRpcVersion_ = input.readMessage(io.grpc.alts.internal.RpcProtocolVersions.Version.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxRpcVersion_); + maxRpcVersion_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + io.grpc.alts.internal.RpcProtocolVersions.Version.Builder subBuilder = null; + if (minRpcVersion_ != null) { + subBuilder = minRpcVersion_.toBuilder(); + } + minRpcVersion_ = input.readMessage(io.grpc.alts.internal.RpcProtocolVersions.Version.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minRpcVersion_); + minRpcVersion_ = 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.TransportSecurityCommonProto.internal_static_grpc_gcp_RpcProtocolVersions_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.TransportSecurityCommonProto.internal_static_grpc_gcp_RpcProtocolVersions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.RpcProtocolVersions.class, io.grpc.alts.internal.RpcProtocolVersions.Builder.class); + } + + public interface VersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.RpcProtocolVersions.Version) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 major = 1; + */ + int getMajor(); + + /** + * uint32 minor = 2; + */ + int getMinor(); + } + /** + *
+   * RPC version contains a major version and a minor version.
+   * 
+ * + * Protobuf type {@code grpc.gcp.RpcProtocolVersions.Version} + */ + public static final class Version extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gcp.RpcProtocolVersions.Version) + VersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Version.newBuilder() to construct. + private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Version() { + major_ = 0; + minor_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Version( + 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 8: { + + major_ = input.readUInt32(); + break; + } + case 16: { + + minor_ = input.readUInt32(); + 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.TransportSecurityCommonProto.internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.TransportSecurityCommonProto.internal_static_grpc_gcp_RpcProtocolVersions_Version_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.RpcProtocolVersions.Version.class, io.grpc.alts.internal.RpcProtocolVersions.Version.Builder.class); + } + + public static final int MAJOR_FIELD_NUMBER = 1; + private int major_; + /** + * uint32 major = 1; + */ + public int getMajor() { + return major_; + } + + public static final int MINOR_FIELD_NUMBER = 2; + private int minor_; + /** + * uint32 minor = 2; + */ + public int getMinor() { + return minor_; + } + + 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 (major_ != 0) { + output.writeUInt32(1, major_); + } + if (minor_ != 0) { + output.writeUInt32(2, minor_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (major_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, major_); + } + if (minor_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, minor_); + } + 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.RpcProtocolVersions.Version)) { + return super.equals(obj); + } + io.grpc.alts.internal.RpcProtocolVersions.Version other = (io.grpc.alts.internal.RpcProtocolVersions.Version) obj; + + boolean result = true; + result = result && (getMajor() + == other.getMajor()); + result = result && (getMinor() + == other.getMinor()); + 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) + MAJOR_FIELD_NUMBER; + hash = (53 * hash) + getMajor(); + hash = (37 * hash) + MINOR_FIELD_NUMBER; + hash = (53 * hash) + getMinor(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.alts.internal.RpcProtocolVersions.Version parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.RpcProtocolVersions.Version 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.RpcProtocolVersions.Version parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.RpcProtocolVersions.Version 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.RpcProtocolVersions.Version parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.RpcProtocolVersions.Version parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.alts.internal.RpcProtocolVersions.Version parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.RpcProtocolVersions.Version 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.RpcProtocolVersions.Version parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.RpcProtocolVersions.Version 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.RpcProtocolVersions.Version parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.RpcProtocolVersions.Version 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.RpcProtocolVersions.Version 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; + } + /** + *
+     * RPC version contains a major version and a minor version.
+     * 
+ * + * Protobuf type {@code grpc.gcp.RpcProtocolVersions.Version} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gcp.RpcProtocolVersions.Version) + io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.TransportSecurityCommonProto.internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.TransportSecurityCommonProto.internal_static_grpc_gcp_RpcProtocolVersions_Version_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.RpcProtocolVersions.Version.class, io.grpc.alts.internal.RpcProtocolVersions.Version.Builder.class); + } + + // Construct using io.grpc.alts.internal.RpcProtocolVersions.Version.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(); + major_ = 0; + + minor_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.alts.internal.TransportSecurityCommonProto.internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor; + } + + public io.grpc.alts.internal.RpcProtocolVersions.Version getDefaultInstanceForType() { + return io.grpc.alts.internal.RpcProtocolVersions.Version.getDefaultInstance(); + } + + public io.grpc.alts.internal.RpcProtocolVersions.Version build() { + io.grpc.alts.internal.RpcProtocolVersions.Version result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.alts.internal.RpcProtocolVersions.Version buildPartial() { + io.grpc.alts.internal.RpcProtocolVersions.Version result = new io.grpc.alts.internal.RpcProtocolVersions.Version(this); + result.major_ = major_; + result.minor_ = minor_; + 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.RpcProtocolVersions.Version) { + return mergeFrom((io.grpc.alts.internal.RpcProtocolVersions.Version)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.alts.internal.RpcProtocolVersions.Version other) { + if (other == io.grpc.alts.internal.RpcProtocolVersions.Version.getDefaultInstance()) return this; + if (other.getMajor() != 0) { + setMajor(other.getMajor()); + } + if (other.getMinor() != 0) { + setMinor(other.getMinor()); + } + 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.RpcProtocolVersions.Version parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.alts.internal.RpcProtocolVersions.Version) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int major_ ; + /** + * uint32 major = 1; + */ + public int getMajor() { + return major_; + } + /** + * uint32 major = 1; + */ + public Builder setMajor(int value) { + + major_ = value; + onChanged(); + return this; + } + /** + * uint32 major = 1; + */ + public Builder clearMajor() { + + major_ = 0; + onChanged(); + return this; + } + + private int minor_ ; + /** + * uint32 minor = 2; + */ + public int getMinor() { + return minor_; + } + /** + * uint32 minor = 2; + */ + public Builder setMinor(int value) { + + minor_ = value; + onChanged(); + return this; + } + /** + * uint32 minor = 2; + */ + public Builder clearMinor() { + + minor_ = 0; + onChanged(); + return this; + } + 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.RpcProtocolVersions.Version) + } + + // @@protoc_insertion_point(class_scope:grpc.gcp.RpcProtocolVersions.Version) + private static final io.grpc.alts.internal.RpcProtocolVersions.Version DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.alts.internal.RpcProtocolVersions.Version(); + } + + public static io.grpc.alts.internal.RpcProtocolVersions.Version getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Version parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Version(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.RpcProtocolVersions.Version getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int MAX_RPC_VERSION_FIELD_NUMBER = 1; + private io.grpc.alts.internal.RpcProtocolVersions.Version maxRpcVersion_; + /** + *
+   * Maximum supported RPC version.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + public boolean hasMaxRpcVersion() { + return maxRpcVersion_ != null; + } + /** + *
+   * Maximum supported RPC version.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + public io.grpc.alts.internal.RpcProtocolVersions.Version getMaxRpcVersion() { + return maxRpcVersion_ == null ? io.grpc.alts.internal.RpcProtocolVersions.Version.getDefaultInstance() : maxRpcVersion_; + } + /** + *
+   * Maximum supported RPC version.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + public io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder getMaxRpcVersionOrBuilder() { + return getMaxRpcVersion(); + } + + public static final int MIN_RPC_VERSION_FIELD_NUMBER = 2; + private io.grpc.alts.internal.RpcProtocolVersions.Version minRpcVersion_; + /** + *
+   * Minimum supported RPC version.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + public boolean hasMinRpcVersion() { + return minRpcVersion_ != null; + } + /** + *
+   * Minimum supported RPC version.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + public io.grpc.alts.internal.RpcProtocolVersions.Version getMinRpcVersion() { + return minRpcVersion_ == null ? io.grpc.alts.internal.RpcProtocolVersions.Version.getDefaultInstance() : minRpcVersion_; + } + /** + *
+   * Minimum supported RPC version.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + public io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder getMinRpcVersionOrBuilder() { + return getMinRpcVersion(); + } + + 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 (maxRpcVersion_ != null) { + output.writeMessage(1, getMaxRpcVersion()); + } + if (minRpcVersion_ != null) { + output.writeMessage(2, getMinRpcVersion()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxRpcVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMaxRpcVersion()); + } + if (minRpcVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMinRpcVersion()); + } + 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.RpcProtocolVersions)) { + return super.equals(obj); + } + io.grpc.alts.internal.RpcProtocolVersions other = (io.grpc.alts.internal.RpcProtocolVersions) obj; + + boolean result = true; + result = result && (hasMaxRpcVersion() == other.hasMaxRpcVersion()); + if (hasMaxRpcVersion()) { + result = result && getMaxRpcVersion() + .equals(other.getMaxRpcVersion()); + } + result = result && (hasMinRpcVersion() == other.hasMinRpcVersion()); + if (hasMinRpcVersion()) { + result = result && getMinRpcVersion() + .equals(other.getMinRpcVersion()); + } + 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 (hasMaxRpcVersion()) { + hash = (37 * hash) + MAX_RPC_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getMaxRpcVersion().hashCode(); + } + if (hasMinRpcVersion()) { + hash = (37 * hash) + MIN_RPC_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getMinRpcVersion().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.alts.internal.RpcProtocolVersions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.RpcProtocolVersions 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.RpcProtocolVersions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.RpcProtocolVersions 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.RpcProtocolVersions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.RpcProtocolVersions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.alts.internal.RpcProtocolVersions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.RpcProtocolVersions 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.RpcProtocolVersions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.RpcProtocolVersions 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.RpcProtocolVersions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.RpcProtocolVersions 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.RpcProtocolVersions 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; + } + /** + *
+   * Max and min supported RPC protocol versions.
+   * 
+ * + * Protobuf type {@code grpc.gcp.RpcProtocolVersions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gcp.RpcProtocolVersions) + io.grpc.alts.internal.RpcProtocolVersionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.TransportSecurityCommonProto.internal_static_grpc_gcp_RpcProtocolVersions_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.TransportSecurityCommonProto.internal_static_grpc_gcp_RpcProtocolVersions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.RpcProtocolVersions.class, io.grpc.alts.internal.RpcProtocolVersions.Builder.class); + } + + // Construct using io.grpc.alts.internal.RpcProtocolVersions.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(); + if (maxRpcVersionBuilder_ == null) { + maxRpcVersion_ = null; + } else { + maxRpcVersion_ = null; + maxRpcVersionBuilder_ = null; + } + if (minRpcVersionBuilder_ == null) { + minRpcVersion_ = null; + } else { + minRpcVersion_ = null; + minRpcVersionBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.alts.internal.TransportSecurityCommonProto.internal_static_grpc_gcp_RpcProtocolVersions_descriptor; + } + + public io.grpc.alts.internal.RpcProtocolVersions getDefaultInstanceForType() { + return io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance(); + } + + public io.grpc.alts.internal.RpcProtocolVersions build() { + io.grpc.alts.internal.RpcProtocolVersions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.alts.internal.RpcProtocolVersions buildPartial() { + io.grpc.alts.internal.RpcProtocolVersions result = new io.grpc.alts.internal.RpcProtocolVersions(this); + if (maxRpcVersionBuilder_ == null) { + result.maxRpcVersion_ = maxRpcVersion_; + } else { + result.maxRpcVersion_ = maxRpcVersionBuilder_.build(); + } + if (minRpcVersionBuilder_ == null) { + result.minRpcVersion_ = minRpcVersion_; + } else { + result.minRpcVersion_ = minRpcVersionBuilder_.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.RpcProtocolVersions) { + return mergeFrom((io.grpc.alts.internal.RpcProtocolVersions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.alts.internal.RpcProtocolVersions other) { + if (other == io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance()) return this; + if (other.hasMaxRpcVersion()) { + mergeMaxRpcVersion(other.getMaxRpcVersion()); + } + if (other.hasMinRpcVersion()) { + mergeMinRpcVersion(other.getMinRpcVersion()); + } + 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.RpcProtocolVersions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.alts.internal.RpcProtocolVersions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private io.grpc.alts.internal.RpcProtocolVersions.Version maxRpcVersion_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.RpcProtocolVersions.Version, io.grpc.alts.internal.RpcProtocolVersions.Version.Builder, io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder> maxRpcVersionBuilder_; + /** + *
+     * Maximum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + public boolean hasMaxRpcVersion() { + return maxRpcVersionBuilder_ != null || maxRpcVersion_ != null; + } + /** + *
+     * Maximum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + public io.grpc.alts.internal.RpcProtocolVersions.Version getMaxRpcVersion() { + if (maxRpcVersionBuilder_ == null) { + return maxRpcVersion_ == null ? io.grpc.alts.internal.RpcProtocolVersions.Version.getDefaultInstance() : maxRpcVersion_; + } else { + return maxRpcVersionBuilder_.getMessage(); + } + } + /** + *
+     * Maximum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + public Builder setMaxRpcVersion(io.grpc.alts.internal.RpcProtocolVersions.Version value) { + if (maxRpcVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxRpcVersion_ = value; + onChanged(); + } else { + maxRpcVersionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Maximum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + public Builder setMaxRpcVersion( + io.grpc.alts.internal.RpcProtocolVersions.Version.Builder builderForValue) { + if (maxRpcVersionBuilder_ == null) { + maxRpcVersion_ = builderForValue.build(); + onChanged(); + } else { + maxRpcVersionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Maximum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + public Builder mergeMaxRpcVersion(io.grpc.alts.internal.RpcProtocolVersions.Version value) { + if (maxRpcVersionBuilder_ == null) { + if (maxRpcVersion_ != null) { + maxRpcVersion_ = + io.grpc.alts.internal.RpcProtocolVersions.Version.newBuilder(maxRpcVersion_).mergeFrom(value).buildPartial(); + } else { + maxRpcVersion_ = value; + } + onChanged(); + } else { + maxRpcVersionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Maximum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + public Builder clearMaxRpcVersion() { + if (maxRpcVersionBuilder_ == null) { + maxRpcVersion_ = null; + onChanged(); + } else { + maxRpcVersion_ = null; + maxRpcVersionBuilder_ = null; + } + + return this; + } + /** + *
+     * Maximum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + public io.grpc.alts.internal.RpcProtocolVersions.Version.Builder getMaxRpcVersionBuilder() { + + onChanged(); + return getMaxRpcVersionFieldBuilder().getBuilder(); + } + /** + *
+     * Maximum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + public io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder getMaxRpcVersionOrBuilder() { + if (maxRpcVersionBuilder_ != null) { + return maxRpcVersionBuilder_.getMessageOrBuilder(); + } else { + return maxRpcVersion_ == null ? + io.grpc.alts.internal.RpcProtocolVersions.Version.getDefaultInstance() : maxRpcVersion_; + } + } + /** + *
+     * Maximum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.RpcProtocolVersions.Version, io.grpc.alts.internal.RpcProtocolVersions.Version.Builder, io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder> + getMaxRpcVersionFieldBuilder() { + if (maxRpcVersionBuilder_ == null) { + maxRpcVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.RpcProtocolVersions.Version, io.grpc.alts.internal.RpcProtocolVersions.Version.Builder, io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder>( + getMaxRpcVersion(), + getParentForChildren(), + isClean()); + maxRpcVersion_ = null; + } + return maxRpcVersionBuilder_; + } + + private io.grpc.alts.internal.RpcProtocolVersions.Version minRpcVersion_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.RpcProtocolVersions.Version, io.grpc.alts.internal.RpcProtocolVersions.Version.Builder, io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder> minRpcVersionBuilder_; + /** + *
+     * Minimum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + public boolean hasMinRpcVersion() { + return minRpcVersionBuilder_ != null || minRpcVersion_ != null; + } + /** + *
+     * Minimum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + public io.grpc.alts.internal.RpcProtocolVersions.Version getMinRpcVersion() { + if (minRpcVersionBuilder_ == null) { + return minRpcVersion_ == null ? io.grpc.alts.internal.RpcProtocolVersions.Version.getDefaultInstance() : minRpcVersion_; + } else { + return minRpcVersionBuilder_.getMessage(); + } + } + /** + *
+     * Minimum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + public Builder setMinRpcVersion(io.grpc.alts.internal.RpcProtocolVersions.Version value) { + if (minRpcVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minRpcVersion_ = value; + onChanged(); + } else { + minRpcVersionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Minimum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + public Builder setMinRpcVersion( + io.grpc.alts.internal.RpcProtocolVersions.Version.Builder builderForValue) { + if (minRpcVersionBuilder_ == null) { + minRpcVersion_ = builderForValue.build(); + onChanged(); + } else { + minRpcVersionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Minimum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + public Builder mergeMinRpcVersion(io.grpc.alts.internal.RpcProtocolVersions.Version value) { + if (minRpcVersionBuilder_ == null) { + if (minRpcVersion_ != null) { + minRpcVersion_ = + io.grpc.alts.internal.RpcProtocolVersions.Version.newBuilder(minRpcVersion_).mergeFrom(value).buildPartial(); + } else { + minRpcVersion_ = value; + } + onChanged(); + } else { + minRpcVersionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Minimum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + public Builder clearMinRpcVersion() { + if (minRpcVersionBuilder_ == null) { + minRpcVersion_ = null; + onChanged(); + } else { + minRpcVersion_ = null; + minRpcVersionBuilder_ = null; + } + + return this; + } + /** + *
+     * Minimum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + public io.grpc.alts.internal.RpcProtocolVersions.Version.Builder getMinRpcVersionBuilder() { + + onChanged(); + return getMinRpcVersionFieldBuilder().getBuilder(); + } + /** + *
+     * Minimum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + public io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder getMinRpcVersionOrBuilder() { + if (minRpcVersionBuilder_ != null) { + return minRpcVersionBuilder_.getMessageOrBuilder(); + } else { + return minRpcVersion_ == null ? + io.grpc.alts.internal.RpcProtocolVersions.Version.getDefaultInstance() : minRpcVersion_; + } + } + /** + *
+     * Minimum supported RPC version.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.RpcProtocolVersions.Version, io.grpc.alts.internal.RpcProtocolVersions.Version.Builder, io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder> + getMinRpcVersionFieldBuilder() { + if (minRpcVersionBuilder_ == null) { + minRpcVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.RpcProtocolVersions.Version, io.grpc.alts.internal.RpcProtocolVersions.Version.Builder, io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder>( + getMinRpcVersion(), + getParentForChildren(), + isClean()); + minRpcVersion_ = null; + } + return minRpcVersionBuilder_; + } + 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.RpcProtocolVersions) + } + + // @@protoc_insertion_point(class_scope:grpc.gcp.RpcProtocolVersions) + private static final io.grpc.alts.internal.RpcProtocolVersions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.alts.internal.RpcProtocolVersions(); + } + + public static io.grpc.alts.internal.RpcProtocolVersions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public RpcProtocolVersions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RpcProtocolVersions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.RpcProtocolVersions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/RpcProtocolVersionsOrBuilder.java b/alts/src/generated/main/java/io/grpc/alts/internal/RpcProtocolVersionsOrBuilder.java new file mode 100644 index 0000000000..774a6cc571 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/RpcProtocolVersionsOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/transport_security_common.proto + +package io.grpc.alts.internal; + +public interface RpcProtocolVersionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.RpcProtocolVersions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Maximum supported RPC version.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + boolean hasMaxRpcVersion(); + /** + *
+   * Maximum supported RPC version.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + io.grpc.alts.internal.RpcProtocolVersions.Version getMaxRpcVersion(); + /** + *
+   * Maximum supported RPC version.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; + */ + io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder getMaxRpcVersionOrBuilder(); + + /** + *
+   * Minimum supported RPC version.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + boolean hasMinRpcVersion(); + /** + *
+   * Minimum supported RPC version.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + io.grpc.alts.internal.RpcProtocolVersions.Version getMinRpcVersion(); + /** + *
+   * Minimum supported RPC version.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; + */ + io.grpc.alts.internal.RpcProtocolVersions.VersionOrBuilder getMinRpcVersionOrBuilder(); +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/SecurityLevel.java b/alts/src/generated/main/java/io/grpc/alts/internal/SecurityLevel.java new file mode 100644 index 0000000000..aee2108f8a --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/SecurityLevel.java @@ -0,0 +1,117 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/transport_security_common.proto + +package io.grpc.alts.internal; + +/** + *
+ * The security level of the created channel. The list is sorted in increasing
+ * level of security. This order must always be maintained.
+ * 
+ * + * Protobuf enum {@code grpc.gcp.SecurityLevel} + */ +public enum SecurityLevel + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SECURITY_NONE = 0; + */ + SECURITY_NONE(0), + /** + * INTEGRITY_ONLY = 1; + */ + INTEGRITY_ONLY(1), + /** + * INTEGRITY_AND_PRIVACY = 2; + */ + INTEGRITY_AND_PRIVACY(2), + UNRECOGNIZED(-1), + ; + + /** + * SECURITY_NONE = 0; + */ + public static final int SECURITY_NONE_VALUE = 0; + /** + * INTEGRITY_ONLY = 1; + */ + public static final int INTEGRITY_ONLY_VALUE = 1; + /** + * INTEGRITY_AND_PRIVACY = 2; + */ + public static final int INTEGRITY_AND_PRIVACY_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SecurityLevel valueOf(int value) { + return forNumber(value); + } + + public static SecurityLevel forNumber(int value) { + switch (value) { + case 0: return SECURITY_NONE; + case 1: return INTEGRITY_ONLY; + case 2: return INTEGRITY_AND_PRIVACY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + SecurityLevel> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SecurityLevel findValueByNumber(int number) { + return SecurityLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.grpc.alts.internal.TransportSecurityCommonProto.getDescriptor().getEnumTypes().get(0); + } + + private static final SecurityLevel[] VALUES = values(); + + public static SecurityLevel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SecurityLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gcp.SecurityLevel) +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/ServerHandshakeParameters.java b/alts/src/generated/main/java/io/grpc/alts/internal/ServerHandshakeParameters.java new file mode 100644 index 0000000000..3c733c6dd5 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/ServerHandshakeParameters.java @@ -0,0 +1,1084 @@ +// 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(); + 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_; + /** + *
+   * The record protocols supported by the server, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 1; + */ + public com.google.protobuf.ProtocolStringList + getRecordProtocolsList() { + return recordProtocols_; + } + /** + *
+   * The record protocols supported by the server, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 1; + */ + public int getRecordProtocolsCount() { + return recordProtocols_.size(); + } + /** + *
+   * The record protocols supported by the server, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 1; + */ + public java.lang.String getRecordProtocols(int index) { + return recordProtocols_.get(index); + } + /** + *
+   * The record protocols supported by the server, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 1; + */ + 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 localIdentities_; + /** + *
+   * (Optional) A list of local identities supported by the server, if
+   * specified. Otherwise, the handshaker chooses a default local identity.
+   * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public java.util.List getLocalIdentitiesList() { + return localIdentities_; + } + /** + *
+   * (Optional) A list of local identities supported by the server, if
+   * specified. Otherwise, the handshaker chooses a default local identity.
+   * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public java.util.List + getLocalIdentitiesOrBuilderList() { + return localIdentities_; + } + /** + *
+   * (Optional) A list of local identities supported by the server, if
+   * specified. Otherwise, the handshaker chooses a default local identity.
+   * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public int getLocalIdentitiesCount() { + return localIdentities_.size(); + } + /** + *
+   * (Optional) A list of local identities supported by the server, if
+   * specified. Otherwise, the handshaker chooses a default local identity.
+   * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public io.grpc.alts.internal.Identity getLocalIdentities(int index) { + return localIdentities_.get(index); + } + /** + *
+   * (Optional) A list of local identities supported by the server, if
+   * specified. Otherwise, the handshaker chooses a default local identity.
+   * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + 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 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; + } + } + /** + *
+     * The record protocols supported by the server, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 1; + */ + public com.google.protobuf.ProtocolStringList + getRecordProtocolsList() { + return recordProtocols_.getUnmodifiableView(); + } + /** + *
+     * The record protocols supported by the server, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 1; + */ + public int getRecordProtocolsCount() { + return recordProtocols_.size(); + } + /** + *
+     * The record protocols supported by the server, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 1; + */ + public java.lang.String getRecordProtocols(int index) { + return recordProtocols_.get(index); + } + /** + *
+     * The record protocols supported by the server, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 1; + */ + public com.google.protobuf.ByteString + getRecordProtocolsBytes(int index) { + return recordProtocols_.getByteString(index); + } + /** + *
+     * The record protocols supported by the server, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 1; + */ + public Builder setRecordProtocols( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordProtocolsIsMutable(); + recordProtocols_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The record protocols supported by the server, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 1; + */ + public Builder addRecordProtocols( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordProtocolsIsMutable(); + recordProtocols_.add(value); + onChanged(); + return this; + } + /** + *
+     * The record protocols supported by the server, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 1; + */ + public Builder addAllRecordProtocols( + java.lang.Iterable values) { + ensureRecordProtocolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, recordProtocols_); + onChanged(); + return this; + } + /** + *
+     * The record protocols supported by the server, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 1; + */ + public Builder clearRecordProtocols() { + recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The record protocols supported by the server, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 1; + */ + 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 localIdentities_ = + java.util.Collections.emptyList(); + private void ensureLocalIdentitiesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + localIdentities_ = new java.util.ArrayList(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_; + + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public java.util.List getLocalIdentitiesList() { + if (localIdentitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(localIdentities_); + } else { + return localIdentitiesBuilder_.getMessageList(); + } + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public int getLocalIdentitiesCount() { + if (localIdentitiesBuilder_ == null) { + return localIdentities_.size(); + } else { + return localIdentitiesBuilder_.getCount(); + } + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public io.grpc.alts.internal.Identity getLocalIdentities(int index) { + if (localIdentitiesBuilder_ == null) { + return localIdentities_.get(index); + } else { + return localIdentitiesBuilder_.getMessage(index); + } + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + 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; + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + 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; + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + 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; + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + 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; + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + 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; + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + 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; + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public Builder addAllLocalIdentities( + java.lang.Iterable values) { + if (localIdentitiesBuilder_ == null) { + ensureLocalIdentitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, localIdentities_); + onChanged(); + } else { + localIdentitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public Builder clearLocalIdentities() { + if (localIdentitiesBuilder_ == null) { + localIdentities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + localIdentitiesBuilder_.clear(); + } + return this; + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public Builder removeLocalIdentities(int index) { + if (localIdentitiesBuilder_ == null) { + ensureLocalIdentitiesIsMutable(); + localIdentities_.remove(index); + onChanged(); + } else { + localIdentitiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public io.grpc.alts.internal.Identity.Builder getLocalIdentitiesBuilder( + int index) { + return getLocalIdentitiesFieldBuilder().getBuilder(index); + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public io.grpc.alts.internal.IdentityOrBuilder getLocalIdentitiesOrBuilder( + int index) { + if (localIdentitiesBuilder_ == null) { + return localIdentities_.get(index); } else { + return localIdentitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public java.util.List + getLocalIdentitiesOrBuilderList() { + if (localIdentitiesBuilder_ != null) { + return localIdentitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(localIdentities_); + } + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public io.grpc.alts.internal.Identity.Builder addLocalIdentitiesBuilder() { + return getLocalIdentitiesFieldBuilder().addBuilder( + io.grpc.alts.internal.Identity.getDefaultInstance()); + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public io.grpc.alts.internal.Identity.Builder addLocalIdentitiesBuilder( + int index) { + return getLocalIdentitiesFieldBuilder().addBuilder( + index, io.grpc.alts.internal.Identity.getDefaultInstance()); + } + /** + *
+     * (Optional) A list of local identities supported by the server, if
+     * specified. Otherwise, the handshaker chooses a default local identity.
+     * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + public java.util.List + 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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.ServerHandshakeParameters getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/ServerHandshakeParametersOrBuilder.java b/alts/src/generated/main/java/io/grpc/alts/internal/ServerHandshakeParametersOrBuilder.java new file mode 100644 index 0000000000..2b16fe509c --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/ServerHandshakeParametersOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +public interface ServerHandshakeParametersOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.ServerHandshakeParameters) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The record protocols supported by the server, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 1; + */ + java.util.List + getRecordProtocolsList(); + /** + *
+   * The record protocols supported by the server, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 1; + */ + int getRecordProtocolsCount(); + /** + *
+   * The record protocols supported by the server, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 1; + */ + java.lang.String getRecordProtocols(int index); + /** + *
+   * The record protocols supported by the server, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 1; + */ + com.google.protobuf.ByteString + getRecordProtocolsBytes(int index); + + /** + *
+   * (Optional) A list of local identities supported by the server, if
+   * specified. Otherwise, the handshaker chooses a default local identity.
+   * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + java.util.List + getLocalIdentitiesList(); + /** + *
+   * (Optional) A list of local identities supported by the server, if
+   * specified. Otherwise, the handshaker chooses a default local identity.
+   * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + io.grpc.alts.internal.Identity getLocalIdentities(int index); + /** + *
+   * (Optional) A list of local identities supported by the server, if
+   * specified. Otherwise, the handshaker chooses a default local identity.
+   * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + int getLocalIdentitiesCount(); + /** + *
+   * (Optional) A list of local identities supported by the server, if
+   * specified. Otherwise, the handshaker chooses a default local identity.
+   * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + java.util.List + getLocalIdentitiesOrBuilderList(); + /** + *
+   * (Optional) A list of local identities supported by the server, if
+   * specified. Otherwise, the handshaker chooses a default local identity.
+   * 
+ * + * repeated .grpc.gcp.Identity local_identities = 2; + */ + io.grpc.alts.internal.IdentityOrBuilder getLocalIdentitiesOrBuilder( + int index); +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/StartClientHandshakeReq.java b/alts/src/generated/main/java/io/grpc/alts/internal/StartClientHandshakeReq.java new file mode 100644 index 0000000000..41aeb12f8f --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/StartClientHandshakeReq.java @@ -0,0 +1,2577 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +/** + * Protobuf type {@code grpc.gcp.StartClientHandshakeReq} + */ +public final class StartClientHandshakeReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gcp.StartClientHandshakeReq) + StartClientHandshakeReqOrBuilder { +private static final long serialVersionUID = 0L; + // Use StartClientHandshakeReq.newBuilder() to construct. + private StartClientHandshakeReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StartClientHandshakeReq() { + handshakeSecurityProtocol_ = 0; + applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + targetIdentities_ = java.util.Collections.emptyList(); + targetName_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StartClientHandshakeReq( + 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 8: { + int rawValue = input.readEnum(); + + handshakeSecurityProtocol_ = rawValue; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + applicationProtocols_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + applicationProtocols_.add(s); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + recordProtocols_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + recordProtocols_.add(s); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + targetIdentities_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + targetIdentities_.add( + input.readMessage(io.grpc.alts.internal.Identity.parser(), extensionRegistry)); + 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 50: { + io.grpc.alts.internal.Endpoint.Builder subBuilder = null; + if (localEndpoint_ != null) { + subBuilder = localEndpoint_.toBuilder(); + } + localEndpoint_ = input.readMessage(io.grpc.alts.internal.Endpoint.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(localEndpoint_); + localEndpoint_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + io.grpc.alts.internal.Endpoint.Builder subBuilder = null; + if (remoteEndpoint_ != null) { + subBuilder = remoteEndpoint_.toBuilder(); + } + remoteEndpoint_ = input.readMessage(io.grpc.alts.internal.Endpoint.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(remoteEndpoint_); + remoteEndpoint_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + targetName_ = s; + break; + } + case 74: { + io.grpc.alts.internal.RpcProtocolVersions.Builder subBuilder = null; + if (rpcVersions_ != null) { + subBuilder = rpcVersions_.toBuilder(); + } + rpcVersions_ = input.readMessage(io.grpc.alts.internal.RpcProtocolVersions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcVersions_); + rpcVersions_ = 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 { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + applicationProtocols_ = applicationProtocols_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + recordProtocols_ = recordProtocols_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + targetIdentities_ = java.util.Collections.unmodifiableList(targetIdentities_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_StartClientHandshakeReq_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_StartClientHandshakeReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.StartClientHandshakeReq.class, io.grpc.alts.internal.StartClientHandshakeReq.Builder.class); + } + + private int bitField0_; + public static final int HANDSHAKE_SECURITY_PROTOCOL_FIELD_NUMBER = 1; + private int handshakeSecurityProtocol_; + /** + *
+   * Handshake security protocol requested by the client.
+   * 
+ * + * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; + */ + public int getHandshakeSecurityProtocolValue() { + return handshakeSecurityProtocol_; + } + /** + *
+   * Handshake security protocol requested by the client.
+   * 
+ * + * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; + */ + public io.grpc.alts.internal.HandshakeProtocol getHandshakeSecurityProtocol() { + io.grpc.alts.internal.HandshakeProtocol result = io.grpc.alts.internal.HandshakeProtocol.valueOf(handshakeSecurityProtocol_); + return result == null ? io.grpc.alts.internal.HandshakeProtocol.UNRECOGNIZED : result; + } + + public static final int APPLICATION_PROTOCOLS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList applicationProtocols_; + /** + *
+   * The application protocols supported by the client, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 2; + */ + public com.google.protobuf.ProtocolStringList + getApplicationProtocolsList() { + return applicationProtocols_; + } + /** + *
+   * The application protocols supported by the client, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 2; + */ + public int getApplicationProtocolsCount() { + return applicationProtocols_.size(); + } + /** + *
+   * The application protocols supported by the client, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 2; + */ + public java.lang.String getApplicationProtocols(int index) { + return applicationProtocols_.get(index); + } + /** + *
+   * The application protocols supported by the client, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 2; + */ + public com.google.protobuf.ByteString + getApplicationProtocolsBytes(int index) { + return applicationProtocols_.getByteString(index); + } + + public static final int RECORD_PROTOCOLS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList recordProtocols_; + /** + *
+   * The record protocols supported by the client, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 3; + */ + public com.google.protobuf.ProtocolStringList + getRecordProtocolsList() { + return recordProtocols_; + } + /** + *
+   * The record protocols supported by the client, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 3; + */ + public int getRecordProtocolsCount() { + return recordProtocols_.size(); + } + /** + *
+   * The record protocols supported by the client, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 3; + */ + public java.lang.String getRecordProtocols(int index) { + return recordProtocols_.get(index); + } + /** + *
+   * The record protocols supported by the client, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 3; + */ + public com.google.protobuf.ByteString + getRecordProtocolsBytes(int index) { + return recordProtocols_.getByteString(index); + } + + public static final int TARGET_IDENTITIES_FIELD_NUMBER = 4; + private java.util.List targetIdentities_; + /** + *
+   * (Optional) Describes which server identities are acceptable by the client.
+   * If target identities are provided and none of them matches the peer
+   * identity of the server, handshake will fail.
+   * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public java.util.List getTargetIdentitiesList() { + return targetIdentities_; + } + /** + *
+   * (Optional) Describes which server identities are acceptable by the client.
+   * If target identities are provided and none of them matches the peer
+   * identity of the server, handshake will fail.
+   * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public java.util.List + getTargetIdentitiesOrBuilderList() { + return targetIdentities_; + } + /** + *
+   * (Optional) Describes which server identities are acceptable by the client.
+   * If target identities are provided and none of them matches the peer
+   * identity of the server, handshake will fail.
+   * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public int getTargetIdentitiesCount() { + return targetIdentities_.size(); + } + /** + *
+   * (Optional) Describes which server identities are acceptable by the client.
+   * If target identities are provided and none of them matches the peer
+   * identity of the server, handshake will fail.
+   * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public io.grpc.alts.internal.Identity getTargetIdentities(int index) { + return targetIdentities_.get(index); + } + /** + *
+   * (Optional) Describes which server identities are acceptable by the client.
+   * If target identities are provided and none of them matches the peer
+   * identity of the server, handshake will fail.
+   * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public io.grpc.alts.internal.IdentityOrBuilder getTargetIdentitiesOrBuilder( + int index) { + return targetIdentities_.get(index); + } + + public static final int LOCAL_IDENTITY_FIELD_NUMBER = 5; + private io.grpc.alts.internal.Identity localIdentity_; + /** + *
+   * (Optional) Application may specify a local identity. Otherwise, the
+   * handshaker chooses a default local identity.
+   * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public boolean hasLocalIdentity() { + return localIdentity_ != null; + } + /** + *
+   * (Optional) Application may specify a local identity. Otherwise, the
+   * handshaker chooses a default local identity.
+   * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public io.grpc.alts.internal.Identity getLocalIdentity() { + return localIdentity_ == null ? io.grpc.alts.internal.Identity.getDefaultInstance() : localIdentity_; + } + /** + *
+   * (Optional) Application may specify a local identity. Otherwise, the
+   * handshaker chooses a default local identity.
+   * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public io.grpc.alts.internal.IdentityOrBuilder getLocalIdentityOrBuilder() { + return getLocalIdentity(); + } + + public static final int LOCAL_ENDPOINT_FIELD_NUMBER = 6; + private io.grpc.alts.internal.Endpoint localEndpoint_; + /** + *
+   * (Optional) Local endpoint information of the connection to the server,
+   * such as local IP address, port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + public boolean hasLocalEndpoint() { + return localEndpoint_ != null; + } + /** + *
+   * (Optional) Local endpoint information of the connection to the server,
+   * such as local IP address, port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + public io.grpc.alts.internal.Endpoint getLocalEndpoint() { + return localEndpoint_ == null ? io.grpc.alts.internal.Endpoint.getDefaultInstance() : localEndpoint_; + } + /** + *
+   * (Optional) Local endpoint information of the connection to the server,
+   * such as local IP address, port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + public io.grpc.alts.internal.EndpointOrBuilder getLocalEndpointOrBuilder() { + return getLocalEndpoint(); + } + + public static final int REMOTE_ENDPOINT_FIELD_NUMBER = 7; + private io.grpc.alts.internal.Endpoint remoteEndpoint_; + /** + *
+   * (Optional) Endpoint information of the remote server, such as IP address,
+   * port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + public boolean hasRemoteEndpoint() { + return remoteEndpoint_ != null; + } + /** + *
+   * (Optional) Endpoint information of the remote server, such as IP address,
+   * port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + public io.grpc.alts.internal.Endpoint getRemoteEndpoint() { + return remoteEndpoint_ == null ? io.grpc.alts.internal.Endpoint.getDefaultInstance() : remoteEndpoint_; + } + /** + *
+   * (Optional) Endpoint information of the remote server, such as IP address,
+   * port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + public io.grpc.alts.internal.EndpointOrBuilder getRemoteEndpointOrBuilder() { + return getRemoteEndpoint(); + } + + public static final int TARGET_NAME_FIELD_NUMBER = 8; + private volatile java.lang.Object targetName_; + /** + *
+   * (Optional) If target name is provided, a secure naming check is performed
+   * to verify that the peer authenticated identity is indeed authorized to run
+   * the target name.
+   * 
+ * + * string target_name = 8; + */ + public java.lang.String getTargetName() { + java.lang.Object ref = targetName_; + 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(); + targetName_ = s; + return s; + } + } + /** + *
+   * (Optional) If target name is provided, a secure naming check is performed
+   * to verify that the peer authenticated identity is indeed authorized to run
+   * the target name.
+   * 
+ * + * string target_name = 8; + */ + public com.google.protobuf.ByteString + getTargetNameBytes() { + java.lang.Object ref = targetName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + targetName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RPC_VERSIONS_FIELD_NUMBER = 9; + private io.grpc.alts.internal.RpcProtocolVersions rpcVersions_; + /** + *
+   * (Optional) RPC protocol versions supported by the client.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + public boolean hasRpcVersions() { + return rpcVersions_ != null; + } + /** + *
+   * (Optional) RPC protocol versions supported by the client.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + public io.grpc.alts.internal.RpcProtocolVersions getRpcVersions() { + return rpcVersions_ == null ? io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : rpcVersions_; + } + /** + *
+   * (Optional) RPC protocol versions supported by the client.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + public io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder() { + return getRpcVersions(); + } + + 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 (handshakeSecurityProtocol_ != io.grpc.alts.internal.HandshakeProtocol.HANDSHAKE_PROTOCOL_UNSPECIFIED.getNumber()) { + output.writeEnum(1, handshakeSecurityProtocol_); + } + for (int i = 0; i < applicationProtocols_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, applicationProtocols_.getRaw(i)); + } + for (int i = 0; i < recordProtocols_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, recordProtocols_.getRaw(i)); + } + for (int i = 0; i < targetIdentities_.size(); i++) { + output.writeMessage(4, targetIdentities_.get(i)); + } + if (localIdentity_ != null) { + output.writeMessage(5, getLocalIdentity()); + } + if (localEndpoint_ != null) { + output.writeMessage(6, getLocalEndpoint()); + } + if (remoteEndpoint_ != null) { + output.writeMessage(7, getRemoteEndpoint()); + } + if (!getTargetNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, targetName_); + } + if (rpcVersions_ != null) { + output.writeMessage(9, getRpcVersions()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (handshakeSecurityProtocol_ != io.grpc.alts.internal.HandshakeProtocol.HANDSHAKE_PROTOCOL_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, handshakeSecurityProtocol_); + } + { + int dataSize = 0; + for (int i = 0; i < applicationProtocols_.size(); i++) { + dataSize += computeStringSizeNoTag(applicationProtocols_.getRaw(i)); + } + size += dataSize; + size += 1 * getApplicationProtocolsList().size(); + } + { + 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 < targetIdentities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, targetIdentities_.get(i)); + } + if (localIdentity_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getLocalIdentity()); + } + if (localEndpoint_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getLocalEndpoint()); + } + if (remoteEndpoint_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getRemoteEndpoint()); + } + if (!getTargetNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, targetName_); + } + if (rpcVersions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getRpcVersions()); + } + 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.StartClientHandshakeReq)) { + return super.equals(obj); + } + io.grpc.alts.internal.StartClientHandshakeReq other = (io.grpc.alts.internal.StartClientHandshakeReq) obj; + + boolean result = true; + result = result && handshakeSecurityProtocol_ == other.handshakeSecurityProtocol_; + result = result && getApplicationProtocolsList() + .equals(other.getApplicationProtocolsList()); + result = result && getRecordProtocolsList() + .equals(other.getRecordProtocolsList()); + result = result && getTargetIdentitiesList() + .equals(other.getTargetIdentitiesList()); + result = result && (hasLocalIdentity() == other.hasLocalIdentity()); + if (hasLocalIdentity()) { + result = result && getLocalIdentity() + .equals(other.getLocalIdentity()); + } + result = result && (hasLocalEndpoint() == other.hasLocalEndpoint()); + if (hasLocalEndpoint()) { + result = result && getLocalEndpoint() + .equals(other.getLocalEndpoint()); + } + result = result && (hasRemoteEndpoint() == other.hasRemoteEndpoint()); + if (hasRemoteEndpoint()) { + result = result && getRemoteEndpoint() + .equals(other.getRemoteEndpoint()); + } + result = result && getTargetName() + .equals(other.getTargetName()); + result = result && (hasRpcVersions() == other.hasRpcVersions()); + if (hasRpcVersions()) { + result = result && getRpcVersions() + .equals(other.getRpcVersions()); + } + 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) + HANDSHAKE_SECURITY_PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + handshakeSecurityProtocol_; + if (getApplicationProtocolsCount() > 0) { + hash = (37 * hash) + APPLICATION_PROTOCOLS_FIELD_NUMBER; + hash = (53 * hash) + getApplicationProtocolsList().hashCode(); + } + if (getRecordProtocolsCount() > 0) { + hash = (37 * hash) + RECORD_PROTOCOLS_FIELD_NUMBER; + hash = (53 * hash) + getRecordProtocolsList().hashCode(); + } + if (getTargetIdentitiesCount() > 0) { + hash = (37 * hash) + TARGET_IDENTITIES_FIELD_NUMBER; + hash = (53 * hash) + getTargetIdentitiesList().hashCode(); + } + if (hasLocalIdentity()) { + hash = (37 * hash) + LOCAL_IDENTITY_FIELD_NUMBER; + hash = (53 * hash) + getLocalIdentity().hashCode(); + } + if (hasLocalEndpoint()) { + hash = (37 * hash) + LOCAL_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getLocalEndpoint().hashCode(); + } + if (hasRemoteEndpoint()) { + hash = (37 * hash) + REMOTE_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getRemoteEndpoint().hashCode(); + } + hash = (37 * hash) + TARGET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTargetName().hashCode(); + if (hasRpcVersions()) { + hash = (37 * hash) + RPC_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getRpcVersions().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.alts.internal.StartClientHandshakeReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.StartClientHandshakeReq 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.StartClientHandshakeReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.StartClientHandshakeReq 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.StartClientHandshakeReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.StartClientHandshakeReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.alts.internal.StartClientHandshakeReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.StartClientHandshakeReq 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.StartClientHandshakeReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.StartClientHandshakeReq 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.StartClientHandshakeReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.StartClientHandshakeReq 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.StartClientHandshakeReq 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.StartClientHandshakeReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gcp.StartClientHandshakeReq) + io.grpc.alts.internal.StartClientHandshakeReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_StartClientHandshakeReq_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_StartClientHandshakeReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.StartClientHandshakeReq.class, io.grpc.alts.internal.StartClientHandshakeReq.Builder.class); + } + + // Construct using io.grpc.alts.internal.StartClientHandshakeReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTargetIdentitiesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + handshakeSecurityProtocol_ = 0; + + applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + if (targetIdentitiesBuilder_ == null) { + targetIdentities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + targetIdentitiesBuilder_.clear(); + } + if (localIdentityBuilder_ == null) { + localIdentity_ = null; + } else { + localIdentity_ = null; + localIdentityBuilder_ = null; + } + if (localEndpointBuilder_ == null) { + localEndpoint_ = null; + } else { + localEndpoint_ = null; + localEndpointBuilder_ = null; + } + if (remoteEndpointBuilder_ == null) { + remoteEndpoint_ = null; + } else { + remoteEndpoint_ = null; + remoteEndpointBuilder_ = null; + } + targetName_ = ""; + + if (rpcVersionsBuilder_ == null) { + rpcVersions_ = null; + } else { + rpcVersions_ = null; + rpcVersionsBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_StartClientHandshakeReq_descriptor; + } + + public io.grpc.alts.internal.StartClientHandshakeReq getDefaultInstanceForType() { + return io.grpc.alts.internal.StartClientHandshakeReq.getDefaultInstance(); + } + + public io.grpc.alts.internal.StartClientHandshakeReq build() { + io.grpc.alts.internal.StartClientHandshakeReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.alts.internal.StartClientHandshakeReq buildPartial() { + io.grpc.alts.internal.StartClientHandshakeReq result = new io.grpc.alts.internal.StartClientHandshakeReq(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.handshakeSecurityProtocol_ = handshakeSecurityProtocol_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + applicationProtocols_ = applicationProtocols_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.applicationProtocols_ = applicationProtocols_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + recordProtocols_ = recordProtocols_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.recordProtocols_ = recordProtocols_; + if (targetIdentitiesBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + targetIdentities_ = java.util.Collections.unmodifiableList(targetIdentities_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.targetIdentities_ = targetIdentities_; + } else { + result.targetIdentities_ = targetIdentitiesBuilder_.build(); + } + if (localIdentityBuilder_ == null) { + result.localIdentity_ = localIdentity_; + } else { + result.localIdentity_ = localIdentityBuilder_.build(); + } + if (localEndpointBuilder_ == null) { + result.localEndpoint_ = localEndpoint_; + } else { + result.localEndpoint_ = localEndpointBuilder_.build(); + } + if (remoteEndpointBuilder_ == null) { + result.remoteEndpoint_ = remoteEndpoint_; + } else { + result.remoteEndpoint_ = remoteEndpointBuilder_.build(); + } + result.targetName_ = targetName_; + if (rpcVersionsBuilder_ == null) { + result.rpcVersions_ = rpcVersions_; + } else { + result.rpcVersions_ = rpcVersionsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + 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.StartClientHandshakeReq) { + return mergeFrom((io.grpc.alts.internal.StartClientHandshakeReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.alts.internal.StartClientHandshakeReq other) { + if (other == io.grpc.alts.internal.StartClientHandshakeReq.getDefaultInstance()) return this; + if (other.handshakeSecurityProtocol_ != 0) { + setHandshakeSecurityProtocolValue(other.getHandshakeSecurityProtocolValue()); + } + if (!other.applicationProtocols_.isEmpty()) { + if (applicationProtocols_.isEmpty()) { + applicationProtocols_ = other.applicationProtocols_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureApplicationProtocolsIsMutable(); + applicationProtocols_.addAll(other.applicationProtocols_); + } + onChanged(); + } + if (!other.recordProtocols_.isEmpty()) { + if (recordProtocols_.isEmpty()) { + recordProtocols_ = other.recordProtocols_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRecordProtocolsIsMutable(); + recordProtocols_.addAll(other.recordProtocols_); + } + onChanged(); + } + if (targetIdentitiesBuilder_ == null) { + if (!other.targetIdentities_.isEmpty()) { + if (targetIdentities_.isEmpty()) { + targetIdentities_ = other.targetIdentities_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTargetIdentitiesIsMutable(); + targetIdentities_.addAll(other.targetIdentities_); + } + onChanged(); + } + } else { + if (!other.targetIdentities_.isEmpty()) { + if (targetIdentitiesBuilder_.isEmpty()) { + targetIdentitiesBuilder_.dispose(); + targetIdentitiesBuilder_ = null; + targetIdentities_ = other.targetIdentities_; + bitField0_ = (bitField0_ & ~0x00000008); + targetIdentitiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTargetIdentitiesFieldBuilder() : null; + } else { + targetIdentitiesBuilder_.addAllMessages(other.targetIdentities_); + } + } + } + if (other.hasLocalIdentity()) { + mergeLocalIdentity(other.getLocalIdentity()); + } + if (other.hasLocalEndpoint()) { + mergeLocalEndpoint(other.getLocalEndpoint()); + } + if (other.hasRemoteEndpoint()) { + mergeRemoteEndpoint(other.getRemoteEndpoint()); + } + if (!other.getTargetName().isEmpty()) { + targetName_ = other.targetName_; + onChanged(); + } + if (other.hasRpcVersions()) { + mergeRpcVersions(other.getRpcVersions()); + } + 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.StartClientHandshakeReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.alts.internal.StartClientHandshakeReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int handshakeSecurityProtocol_ = 0; + /** + *
+     * Handshake security protocol requested by the client.
+     * 
+ * + * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; + */ + public int getHandshakeSecurityProtocolValue() { + return handshakeSecurityProtocol_; + } + /** + *
+     * Handshake security protocol requested by the client.
+     * 
+ * + * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; + */ + public Builder setHandshakeSecurityProtocolValue(int value) { + handshakeSecurityProtocol_ = value; + onChanged(); + return this; + } + /** + *
+     * Handshake security protocol requested by the client.
+     * 
+ * + * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; + */ + public io.grpc.alts.internal.HandshakeProtocol getHandshakeSecurityProtocol() { + io.grpc.alts.internal.HandshakeProtocol result = io.grpc.alts.internal.HandshakeProtocol.valueOf(handshakeSecurityProtocol_); + return result == null ? io.grpc.alts.internal.HandshakeProtocol.UNRECOGNIZED : result; + } + /** + *
+     * Handshake security protocol requested by the client.
+     * 
+ * + * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; + */ + public Builder setHandshakeSecurityProtocol(io.grpc.alts.internal.HandshakeProtocol value) { + if (value == null) { + throw new NullPointerException(); + } + + handshakeSecurityProtocol_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Handshake security protocol requested by the client.
+     * 
+ * + * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; + */ + public Builder clearHandshakeSecurityProtocol() { + + handshakeSecurityProtocol_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureApplicationProtocolsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + applicationProtocols_ = new com.google.protobuf.LazyStringArrayList(applicationProtocols_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * The application protocols supported by the client, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 2; + */ + public com.google.protobuf.ProtocolStringList + getApplicationProtocolsList() { + return applicationProtocols_.getUnmodifiableView(); + } + /** + *
+     * The application protocols supported by the client, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 2; + */ + public int getApplicationProtocolsCount() { + return applicationProtocols_.size(); + } + /** + *
+     * The application protocols supported by the client, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 2; + */ + public java.lang.String getApplicationProtocols(int index) { + return applicationProtocols_.get(index); + } + /** + *
+     * The application protocols supported by the client, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 2; + */ + public com.google.protobuf.ByteString + getApplicationProtocolsBytes(int index) { + return applicationProtocols_.getByteString(index); + } + /** + *
+     * The application protocols supported by the client, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 2; + */ + public Builder setApplicationProtocols( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationProtocolsIsMutable(); + applicationProtocols_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The application protocols supported by the client, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 2; + */ + public Builder addApplicationProtocols( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationProtocolsIsMutable(); + applicationProtocols_.add(value); + onChanged(); + return this; + } + /** + *
+     * The application protocols supported by the client, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 2; + */ + public Builder addAllApplicationProtocols( + java.lang.Iterable values) { + ensureApplicationProtocolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, applicationProtocols_); + onChanged(); + return this; + } + /** + *
+     * The application protocols supported by the client, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 2; + */ + public Builder clearApplicationProtocols() { + applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The application protocols supported by the client, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 2; + */ + public Builder addApplicationProtocolsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureApplicationProtocolsIsMutable(); + applicationProtocols_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRecordProtocolsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + recordProtocols_ = new com.google.protobuf.LazyStringArrayList(recordProtocols_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * The record protocols supported by the client, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 3; + */ + public com.google.protobuf.ProtocolStringList + getRecordProtocolsList() { + return recordProtocols_.getUnmodifiableView(); + } + /** + *
+     * The record protocols supported by the client, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 3; + */ + public int getRecordProtocolsCount() { + return recordProtocols_.size(); + } + /** + *
+     * The record protocols supported by the client, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 3; + */ + public java.lang.String getRecordProtocols(int index) { + return recordProtocols_.get(index); + } + /** + *
+     * The record protocols supported by the client, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 3; + */ + public com.google.protobuf.ByteString + getRecordProtocolsBytes(int index) { + return recordProtocols_.getByteString(index); + } + /** + *
+     * The record protocols supported by the client, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 3; + */ + public Builder setRecordProtocols( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordProtocolsIsMutable(); + recordProtocols_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The record protocols supported by the client, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 3; + */ + public Builder addRecordProtocols( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordProtocolsIsMutable(); + recordProtocols_.add(value); + onChanged(); + return this; + } + /** + *
+     * The record protocols supported by the client, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 3; + */ + public Builder addAllRecordProtocols( + java.lang.Iterable values) { + ensureRecordProtocolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, recordProtocols_); + onChanged(); + return this; + } + /** + *
+     * The record protocols supported by the client, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 3; + */ + public Builder clearRecordProtocols() { + recordProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The record protocols supported by the client, e.g.,
+     * "ALTSRP_GCM_AES128".
+     * 
+ * + * repeated string record_protocols = 3; + */ + 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 targetIdentities_ = + java.util.Collections.emptyList(); + private void ensureTargetIdentitiesIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + targetIdentities_ = new java.util.ArrayList(targetIdentities_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grpc.alts.internal.Identity, io.grpc.alts.internal.Identity.Builder, io.grpc.alts.internal.IdentityOrBuilder> targetIdentitiesBuilder_; + + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public java.util.List getTargetIdentitiesList() { + if (targetIdentitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(targetIdentities_); + } else { + return targetIdentitiesBuilder_.getMessageList(); + } + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public int getTargetIdentitiesCount() { + if (targetIdentitiesBuilder_ == null) { + return targetIdentities_.size(); + } else { + return targetIdentitiesBuilder_.getCount(); + } + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public io.grpc.alts.internal.Identity getTargetIdentities(int index) { + if (targetIdentitiesBuilder_ == null) { + return targetIdentities_.get(index); + } else { + return targetIdentitiesBuilder_.getMessage(index); + } + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public Builder setTargetIdentities( + int index, io.grpc.alts.internal.Identity value) { + if (targetIdentitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetIdentitiesIsMutable(); + targetIdentities_.set(index, value); + onChanged(); + } else { + targetIdentitiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public Builder setTargetIdentities( + int index, io.grpc.alts.internal.Identity.Builder builderForValue) { + if (targetIdentitiesBuilder_ == null) { + ensureTargetIdentitiesIsMutable(); + targetIdentities_.set(index, builderForValue.build()); + onChanged(); + } else { + targetIdentitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public Builder addTargetIdentities(io.grpc.alts.internal.Identity value) { + if (targetIdentitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetIdentitiesIsMutable(); + targetIdentities_.add(value); + onChanged(); + } else { + targetIdentitiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public Builder addTargetIdentities( + int index, io.grpc.alts.internal.Identity value) { + if (targetIdentitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetIdentitiesIsMutable(); + targetIdentities_.add(index, value); + onChanged(); + } else { + targetIdentitiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public Builder addTargetIdentities( + io.grpc.alts.internal.Identity.Builder builderForValue) { + if (targetIdentitiesBuilder_ == null) { + ensureTargetIdentitiesIsMutable(); + targetIdentities_.add(builderForValue.build()); + onChanged(); + } else { + targetIdentitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public Builder addTargetIdentities( + int index, io.grpc.alts.internal.Identity.Builder builderForValue) { + if (targetIdentitiesBuilder_ == null) { + ensureTargetIdentitiesIsMutable(); + targetIdentities_.add(index, builderForValue.build()); + onChanged(); + } else { + targetIdentitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public Builder addAllTargetIdentities( + java.lang.Iterable values) { + if (targetIdentitiesBuilder_ == null) { + ensureTargetIdentitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, targetIdentities_); + onChanged(); + } else { + targetIdentitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public Builder clearTargetIdentities() { + if (targetIdentitiesBuilder_ == null) { + targetIdentities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + targetIdentitiesBuilder_.clear(); + } + return this; + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public Builder removeTargetIdentities(int index) { + if (targetIdentitiesBuilder_ == null) { + ensureTargetIdentitiesIsMutable(); + targetIdentities_.remove(index); + onChanged(); + } else { + targetIdentitiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public io.grpc.alts.internal.Identity.Builder getTargetIdentitiesBuilder( + int index) { + return getTargetIdentitiesFieldBuilder().getBuilder(index); + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public io.grpc.alts.internal.IdentityOrBuilder getTargetIdentitiesOrBuilder( + int index) { + if (targetIdentitiesBuilder_ == null) { + return targetIdentities_.get(index); } else { + return targetIdentitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public java.util.List + getTargetIdentitiesOrBuilderList() { + if (targetIdentitiesBuilder_ != null) { + return targetIdentitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(targetIdentities_); + } + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public io.grpc.alts.internal.Identity.Builder addTargetIdentitiesBuilder() { + return getTargetIdentitiesFieldBuilder().addBuilder( + io.grpc.alts.internal.Identity.getDefaultInstance()); + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public io.grpc.alts.internal.Identity.Builder addTargetIdentitiesBuilder( + int index) { + return getTargetIdentitiesFieldBuilder().addBuilder( + index, io.grpc.alts.internal.Identity.getDefaultInstance()); + } + /** + *
+     * (Optional) Describes which server identities are acceptable by the client.
+     * If target identities are provided and none of them matches the peer
+     * identity of the server, handshake will fail.
+     * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + public java.util.List + getTargetIdentitiesBuilderList() { + return getTargetIdentitiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.grpc.alts.internal.Identity, io.grpc.alts.internal.Identity.Builder, io.grpc.alts.internal.IdentityOrBuilder> + getTargetIdentitiesFieldBuilder() { + if (targetIdentitiesBuilder_ == null) { + targetIdentitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.grpc.alts.internal.Identity, io.grpc.alts.internal.Identity.Builder, io.grpc.alts.internal.IdentityOrBuilder>( + targetIdentities_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + targetIdentities_ = null; + } + return targetIdentitiesBuilder_; + } + + 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_; + /** + *
+     * (Optional) Application may specify a local identity. Otherwise, the
+     * handshaker chooses a default local identity.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public boolean hasLocalIdentity() { + return localIdentityBuilder_ != null || localIdentity_ != null; + } + /** + *
+     * (Optional) Application may specify a local identity. Otherwise, the
+     * handshaker chooses a default local identity.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public io.grpc.alts.internal.Identity getLocalIdentity() { + if (localIdentityBuilder_ == null) { + return localIdentity_ == null ? io.grpc.alts.internal.Identity.getDefaultInstance() : localIdentity_; + } else { + return localIdentityBuilder_.getMessage(); + } + } + /** + *
+     * (Optional) Application may specify a local identity. Otherwise, the
+     * handshaker chooses a default local identity.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + 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; + } + /** + *
+     * (Optional) Application may specify a local identity. Otherwise, the
+     * handshaker chooses a default local identity.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public Builder setLocalIdentity( + io.grpc.alts.internal.Identity.Builder builderForValue) { + if (localIdentityBuilder_ == null) { + localIdentity_ = builderForValue.build(); + onChanged(); + } else { + localIdentityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * (Optional) Application may specify a local identity. Otherwise, the
+     * handshaker chooses a default local identity.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + 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; + } + /** + *
+     * (Optional) Application may specify a local identity. Otherwise, the
+     * handshaker chooses a default local identity.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public Builder clearLocalIdentity() { + if (localIdentityBuilder_ == null) { + localIdentity_ = null; + onChanged(); + } else { + localIdentity_ = null; + localIdentityBuilder_ = null; + } + + return this; + } + /** + *
+     * (Optional) Application may specify a local identity. Otherwise, the
+     * handshaker chooses a default local identity.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public io.grpc.alts.internal.Identity.Builder getLocalIdentityBuilder() { + + onChanged(); + return getLocalIdentityFieldBuilder().getBuilder(); + } + /** + *
+     * (Optional) Application may specify a local identity. Otherwise, the
+     * handshaker chooses a default local identity.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + public io.grpc.alts.internal.IdentityOrBuilder getLocalIdentityOrBuilder() { + if (localIdentityBuilder_ != null) { + return localIdentityBuilder_.getMessageOrBuilder(); + } else { + return localIdentity_ == null ? + io.grpc.alts.internal.Identity.getDefaultInstance() : localIdentity_; + } + } + /** + *
+     * (Optional) Application may specify a local identity. Otherwise, the
+     * handshaker chooses a default local identity.
+     * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + 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 io.grpc.alts.internal.Endpoint localEndpoint_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.Endpoint, io.grpc.alts.internal.Endpoint.Builder, io.grpc.alts.internal.EndpointOrBuilder> localEndpointBuilder_; + /** + *
+     * (Optional) Local endpoint information of the connection to the server,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + public boolean hasLocalEndpoint() { + return localEndpointBuilder_ != null || localEndpoint_ != null; + } + /** + *
+     * (Optional) Local endpoint information of the connection to the server,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + public io.grpc.alts.internal.Endpoint getLocalEndpoint() { + if (localEndpointBuilder_ == null) { + return localEndpoint_ == null ? io.grpc.alts.internal.Endpoint.getDefaultInstance() : localEndpoint_; + } else { + return localEndpointBuilder_.getMessage(); + } + } + /** + *
+     * (Optional) Local endpoint information of the connection to the server,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + public Builder setLocalEndpoint(io.grpc.alts.internal.Endpoint value) { + if (localEndpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + localEndpoint_ = value; + onChanged(); + } else { + localEndpointBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * (Optional) Local endpoint information of the connection to the server,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + public Builder setLocalEndpoint( + io.grpc.alts.internal.Endpoint.Builder builderForValue) { + if (localEndpointBuilder_ == null) { + localEndpoint_ = builderForValue.build(); + onChanged(); + } else { + localEndpointBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * (Optional) Local endpoint information of the connection to the server,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + public Builder mergeLocalEndpoint(io.grpc.alts.internal.Endpoint value) { + if (localEndpointBuilder_ == null) { + if (localEndpoint_ != null) { + localEndpoint_ = + io.grpc.alts.internal.Endpoint.newBuilder(localEndpoint_).mergeFrom(value).buildPartial(); + } else { + localEndpoint_ = value; + } + onChanged(); + } else { + localEndpointBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * (Optional) Local endpoint information of the connection to the server,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + public Builder clearLocalEndpoint() { + if (localEndpointBuilder_ == null) { + localEndpoint_ = null; + onChanged(); + } else { + localEndpoint_ = null; + localEndpointBuilder_ = null; + } + + return this; + } + /** + *
+     * (Optional) Local endpoint information of the connection to the server,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + public io.grpc.alts.internal.Endpoint.Builder getLocalEndpointBuilder() { + + onChanged(); + return getLocalEndpointFieldBuilder().getBuilder(); + } + /** + *
+     * (Optional) Local endpoint information of the connection to the server,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + public io.grpc.alts.internal.EndpointOrBuilder getLocalEndpointOrBuilder() { + if (localEndpointBuilder_ != null) { + return localEndpointBuilder_.getMessageOrBuilder(); + } else { + return localEndpoint_ == null ? + io.grpc.alts.internal.Endpoint.getDefaultInstance() : localEndpoint_; + } + } + /** + *
+     * (Optional) Local endpoint information of the connection to the server,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.Endpoint, io.grpc.alts.internal.Endpoint.Builder, io.grpc.alts.internal.EndpointOrBuilder> + getLocalEndpointFieldBuilder() { + if (localEndpointBuilder_ == null) { + localEndpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.Endpoint, io.grpc.alts.internal.Endpoint.Builder, io.grpc.alts.internal.EndpointOrBuilder>( + getLocalEndpoint(), + getParentForChildren(), + isClean()); + localEndpoint_ = null; + } + return localEndpointBuilder_; + } + + private io.grpc.alts.internal.Endpoint remoteEndpoint_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.Endpoint, io.grpc.alts.internal.Endpoint.Builder, io.grpc.alts.internal.EndpointOrBuilder> remoteEndpointBuilder_; + /** + *
+     * (Optional) Endpoint information of the remote server, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + public boolean hasRemoteEndpoint() { + return remoteEndpointBuilder_ != null || remoteEndpoint_ != null; + } + /** + *
+     * (Optional) Endpoint information of the remote server, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + public io.grpc.alts.internal.Endpoint getRemoteEndpoint() { + if (remoteEndpointBuilder_ == null) { + return remoteEndpoint_ == null ? io.grpc.alts.internal.Endpoint.getDefaultInstance() : remoteEndpoint_; + } else { + return remoteEndpointBuilder_.getMessage(); + } + } + /** + *
+     * (Optional) Endpoint information of the remote server, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + public Builder setRemoteEndpoint(io.grpc.alts.internal.Endpoint value) { + if (remoteEndpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remoteEndpoint_ = value; + onChanged(); + } else { + remoteEndpointBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * (Optional) Endpoint information of the remote server, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + public Builder setRemoteEndpoint( + io.grpc.alts.internal.Endpoint.Builder builderForValue) { + if (remoteEndpointBuilder_ == null) { + remoteEndpoint_ = builderForValue.build(); + onChanged(); + } else { + remoteEndpointBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * (Optional) Endpoint information of the remote server, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + public Builder mergeRemoteEndpoint(io.grpc.alts.internal.Endpoint value) { + if (remoteEndpointBuilder_ == null) { + if (remoteEndpoint_ != null) { + remoteEndpoint_ = + io.grpc.alts.internal.Endpoint.newBuilder(remoteEndpoint_).mergeFrom(value).buildPartial(); + } else { + remoteEndpoint_ = value; + } + onChanged(); + } else { + remoteEndpointBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * (Optional) Endpoint information of the remote server, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + public Builder clearRemoteEndpoint() { + if (remoteEndpointBuilder_ == null) { + remoteEndpoint_ = null; + onChanged(); + } else { + remoteEndpoint_ = null; + remoteEndpointBuilder_ = null; + } + + return this; + } + /** + *
+     * (Optional) Endpoint information of the remote server, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + public io.grpc.alts.internal.Endpoint.Builder getRemoteEndpointBuilder() { + + onChanged(); + return getRemoteEndpointFieldBuilder().getBuilder(); + } + /** + *
+     * (Optional) Endpoint information of the remote server, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + public io.grpc.alts.internal.EndpointOrBuilder getRemoteEndpointOrBuilder() { + if (remoteEndpointBuilder_ != null) { + return remoteEndpointBuilder_.getMessageOrBuilder(); + } else { + return remoteEndpoint_ == null ? + io.grpc.alts.internal.Endpoint.getDefaultInstance() : remoteEndpoint_; + } + } + /** + *
+     * (Optional) Endpoint information of the remote server, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.Endpoint, io.grpc.alts.internal.Endpoint.Builder, io.grpc.alts.internal.EndpointOrBuilder> + getRemoteEndpointFieldBuilder() { + if (remoteEndpointBuilder_ == null) { + remoteEndpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.Endpoint, io.grpc.alts.internal.Endpoint.Builder, io.grpc.alts.internal.EndpointOrBuilder>( + getRemoteEndpoint(), + getParentForChildren(), + isClean()); + remoteEndpoint_ = null; + } + return remoteEndpointBuilder_; + } + + private java.lang.Object targetName_ = ""; + /** + *
+     * (Optional) If target name is provided, a secure naming check is performed
+     * to verify that the peer authenticated identity is indeed authorized to run
+     * the target name.
+     * 
+ * + * string target_name = 8; + */ + public java.lang.String getTargetName() { + java.lang.Object ref = targetName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * (Optional) If target name is provided, a secure naming check is performed
+     * to verify that the peer authenticated identity is indeed authorized to run
+     * the target name.
+     * 
+ * + * string target_name = 8; + */ + public com.google.protobuf.ByteString + getTargetNameBytes() { + java.lang.Object ref = targetName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + targetName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * (Optional) If target name is provided, a secure naming check is performed
+     * to verify that the peer authenticated identity is indeed authorized to run
+     * the target name.
+     * 
+ * + * string target_name = 8; + */ + public Builder setTargetName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetName_ = value; + onChanged(); + return this; + } + /** + *
+     * (Optional) If target name is provided, a secure naming check is performed
+     * to verify that the peer authenticated identity is indeed authorized to run
+     * the target name.
+     * 
+ * + * string target_name = 8; + */ + public Builder clearTargetName() { + + targetName_ = getDefaultInstance().getTargetName(); + onChanged(); + return this; + } + /** + *
+     * (Optional) If target name is provided, a secure naming check is performed
+     * to verify that the peer authenticated identity is indeed authorized to run
+     * the target name.
+     * 
+ * + * string target_name = 8; + */ + public Builder setTargetNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetName_ = value; + onChanged(); + return this; + } + + private io.grpc.alts.internal.RpcProtocolVersions rpcVersions_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.RpcProtocolVersions, io.grpc.alts.internal.RpcProtocolVersions.Builder, io.grpc.alts.internal.RpcProtocolVersionsOrBuilder> rpcVersionsBuilder_; + /** + *
+     * (Optional) RPC protocol versions supported by the client.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + public boolean hasRpcVersions() { + return rpcVersionsBuilder_ != null || rpcVersions_ != null; + } + /** + *
+     * (Optional) RPC protocol versions supported by the client.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + public io.grpc.alts.internal.RpcProtocolVersions getRpcVersions() { + if (rpcVersionsBuilder_ == null) { + return rpcVersions_ == null ? io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : rpcVersions_; + } else { + return rpcVersionsBuilder_.getMessage(); + } + } + /** + *
+     * (Optional) RPC protocol versions supported by the client.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + public Builder setRpcVersions(io.grpc.alts.internal.RpcProtocolVersions value) { + if (rpcVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcVersions_ = value; + onChanged(); + } else { + rpcVersionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * (Optional) RPC protocol versions supported by the client.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + public Builder setRpcVersions( + io.grpc.alts.internal.RpcProtocolVersions.Builder builderForValue) { + if (rpcVersionsBuilder_ == null) { + rpcVersions_ = builderForValue.build(); + onChanged(); + } else { + rpcVersionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * (Optional) RPC protocol versions supported by the client.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + public Builder mergeRpcVersions(io.grpc.alts.internal.RpcProtocolVersions value) { + if (rpcVersionsBuilder_ == null) { + if (rpcVersions_ != null) { + rpcVersions_ = + io.grpc.alts.internal.RpcProtocolVersions.newBuilder(rpcVersions_).mergeFrom(value).buildPartial(); + } else { + rpcVersions_ = value; + } + onChanged(); + } else { + rpcVersionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * (Optional) RPC protocol versions supported by the client.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + public Builder clearRpcVersions() { + if (rpcVersionsBuilder_ == null) { + rpcVersions_ = null; + onChanged(); + } else { + rpcVersions_ = null; + rpcVersionsBuilder_ = null; + } + + return this; + } + /** + *
+     * (Optional) RPC protocol versions supported by the client.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + public io.grpc.alts.internal.RpcProtocolVersions.Builder getRpcVersionsBuilder() { + + onChanged(); + return getRpcVersionsFieldBuilder().getBuilder(); + } + /** + *
+     * (Optional) RPC protocol versions supported by the client.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + public io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder() { + if (rpcVersionsBuilder_ != null) { + return rpcVersionsBuilder_.getMessageOrBuilder(); + } else { + return rpcVersions_ == null ? + io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : rpcVersions_; + } + } + /** + *
+     * (Optional) RPC protocol versions supported by the client.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.RpcProtocolVersions, io.grpc.alts.internal.RpcProtocolVersions.Builder, io.grpc.alts.internal.RpcProtocolVersionsOrBuilder> + getRpcVersionsFieldBuilder() { + if (rpcVersionsBuilder_ == null) { + rpcVersionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.RpcProtocolVersions, io.grpc.alts.internal.RpcProtocolVersions.Builder, io.grpc.alts.internal.RpcProtocolVersionsOrBuilder>( + getRpcVersions(), + getParentForChildren(), + isClean()); + rpcVersions_ = null; + } + return rpcVersionsBuilder_; + } + 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.StartClientHandshakeReq) + } + + // @@protoc_insertion_point(class_scope:grpc.gcp.StartClientHandshakeReq) + private static final io.grpc.alts.internal.StartClientHandshakeReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.alts.internal.StartClientHandshakeReq(); + } + + public static io.grpc.alts.internal.StartClientHandshakeReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StartClientHandshakeReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StartClientHandshakeReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.StartClientHandshakeReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/StartClientHandshakeReqOrBuilder.java b/alts/src/generated/main/java/io/grpc/alts/internal/StartClientHandshakeReqOrBuilder.java new file mode 100644 index 0000000000..7c483c4d94 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/StartClientHandshakeReqOrBuilder.java @@ -0,0 +1,289 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +public interface StartClientHandshakeReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.StartClientHandshakeReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Handshake security protocol requested by the client.
+   * 
+ * + * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; + */ + int getHandshakeSecurityProtocolValue(); + /** + *
+   * Handshake security protocol requested by the client.
+   * 
+ * + * .grpc.gcp.HandshakeProtocol handshake_security_protocol = 1; + */ + io.grpc.alts.internal.HandshakeProtocol getHandshakeSecurityProtocol(); + + /** + *
+   * The application protocols supported by the client, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 2; + */ + java.util.List + getApplicationProtocolsList(); + /** + *
+   * The application protocols supported by the client, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 2; + */ + int getApplicationProtocolsCount(); + /** + *
+   * The application protocols supported by the client, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 2; + */ + java.lang.String getApplicationProtocols(int index); + /** + *
+   * The application protocols supported by the client, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 2; + */ + com.google.protobuf.ByteString + getApplicationProtocolsBytes(int index); + + /** + *
+   * The record protocols supported by the client, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 3; + */ + java.util.List + getRecordProtocolsList(); + /** + *
+   * The record protocols supported by the client, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 3; + */ + int getRecordProtocolsCount(); + /** + *
+   * The record protocols supported by the client, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 3; + */ + java.lang.String getRecordProtocols(int index); + /** + *
+   * The record protocols supported by the client, e.g.,
+   * "ALTSRP_GCM_AES128".
+   * 
+ * + * repeated string record_protocols = 3; + */ + com.google.protobuf.ByteString + getRecordProtocolsBytes(int index); + + /** + *
+   * (Optional) Describes which server identities are acceptable by the client.
+   * If target identities are provided and none of them matches the peer
+   * identity of the server, handshake will fail.
+   * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + java.util.List + getTargetIdentitiesList(); + /** + *
+   * (Optional) Describes which server identities are acceptable by the client.
+   * If target identities are provided and none of them matches the peer
+   * identity of the server, handshake will fail.
+   * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + io.grpc.alts.internal.Identity getTargetIdentities(int index); + /** + *
+   * (Optional) Describes which server identities are acceptable by the client.
+   * If target identities are provided and none of them matches the peer
+   * identity of the server, handshake will fail.
+   * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + int getTargetIdentitiesCount(); + /** + *
+   * (Optional) Describes which server identities are acceptable by the client.
+   * If target identities are provided and none of them matches the peer
+   * identity of the server, handshake will fail.
+   * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + java.util.List + getTargetIdentitiesOrBuilderList(); + /** + *
+   * (Optional) Describes which server identities are acceptable by the client.
+   * If target identities are provided and none of them matches the peer
+   * identity of the server, handshake will fail.
+   * 
+ * + * repeated .grpc.gcp.Identity target_identities = 4; + */ + io.grpc.alts.internal.IdentityOrBuilder getTargetIdentitiesOrBuilder( + int index); + + /** + *
+   * (Optional) Application may specify a local identity. Otherwise, the
+   * handshaker chooses a default local identity.
+   * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + boolean hasLocalIdentity(); + /** + *
+   * (Optional) Application may specify a local identity. Otherwise, the
+   * handshaker chooses a default local identity.
+   * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + io.grpc.alts.internal.Identity getLocalIdentity(); + /** + *
+   * (Optional) Application may specify a local identity. Otherwise, the
+   * handshaker chooses a default local identity.
+   * 
+ * + * .grpc.gcp.Identity local_identity = 5; + */ + io.grpc.alts.internal.IdentityOrBuilder getLocalIdentityOrBuilder(); + + /** + *
+   * (Optional) Local endpoint information of the connection to the server,
+   * such as local IP address, port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + boolean hasLocalEndpoint(); + /** + *
+   * (Optional) Local endpoint information of the connection to the server,
+   * such as local IP address, port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + io.grpc.alts.internal.Endpoint getLocalEndpoint(); + /** + *
+   * (Optional) Local endpoint information of the connection to the server,
+   * such as local IP address, port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 6; + */ + io.grpc.alts.internal.EndpointOrBuilder getLocalEndpointOrBuilder(); + + /** + *
+   * (Optional) Endpoint information of the remote server, such as IP address,
+   * port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + boolean hasRemoteEndpoint(); + /** + *
+   * (Optional) Endpoint information of the remote server, such as IP address,
+   * port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + io.grpc.alts.internal.Endpoint getRemoteEndpoint(); + /** + *
+   * (Optional) Endpoint information of the remote server, such as IP address,
+   * port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 7; + */ + io.grpc.alts.internal.EndpointOrBuilder getRemoteEndpointOrBuilder(); + + /** + *
+   * (Optional) If target name is provided, a secure naming check is performed
+   * to verify that the peer authenticated identity is indeed authorized to run
+   * the target name.
+   * 
+ * + * string target_name = 8; + */ + java.lang.String getTargetName(); + /** + *
+   * (Optional) If target name is provided, a secure naming check is performed
+   * to verify that the peer authenticated identity is indeed authorized to run
+   * the target name.
+   * 
+ * + * string target_name = 8; + */ + com.google.protobuf.ByteString + getTargetNameBytes(); + + /** + *
+   * (Optional) RPC protocol versions supported by the client.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + boolean hasRpcVersions(); + /** + *
+   * (Optional) RPC protocol versions supported by the client.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + io.grpc.alts.internal.RpcProtocolVersions getRpcVersions(); + /** + *
+   * (Optional) RPC protocol versions supported by the client.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 9; + */ + io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder(); +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/StartServerHandshakeReq.java b/alts/src/generated/main/java/io/grpc/alts/internal/StartServerHandshakeReq.java new file mode 100644 index 0000000000..7a4bc171c9 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/StartServerHandshakeReq.java @@ -0,0 +1,1781 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +/** + * Protobuf type {@code grpc.gcp.StartServerHandshakeReq} + */ +public final class StartServerHandshakeReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gcp.StartServerHandshakeReq) + StartServerHandshakeReqOrBuilder { +private static final long serialVersionUID = 0L; + // Use StartServerHandshakeReq.newBuilder() to construct. + private StartServerHandshakeReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StartServerHandshakeReq() { + applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + inBytes_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StartServerHandshakeReq( + 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)) { + applicationProtocols_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + applicationProtocols_.add(s); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + handshakeParameters_ = com.google.protobuf.MapField.newMapField( + HandshakeParametersDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + handshakeParameters__ = input.readMessage( + HandshakeParametersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + handshakeParameters_.getMutableMap().put( + handshakeParameters__.getKey(), handshakeParameters__.getValue()); + break; + } + case 26: { + + inBytes_ = input.readBytes(); + break; + } + case 34: { + io.grpc.alts.internal.Endpoint.Builder subBuilder = null; + if (localEndpoint_ != null) { + subBuilder = localEndpoint_.toBuilder(); + } + localEndpoint_ = input.readMessage(io.grpc.alts.internal.Endpoint.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(localEndpoint_); + localEndpoint_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + io.grpc.alts.internal.Endpoint.Builder subBuilder = null; + if (remoteEndpoint_ != null) { + subBuilder = remoteEndpoint_.toBuilder(); + } + remoteEndpoint_ = input.readMessage(io.grpc.alts.internal.Endpoint.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(remoteEndpoint_); + remoteEndpoint_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + io.grpc.alts.internal.RpcProtocolVersions.Builder subBuilder = null; + if (rpcVersions_ != null) { + subBuilder = rpcVersions_.toBuilder(); + } + rpcVersions_ = input.readMessage(io.grpc.alts.internal.RpcProtocolVersions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcVersions_); + rpcVersions_ = 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 { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + applicationProtocols_ = applicationProtocols_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_StartServerHandshakeReq_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetHandshakeParameters(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_StartServerHandshakeReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.StartServerHandshakeReq.class, io.grpc.alts.internal.StartServerHandshakeReq.Builder.class); + } + + private int bitField0_; + public static final int APPLICATION_PROTOCOLS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList applicationProtocols_; + /** + *
+   * The application protocols supported by the server, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 1; + */ + public com.google.protobuf.ProtocolStringList + getApplicationProtocolsList() { + return applicationProtocols_; + } + /** + *
+   * The application protocols supported by the server, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 1; + */ + public int getApplicationProtocolsCount() { + return applicationProtocols_.size(); + } + /** + *
+   * The application protocols supported by the server, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 1; + */ + public java.lang.String getApplicationProtocols(int index) { + return applicationProtocols_.get(index); + } + /** + *
+   * The application protocols supported by the server, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 1; + */ + public com.google.protobuf.ByteString + getApplicationProtocolsBytes(int index) { + return applicationProtocols_.getByteString(index); + } + + public static final int HANDSHAKE_PARAMETERS_FIELD_NUMBER = 2; + private static final class HandshakeParametersDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, io.grpc.alts.internal.ServerHandshakeParameters> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + io.grpc.alts.internal.ServerHandshakeParameters.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.Integer, io.grpc.alts.internal.ServerHandshakeParameters> handshakeParameters_; + private com.google.protobuf.MapField + internalGetHandshakeParameters() { + if (handshakeParameters_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HandshakeParametersDefaultEntryHolder.defaultEntry); + } + return handshakeParameters_; + } + + public int getHandshakeParametersCount() { + return internalGetHandshakeParameters().getMap().size(); + } + /** + *
+   * Handshake parameters (record protocols and local identities supported by
+   * the server) mapped by the handshake protocol. Each handshake security
+   * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+   * identities. Since protobuf does not support enum as key to the map, the key
+   * to handshake_parameters is the integer value of HandshakeProtocol enum.
+   * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + + public boolean containsHandshakeParameters( + int key) { + + return internalGetHandshakeParameters().getMap().containsKey(key); + } + /** + * Use {@link #getHandshakeParametersMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getHandshakeParameters() { + return getHandshakeParametersMap(); + } + /** + *
+   * Handshake parameters (record protocols and local identities supported by
+   * the server) mapped by the handshake protocol. Each handshake security
+   * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+   * identities. Since protobuf does not support enum as key to the map, the key
+   * to handshake_parameters is the integer value of HandshakeProtocol enum.
+   * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + + public java.util.Map getHandshakeParametersMap() { + return internalGetHandshakeParameters().getMap(); + } + /** + *
+   * Handshake parameters (record protocols and local identities supported by
+   * the server) mapped by the handshake protocol. Each handshake security
+   * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+   * identities. Since protobuf does not support enum as key to the map, the key
+   * to handshake_parameters is the integer value of HandshakeProtocol enum.
+   * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + + public io.grpc.alts.internal.ServerHandshakeParameters getHandshakeParametersOrDefault( + int key, + io.grpc.alts.internal.ServerHandshakeParameters defaultValue) { + + java.util.Map map = + internalGetHandshakeParameters().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Handshake parameters (record protocols and local identities supported by
+   * the server) mapped by the handshake protocol. Each handshake security
+   * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+   * identities. Since protobuf does not support enum as key to the map, the key
+   * to handshake_parameters is the integer value of HandshakeProtocol enum.
+   * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + + public io.grpc.alts.internal.ServerHandshakeParameters getHandshakeParametersOrThrow( + int key) { + + java.util.Map map = + internalGetHandshakeParameters().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int IN_BYTES_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString inBytes_; + /** + *
+   * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
+   * that the peer's out_frames are split into multiple HandshakReq messages.
+   * 
+ * + * bytes in_bytes = 3; + */ + public com.google.protobuf.ByteString getInBytes() { + return inBytes_; + } + + public static final int LOCAL_ENDPOINT_FIELD_NUMBER = 4; + private io.grpc.alts.internal.Endpoint localEndpoint_; + /** + *
+   * (Optional) Local endpoint information of the connection to the client,
+   * such as local IP address, port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + public boolean hasLocalEndpoint() { + return localEndpoint_ != null; + } + /** + *
+   * (Optional) Local endpoint information of the connection to the client,
+   * such as local IP address, port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + public io.grpc.alts.internal.Endpoint getLocalEndpoint() { + return localEndpoint_ == null ? io.grpc.alts.internal.Endpoint.getDefaultInstance() : localEndpoint_; + } + /** + *
+   * (Optional) Local endpoint information of the connection to the client,
+   * such as local IP address, port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + public io.grpc.alts.internal.EndpointOrBuilder getLocalEndpointOrBuilder() { + return getLocalEndpoint(); + } + + public static final int REMOTE_ENDPOINT_FIELD_NUMBER = 5; + private io.grpc.alts.internal.Endpoint remoteEndpoint_; + /** + *
+   * (Optional) Endpoint information of the remote client, such as IP address,
+   * port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + public boolean hasRemoteEndpoint() { + return remoteEndpoint_ != null; + } + /** + *
+   * (Optional) Endpoint information of the remote client, such as IP address,
+   * port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + public io.grpc.alts.internal.Endpoint getRemoteEndpoint() { + return remoteEndpoint_ == null ? io.grpc.alts.internal.Endpoint.getDefaultInstance() : remoteEndpoint_; + } + /** + *
+   * (Optional) Endpoint information of the remote client, such as IP address,
+   * port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + public io.grpc.alts.internal.EndpointOrBuilder getRemoteEndpointOrBuilder() { + return getRemoteEndpoint(); + } + + public static final int RPC_VERSIONS_FIELD_NUMBER = 6; + private io.grpc.alts.internal.RpcProtocolVersions rpcVersions_; + /** + *
+   * (Optional) RPC protocol versions supported by the server.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + public boolean hasRpcVersions() { + return rpcVersions_ != null; + } + /** + *
+   * (Optional) RPC protocol versions supported by the server.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + public io.grpc.alts.internal.RpcProtocolVersions getRpcVersions() { + return rpcVersions_ == null ? io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : rpcVersions_; + } + /** + *
+   * (Optional) RPC protocol versions supported by the server.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + public io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder() { + return getRpcVersions(); + } + + 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 < applicationProtocols_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, applicationProtocols_.getRaw(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetHandshakeParameters(), + HandshakeParametersDefaultEntryHolder.defaultEntry, + 2); + if (!inBytes_.isEmpty()) { + output.writeBytes(3, inBytes_); + } + if (localEndpoint_ != null) { + output.writeMessage(4, getLocalEndpoint()); + } + if (remoteEndpoint_ != null) { + output.writeMessage(5, getRemoteEndpoint()); + } + if (rpcVersions_ != null) { + output.writeMessage(6, getRpcVersions()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < applicationProtocols_.size(); i++) { + dataSize += computeStringSizeNoTag(applicationProtocols_.getRaw(i)); + } + size += dataSize; + size += 1 * getApplicationProtocolsList().size(); + } + for (java.util.Map.Entry entry + : internalGetHandshakeParameters().getMap().entrySet()) { + com.google.protobuf.MapEntry + handshakeParameters__ = HandshakeParametersDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, handshakeParameters__); + } + if (!inBytes_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, inBytes_); + } + if (localEndpoint_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getLocalEndpoint()); + } + if (remoteEndpoint_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getRemoteEndpoint()); + } + if (rpcVersions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getRpcVersions()); + } + 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.StartServerHandshakeReq)) { + return super.equals(obj); + } + io.grpc.alts.internal.StartServerHandshakeReq other = (io.grpc.alts.internal.StartServerHandshakeReq) obj; + + boolean result = true; + result = result && getApplicationProtocolsList() + .equals(other.getApplicationProtocolsList()); + result = result && internalGetHandshakeParameters().equals( + other.internalGetHandshakeParameters()); + result = result && getInBytes() + .equals(other.getInBytes()); + result = result && (hasLocalEndpoint() == other.hasLocalEndpoint()); + if (hasLocalEndpoint()) { + result = result && getLocalEndpoint() + .equals(other.getLocalEndpoint()); + } + result = result && (hasRemoteEndpoint() == other.hasRemoteEndpoint()); + if (hasRemoteEndpoint()) { + result = result && getRemoteEndpoint() + .equals(other.getRemoteEndpoint()); + } + result = result && (hasRpcVersions() == other.hasRpcVersions()); + if (hasRpcVersions()) { + result = result && getRpcVersions() + .equals(other.getRpcVersions()); + } + 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 (getApplicationProtocolsCount() > 0) { + hash = (37 * hash) + APPLICATION_PROTOCOLS_FIELD_NUMBER; + hash = (53 * hash) + getApplicationProtocolsList().hashCode(); + } + if (!internalGetHandshakeParameters().getMap().isEmpty()) { + hash = (37 * hash) + HANDSHAKE_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + internalGetHandshakeParameters().hashCode(); + } + hash = (37 * hash) + IN_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getInBytes().hashCode(); + if (hasLocalEndpoint()) { + hash = (37 * hash) + LOCAL_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getLocalEndpoint().hashCode(); + } + if (hasRemoteEndpoint()) { + hash = (37 * hash) + REMOTE_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getRemoteEndpoint().hashCode(); + } + if (hasRpcVersions()) { + hash = (37 * hash) + RPC_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getRpcVersions().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.alts.internal.StartServerHandshakeReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.StartServerHandshakeReq 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.StartServerHandshakeReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.StartServerHandshakeReq 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.StartServerHandshakeReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.alts.internal.StartServerHandshakeReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.alts.internal.StartServerHandshakeReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.StartServerHandshakeReq 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.StartServerHandshakeReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.StartServerHandshakeReq 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.StartServerHandshakeReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.alts.internal.StartServerHandshakeReq 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.StartServerHandshakeReq 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.StartServerHandshakeReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gcp.StartServerHandshakeReq) + io.grpc.alts.internal.StartServerHandshakeReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_StartServerHandshakeReq_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetHandshakeParameters(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableHandshakeParameters(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_StartServerHandshakeReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.alts.internal.StartServerHandshakeReq.class, io.grpc.alts.internal.StartServerHandshakeReq.Builder.class); + } + + // Construct using io.grpc.alts.internal.StartServerHandshakeReq.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(); + applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableHandshakeParameters().clear(); + inBytes_ = com.google.protobuf.ByteString.EMPTY; + + if (localEndpointBuilder_ == null) { + localEndpoint_ = null; + } else { + localEndpoint_ = null; + localEndpointBuilder_ = null; + } + if (remoteEndpointBuilder_ == null) { + remoteEndpoint_ = null; + } else { + remoteEndpoint_ = null; + remoteEndpointBuilder_ = null; + } + if (rpcVersionsBuilder_ == null) { + rpcVersions_ = null; + } else { + rpcVersions_ = null; + rpcVersionsBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_StartServerHandshakeReq_descriptor; + } + + public io.grpc.alts.internal.StartServerHandshakeReq getDefaultInstanceForType() { + return io.grpc.alts.internal.StartServerHandshakeReq.getDefaultInstance(); + } + + public io.grpc.alts.internal.StartServerHandshakeReq build() { + io.grpc.alts.internal.StartServerHandshakeReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.alts.internal.StartServerHandshakeReq buildPartial() { + io.grpc.alts.internal.StartServerHandshakeReq result = new io.grpc.alts.internal.StartServerHandshakeReq(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + applicationProtocols_ = applicationProtocols_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.applicationProtocols_ = applicationProtocols_; + result.handshakeParameters_ = internalGetHandshakeParameters(); + result.handshakeParameters_.makeImmutable(); + result.inBytes_ = inBytes_; + if (localEndpointBuilder_ == null) { + result.localEndpoint_ = localEndpoint_; + } else { + result.localEndpoint_ = localEndpointBuilder_.build(); + } + if (remoteEndpointBuilder_ == null) { + result.remoteEndpoint_ = remoteEndpoint_; + } else { + result.remoteEndpoint_ = remoteEndpointBuilder_.build(); + } + if (rpcVersionsBuilder_ == null) { + result.rpcVersions_ = rpcVersions_; + } else { + result.rpcVersions_ = rpcVersionsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + 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.StartServerHandshakeReq) { + return mergeFrom((io.grpc.alts.internal.StartServerHandshakeReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.alts.internal.StartServerHandshakeReq other) { + if (other == io.grpc.alts.internal.StartServerHandshakeReq.getDefaultInstance()) return this; + if (!other.applicationProtocols_.isEmpty()) { + if (applicationProtocols_.isEmpty()) { + applicationProtocols_ = other.applicationProtocols_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureApplicationProtocolsIsMutable(); + applicationProtocols_.addAll(other.applicationProtocols_); + } + onChanged(); + } + internalGetMutableHandshakeParameters().mergeFrom( + other.internalGetHandshakeParameters()); + if (other.getInBytes() != com.google.protobuf.ByteString.EMPTY) { + setInBytes(other.getInBytes()); + } + if (other.hasLocalEndpoint()) { + mergeLocalEndpoint(other.getLocalEndpoint()); + } + if (other.hasRemoteEndpoint()) { + mergeRemoteEndpoint(other.getRemoteEndpoint()); + } + if (other.hasRpcVersions()) { + mergeRpcVersions(other.getRpcVersions()); + } + 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.StartServerHandshakeReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.alts.internal.StartServerHandshakeReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureApplicationProtocolsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + applicationProtocols_ = new com.google.protobuf.LazyStringArrayList(applicationProtocols_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The application protocols supported by the server, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 1; + */ + public com.google.protobuf.ProtocolStringList + getApplicationProtocolsList() { + return applicationProtocols_.getUnmodifiableView(); + } + /** + *
+     * The application protocols supported by the server, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 1; + */ + public int getApplicationProtocolsCount() { + return applicationProtocols_.size(); + } + /** + *
+     * The application protocols supported by the server, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 1; + */ + public java.lang.String getApplicationProtocols(int index) { + return applicationProtocols_.get(index); + } + /** + *
+     * The application protocols supported by the server, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 1; + */ + public com.google.protobuf.ByteString + getApplicationProtocolsBytes(int index) { + return applicationProtocols_.getByteString(index); + } + /** + *
+     * The application protocols supported by the server, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 1; + */ + public Builder setApplicationProtocols( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationProtocolsIsMutable(); + applicationProtocols_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The application protocols supported by the server, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 1; + */ + public Builder addApplicationProtocols( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationProtocolsIsMutable(); + applicationProtocols_.add(value); + onChanged(); + return this; + } + /** + *
+     * The application protocols supported by the server, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 1; + */ + public Builder addAllApplicationProtocols( + java.lang.Iterable values) { + ensureApplicationProtocolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, applicationProtocols_); + onChanged(); + return this; + } + /** + *
+     * The application protocols supported by the server, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 1; + */ + public Builder clearApplicationProtocols() { + applicationProtocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The application protocols supported by the server, e.g., "h2" (for http2),
+     * "grpc".
+     * 
+ * + * repeated string application_protocols = 1; + */ + public Builder addApplicationProtocolsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureApplicationProtocolsIsMutable(); + applicationProtocols_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.Integer, io.grpc.alts.internal.ServerHandshakeParameters> handshakeParameters_; + private com.google.protobuf.MapField + internalGetHandshakeParameters() { + if (handshakeParameters_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HandshakeParametersDefaultEntryHolder.defaultEntry); + } + return handshakeParameters_; + } + private com.google.protobuf.MapField + internalGetMutableHandshakeParameters() { + onChanged();; + if (handshakeParameters_ == null) { + handshakeParameters_ = com.google.protobuf.MapField.newMapField( + HandshakeParametersDefaultEntryHolder.defaultEntry); + } + if (!handshakeParameters_.isMutable()) { + handshakeParameters_ = handshakeParameters_.copy(); + } + return handshakeParameters_; + } + + public int getHandshakeParametersCount() { + return internalGetHandshakeParameters().getMap().size(); + } + /** + *
+     * Handshake parameters (record protocols and local identities supported by
+     * the server) mapped by the handshake protocol. Each handshake security
+     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+     * identities. Since protobuf does not support enum as key to the map, the key
+     * to handshake_parameters is the integer value of HandshakeProtocol enum.
+     * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + + public boolean containsHandshakeParameters( + int key) { + + return internalGetHandshakeParameters().getMap().containsKey(key); + } + /** + * Use {@link #getHandshakeParametersMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getHandshakeParameters() { + return getHandshakeParametersMap(); + } + /** + *
+     * Handshake parameters (record protocols and local identities supported by
+     * the server) mapped by the handshake protocol. Each handshake security
+     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+     * identities. Since protobuf does not support enum as key to the map, the key
+     * to handshake_parameters is the integer value of HandshakeProtocol enum.
+     * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + + public java.util.Map getHandshakeParametersMap() { + return internalGetHandshakeParameters().getMap(); + } + /** + *
+     * Handshake parameters (record protocols and local identities supported by
+     * the server) mapped by the handshake protocol. Each handshake security
+     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+     * identities. Since protobuf does not support enum as key to the map, the key
+     * to handshake_parameters is the integer value of HandshakeProtocol enum.
+     * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + + public io.grpc.alts.internal.ServerHandshakeParameters getHandshakeParametersOrDefault( + int key, + io.grpc.alts.internal.ServerHandshakeParameters defaultValue) { + + java.util.Map map = + internalGetHandshakeParameters().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Handshake parameters (record protocols and local identities supported by
+     * the server) mapped by the handshake protocol. Each handshake security
+     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+     * identities. Since protobuf does not support enum as key to the map, the key
+     * to handshake_parameters is the integer value of HandshakeProtocol enum.
+     * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + + public io.grpc.alts.internal.ServerHandshakeParameters getHandshakeParametersOrThrow( + int key) { + + java.util.Map map = + internalGetHandshakeParameters().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHandshakeParameters() { + internalGetMutableHandshakeParameters().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Handshake parameters (record protocols and local identities supported by
+     * the server) mapped by the handshake protocol. Each handshake security
+     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+     * identities. Since protobuf does not support enum as key to the map, the key
+     * to handshake_parameters is the integer value of HandshakeProtocol enum.
+     * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + + public Builder removeHandshakeParameters( + int key) { + + internalGetMutableHandshakeParameters().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableHandshakeParameters() { + return internalGetMutableHandshakeParameters().getMutableMap(); + } + /** + *
+     * Handshake parameters (record protocols and local identities supported by
+     * the server) mapped by the handshake protocol. Each handshake security
+     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+     * identities. Since protobuf does not support enum as key to the map, the key
+     * to handshake_parameters is the integer value of HandshakeProtocol enum.
+     * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + public Builder putHandshakeParameters( + int key, + io.grpc.alts.internal.ServerHandshakeParameters value) { + + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableHandshakeParameters().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Handshake parameters (record protocols and local identities supported by
+     * the server) mapped by the handshake protocol. Each handshake security
+     * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+     * identities. Since protobuf does not support enum as key to the map, the key
+     * to handshake_parameters is the integer value of HandshakeProtocol enum.
+     * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + + public Builder putAllHandshakeParameters( + java.util.Map values) { + internalGetMutableHandshakeParameters().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.ByteString inBytes_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
+     * that the peer's out_frames are split into multiple HandshakReq messages.
+     * 
+ * + * bytes in_bytes = 3; + */ + public com.google.protobuf.ByteString getInBytes() { + return inBytes_; + } + /** + *
+     * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
+     * that the peer's out_frames are split into multiple HandshakReq messages.
+     * 
+ * + * bytes in_bytes = 3; + */ + public Builder setInBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + inBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
+     * that the peer's out_frames are split into multiple HandshakReq messages.
+     * 
+ * + * bytes in_bytes = 3; + */ + public Builder clearInBytes() { + + inBytes_ = getDefaultInstance().getInBytes(); + onChanged(); + return this; + } + + private io.grpc.alts.internal.Endpoint localEndpoint_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.Endpoint, io.grpc.alts.internal.Endpoint.Builder, io.grpc.alts.internal.EndpointOrBuilder> localEndpointBuilder_; + /** + *
+     * (Optional) Local endpoint information of the connection to the client,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + public boolean hasLocalEndpoint() { + return localEndpointBuilder_ != null || localEndpoint_ != null; + } + /** + *
+     * (Optional) Local endpoint information of the connection to the client,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + public io.grpc.alts.internal.Endpoint getLocalEndpoint() { + if (localEndpointBuilder_ == null) { + return localEndpoint_ == null ? io.grpc.alts.internal.Endpoint.getDefaultInstance() : localEndpoint_; + } else { + return localEndpointBuilder_.getMessage(); + } + } + /** + *
+     * (Optional) Local endpoint information of the connection to the client,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + public Builder setLocalEndpoint(io.grpc.alts.internal.Endpoint value) { + if (localEndpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + localEndpoint_ = value; + onChanged(); + } else { + localEndpointBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * (Optional) Local endpoint information of the connection to the client,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + public Builder setLocalEndpoint( + io.grpc.alts.internal.Endpoint.Builder builderForValue) { + if (localEndpointBuilder_ == null) { + localEndpoint_ = builderForValue.build(); + onChanged(); + } else { + localEndpointBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * (Optional) Local endpoint information of the connection to the client,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + public Builder mergeLocalEndpoint(io.grpc.alts.internal.Endpoint value) { + if (localEndpointBuilder_ == null) { + if (localEndpoint_ != null) { + localEndpoint_ = + io.grpc.alts.internal.Endpoint.newBuilder(localEndpoint_).mergeFrom(value).buildPartial(); + } else { + localEndpoint_ = value; + } + onChanged(); + } else { + localEndpointBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * (Optional) Local endpoint information of the connection to the client,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + public Builder clearLocalEndpoint() { + if (localEndpointBuilder_ == null) { + localEndpoint_ = null; + onChanged(); + } else { + localEndpoint_ = null; + localEndpointBuilder_ = null; + } + + return this; + } + /** + *
+     * (Optional) Local endpoint information of the connection to the client,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + public io.grpc.alts.internal.Endpoint.Builder getLocalEndpointBuilder() { + + onChanged(); + return getLocalEndpointFieldBuilder().getBuilder(); + } + /** + *
+     * (Optional) Local endpoint information of the connection to the client,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + public io.grpc.alts.internal.EndpointOrBuilder getLocalEndpointOrBuilder() { + if (localEndpointBuilder_ != null) { + return localEndpointBuilder_.getMessageOrBuilder(); + } else { + return localEndpoint_ == null ? + io.grpc.alts.internal.Endpoint.getDefaultInstance() : localEndpoint_; + } + } + /** + *
+     * (Optional) Local endpoint information of the connection to the client,
+     * such as local IP address, port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.Endpoint, io.grpc.alts.internal.Endpoint.Builder, io.grpc.alts.internal.EndpointOrBuilder> + getLocalEndpointFieldBuilder() { + if (localEndpointBuilder_ == null) { + localEndpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.Endpoint, io.grpc.alts.internal.Endpoint.Builder, io.grpc.alts.internal.EndpointOrBuilder>( + getLocalEndpoint(), + getParentForChildren(), + isClean()); + localEndpoint_ = null; + } + return localEndpointBuilder_; + } + + private io.grpc.alts.internal.Endpoint remoteEndpoint_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.Endpoint, io.grpc.alts.internal.Endpoint.Builder, io.grpc.alts.internal.EndpointOrBuilder> remoteEndpointBuilder_; + /** + *
+     * (Optional) Endpoint information of the remote client, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + public boolean hasRemoteEndpoint() { + return remoteEndpointBuilder_ != null || remoteEndpoint_ != null; + } + /** + *
+     * (Optional) Endpoint information of the remote client, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + public io.grpc.alts.internal.Endpoint getRemoteEndpoint() { + if (remoteEndpointBuilder_ == null) { + return remoteEndpoint_ == null ? io.grpc.alts.internal.Endpoint.getDefaultInstance() : remoteEndpoint_; + } else { + return remoteEndpointBuilder_.getMessage(); + } + } + /** + *
+     * (Optional) Endpoint information of the remote client, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + public Builder setRemoteEndpoint(io.grpc.alts.internal.Endpoint value) { + if (remoteEndpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remoteEndpoint_ = value; + onChanged(); + } else { + remoteEndpointBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * (Optional) Endpoint information of the remote client, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + public Builder setRemoteEndpoint( + io.grpc.alts.internal.Endpoint.Builder builderForValue) { + if (remoteEndpointBuilder_ == null) { + remoteEndpoint_ = builderForValue.build(); + onChanged(); + } else { + remoteEndpointBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * (Optional) Endpoint information of the remote client, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + public Builder mergeRemoteEndpoint(io.grpc.alts.internal.Endpoint value) { + if (remoteEndpointBuilder_ == null) { + if (remoteEndpoint_ != null) { + remoteEndpoint_ = + io.grpc.alts.internal.Endpoint.newBuilder(remoteEndpoint_).mergeFrom(value).buildPartial(); + } else { + remoteEndpoint_ = value; + } + onChanged(); + } else { + remoteEndpointBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * (Optional) Endpoint information of the remote client, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + public Builder clearRemoteEndpoint() { + if (remoteEndpointBuilder_ == null) { + remoteEndpoint_ = null; + onChanged(); + } else { + remoteEndpoint_ = null; + remoteEndpointBuilder_ = null; + } + + return this; + } + /** + *
+     * (Optional) Endpoint information of the remote client, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + public io.grpc.alts.internal.Endpoint.Builder getRemoteEndpointBuilder() { + + onChanged(); + return getRemoteEndpointFieldBuilder().getBuilder(); + } + /** + *
+     * (Optional) Endpoint information of the remote client, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + public io.grpc.alts.internal.EndpointOrBuilder getRemoteEndpointOrBuilder() { + if (remoteEndpointBuilder_ != null) { + return remoteEndpointBuilder_.getMessageOrBuilder(); + } else { + return remoteEndpoint_ == null ? + io.grpc.alts.internal.Endpoint.getDefaultInstance() : remoteEndpoint_; + } + } + /** + *
+     * (Optional) Endpoint information of the remote client, such as IP address,
+     * port number, and network protocol.
+     * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.Endpoint, io.grpc.alts.internal.Endpoint.Builder, io.grpc.alts.internal.EndpointOrBuilder> + getRemoteEndpointFieldBuilder() { + if (remoteEndpointBuilder_ == null) { + remoteEndpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.Endpoint, io.grpc.alts.internal.Endpoint.Builder, io.grpc.alts.internal.EndpointOrBuilder>( + getRemoteEndpoint(), + getParentForChildren(), + isClean()); + remoteEndpoint_ = null; + } + return remoteEndpointBuilder_; + } + + private io.grpc.alts.internal.RpcProtocolVersions rpcVersions_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.RpcProtocolVersions, io.grpc.alts.internal.RpcProtocolVersions.Builder, io.grpc.alts.internal.RpcProtocolVersionsOrBuilder> rpcVersionsBuilder_; + /** + *
+     * (Optional) RPC protocol versions supported by the server.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + public boolean hasRpcVersions() { + return rpcVersionsBuilder_ != null || rpcVersions_ != null; + } + /** + *
+     * (Optional) RPC protocol versions supported by the server.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + public io.grpc.alts.internal.RpcProtocolVersions getRpcVersions() { + if (rpcVersionsBuilder_ == null) { + return rpcVersions_ == null ? io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : rpcVersions_; + } else { + return rpcVersionsBuilder_.getMessage(); + } + } + /** + *
+     * (Optional) RPC protocol versions supported by the server.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + public Builder setRpcVersions(io.grpc.alts.internal.RpcProtocolVersions value) { + if (rpcVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcVersions_ = value; + onChanged(); + } else { + rpcVersionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * (Optional) RPC protocol versions supported by the server.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + public Builder setRpcVersions( + io.grpc.alts.internal.RpcProtocolVersions.Builder builderForValue) { + if (rpcVersionsBuilder_ == null) { + rpcVersions_ = builderForValue.build(); + onChanged(); + } else { + rpcVersionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * (Optional) RPC protocol versions supported by the server.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + public Builder mergeRpcVersions(io.grpc.alts.internal.RpcProtocolVersions value) { + if (rpcVersionsBuilder_ == null) { + if (rpcVersions_ != null) { + rpcVersions_ = + io.grpc.alts.internal.RpcProtocolVersions.newBuilder(rpcVersions_).mergeFrom(value).buildPartial(); + } else { + rpcVersions_ = value; + } + onChanged(); + } else { + rpcVersionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * (Optional) RPC protocol versions supported by the server.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + public Builder clearRpcVersions() { + if (rpcVersionsBuilder_ == null) { + rpcVersions_ = null; + onChanged(); + } else { + rpcVersions_ = null; + rpcVersionsBuilder_ = null; + } + + return this; + } + /** + *
+     * (Optional) RPC protocol versions supported by the server.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + public io.grpc.alts.internal.RpcProtocolVersions.Builder getRpcVersionsBuilder() { + + onChanged(); + return getRpcVersionsFieldBuilder().getBuilder(); + } + /** + *
+     * (Optional) RPC protocol versions supported by the server.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + public io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder() { + if (rpcVersionsBuilder_ != null) { + return rpcVersionsBuilder_.getMessageOrBuilder(); + } else { + return rpcVersions_ == null ? + io.grpc.alts.internal.RpcProtocolVersions.getDefaultInstance() : rpcVersions_; + } + } + /** + *
+     * (Optional) RPC protocol versions supported by the server.
+     * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.RpcProtocolVersions, io.grpc.alts.internal.RpcProtocolVersions.Builder, io.grpc.alts.internal.RpcProtocolVersionsOrBuilder> + getRpcVersionsFieldBuilder() { + if (rpcVersionsBuilder_ == null) { + rpcVersionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.alts.internal.RpcProtocolVersions, io.grpc.alts.internal.RpcProtocolVersions.Builder, io.grpc.alts.internal.RpcProtocolVersionsOrBuilder>( + getRpcVersions(), + getParentForChildren(), + isClean()); + rpcVersions_ = null; + } + return rpcVersionsBuilder_; + } + 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.StartServerHandshakeReq) + } + + // @@protoc_insertion_point(class_scope:grpc.gcp.StartServerHandshakeReq) + private static final io.grpc.alts.internal.StartServerHandshakeReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.alts.internal.StartServerHandshakeReq(); + } + + public static io.grpc.alts.internal.StartServerHandshakeReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StartServerHandshakeReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StartServerHandshakeReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.alts.internal.StartServerHandshakeReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/StartServerHandshakeReqOrBuilder.java b/alts/src/generated/main/java/io/grpc/alts/internal/StartServerHandshakeReqOrBuilder.java new file mode 100644 index 0000000000..29a607cd7e --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/StartServerHandshakeReqOrBuilder.java @@ -0,0 +1,213 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/handshaker.proto + +package io.grpc.alts.internal; + +public interface StartServerHandshakeReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gcp.StartServerHandshakeReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The application protocols supported by the server, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 1; + */ + java.util.List + getApplicationProtocolsList(); + /** + *
+   * The application protocols supported by the server, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 1; + */ + int getApplicationProtocolsCount(); + /** + *
+   * The application protocols supported by the server, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 1; + */ + java.lang.String getApplicationProtocols(int index); + /** + *
+   * The application protocols supported by the server, e.g., "h2" (for http2),
+   * "grpc".
+   * 
+ * + * repeated string application_protocols = 1; + */ + com.google.protobuf.ByteString + getApplicationProtocolsBytes(int index); + + /** + *
+   * Handshake parameters (record protocols and local identities supported by
+   * the server) mapped by the handshake protocol. Each handshake security
+   * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+   * identities. Since protobuf does not support enum as key to the map, the key
+   * to handshake_parameters is the integer value of HandshakeProtocol enum.
+   * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + int getHandshakeParametersCount(); + /** + *
+   * Handshake parameters (record protocols and local identities supported by
+   * the server) mapped by the handshake protocol. Each handshake security
+   * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+   * identities. Since protobuf does not support enum as key to the map, the key
+   * to handshake_parameters is the integer value of HandshakeProtocol enum.
+   * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + boolean containsHandshakeParameters( + int key); + /** + * Use {@link #getHandshakeParametersMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getHandshakeParameters(); + /** + *
+   * Handshake parameters (record protocols and local identities supported by
+   * the server) mapped by the handshake protocol. Each handshake security
+   * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+   * identities. Since protobuf does not support enum as key to the map, the key
+   * to handshake_parameters is the integer value of HandshakeProtocol enum.
+   * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + java.util.Map + getHandshakeParametersMap(); + /** + *
+   * Handshake parameters (record protocols and local identities supported by
+   * the server) mapped by the handshake protocol. Each handshake security
+   * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+   * identities. Since protobuf does not support enum as key to the map, the key
+   * to handshake_parameters is the integer value of HandshakeProtocol enum.
+   * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + + io.grpc.alts.internal.ServerHandshakeParameters getHandshakeParametersOrDefault( + int key, + io.grpc.alts.internal.ServerHandshakeParameters defaultValue); + /** + *
+   * Handshake parameters (record protocols and local identities supported by
+   * the server) mapped by the handshake protocol. Each handshake security
+   * protocol (e.g., TLS or ALTS) has its own set of record protocols and local
+   * identities. Since protobuf does not support enum as key to the map, the key
+   * to handshake_parameters is the integer value of HandshakeProtocol enum.
+   * 
+ * + * map<int32, .grpc.gcp.ServerHandshakeParameters> handshake_parameters = 2; + */ + + io.grpc.alts.internal.ServerHandshakeParameters getHandshakeParametersOrThrow( + int key); + + /** + *
+   * Bytes in out_frames returned from the peer's HandshakerResp. It is possible
+   * that the peer's out_frames are split into multiple HandshakReq messages.
+   * 
+ * + * bytes in_bytes = 3; + */ + com.google.protobuf.ByteString getInBytes(); + + /** + *
+   * (Optional) Local endpoint information of the connection to the client,
+   * such as local IP address, port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + boolean hasLocalEndpoint(); + /** + *
+   * (Optional) Local endpoint information of the connection to the client,
+   * such as local IP address, port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + io.grpc.alts.internal.Endpoint getLocalEndpoint(); + /** + *
+   * (Optional) Local endpoint information of the connection to the client,
+   * such as local IP address, port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint local_endpoint = 4; + */ + io.grpc.alts.internal.EndpointOrBuilder getLocalEndpointOrBuilder(); + + /** + *
+   * (Optional) Endpoint information of the remote client, such as IP address,
+   * port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + boolean hasRemoteEndpoint(); + /** + *
+   * (Optional) Endpoint information of the remote client, such as IP address,
+   * port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + io.grpc.alts.internal.Endpoint getRemoteEndpoint(); + /** + *
+   * (Optional) Endpoint information of the remote client, such as IP address,
+   * port number, and network protocol.
+   * 
+ * + * .grpc.gcp.Endpoint remote_endpoint = 5; + */ + io.grpc.alts.internal.EndpointOrBuilder getRemoteEndpointOrBuilder(); + + /** + *
+   * (Optional) RPC protocol versions supported by the server.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + boolean hasRpcVersions(); + /** + *
+   * (Optional) RPC protocol versions supported by the server.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + io.grpc.alts.internal.RpcProtocolVersions getRpcVersions(); + /** + *
+   * (Optional) RPC protocol versions supported by the server.
+   * 
+ * + * .grpc.gcp.RpcProtocolVersions rpc_versions = 6; + */ + io.grpc.alts.internal.RpcProtocolVersionsOrBuilder getRpcVersionsOrBuilder(); +} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/TransportSecurityCommon.java b/alts/src/generated/main/java/io/grpc/alts/internal/TransportSecurityCommon.java deleted file mode 100644 index beb3839837..0000000000 --- a/alts/src/generated/main/java/io/grpc/alts/internal/TransportSecurityCommon.java +++ /dev/null @@ -1,1612 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpc/gcp/transport_security_common.proto - -package io.grpc.alts.internal; - -public final class TransportSecurityCommon { - private TransportSecurityCommon() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - *
-   * The security level of the created channel. The list is sorted in increasing
-   * level of security. This order must always be maintained.
-   * 
- * - * Protobuf enum {@code grpc.gcp.SecurityLevel} - */ - public enum SecurityLevel - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SECURITY_NONE = 0; - */ - SECURITY_NONE(0), - /** - * INTEGRITY_ONLY = 1; - */ - INTEGRITY_ONLY(1), - /** - * INTEGRITY_AND_PRIVACY = 2; - */ - INTEGRITY_AND_PRIVACY(2), - UNRECOGNIZED(-1), - ; - - /** - * SECURITY_NONE = 0; - */ - public static final int SECURITY_NONE_VALUE = 0; - /** - * INTEGRITY_ONLY = 1; - */ - public static final int INTEGRITY_ONLY_VALUE = 1; - /** - * INTEGRITY_AND_PRIVACY = 2; - */ - public static final int INTEGRITY_AND_PRIVACY_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SecurityLevel valueOf(int value) { - return forNumber(value); - } - - public static SecurityLevel forNumber(int value) { - switch (value) { - case 0: return SECURITY_NONE; - case 1: return INTEGRITY_ONLY; - case 2: return INTEGRITY_AND_PRIVACY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - SecurityLevel> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public SecurityLevel findValueByNumber(int number) { - return SecurityLevel.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.grpc.alts.internal.TransportSecurityCommon.getDescriptor().getEnumTypes().get(0); - } - - private static final SecurityLevel[] VALUES = values(); - - public static SecurityLevel valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private SecurityLevel(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grpc.gcp.SecurityLevel) - } - - public interface RpcProtocolVersionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.RpcProtocolVersions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Maximum supported RPC version.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - boolean hasMaxRpcVersion(); - /** - *
-     * Maximum supported RPC version.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version getMaxRpcVersion(); - /** - *
-     * Maximum supported RPC version.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder getMaxRpcVersionOrBuilder(); - - /** - *
-     * Minimum supported RPC version.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - boolean hasMinRpcVersion(); - /** - *
-     * Minimum supported RPC version.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version getMinRpcVersion(); - /** - *
-     * Minimum supported RPC version.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder getMinRpcVersionOrBuilder(); - } - /** - *
-   * Max and min supported RPC protocol versions.
-   * 
- * - * Protobuf type {@code grpc.gcp.RpcProtocolVersions} - */ - public static final class RpcProtocolVersions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gcp.RpcProtocolVersions) - RpcProtocolVersionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use RpcProtocolVersions.newBuilder() to construct. - private RpcProtocolVersions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RpcProtocolVersions() { - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RpcProtocolVersions( - 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: { - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder subBuilder = null; - if (maxRpcVersion_ != null) { - subBuilder = maxRpcVersion_.toBuilder(); - } - maxRpcVersion_ = input.readMessage(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxRpcVersion_); - maxRpcVersion_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder subBuilder = null; - if (minRpcVersion_ != null) { - subBuilder = minRpcVersion_.toBuilder(); - } - minRpcVersion_ = input.readMessage(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(minRpcVersion_); - minRpcVersion_ = 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.TransportSecurityCommon.internal_static_grpc_gcp_RpcProtocolVersions_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.TransportSecurityCommon.internal_static_grpc_gcp_RpcProtocolVersions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.class, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder.class); - } - - public interface VersionOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gcp.RpcProtocolVersions.Version) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 major = 1; - */ - int getMajor(); - - /** - * uint32 minor = 2; - */ - int getMinor(); - } - /** - *
-     * RPC version contains a major version and a minor version.
-     * 
- * - * Protobuf type {@code grpc.gcp.RpcProtocolVersions.Version} - */ - public static final class Version extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gcp.RpcProtocolVersions.Version) - VersionOrBuilder { - private static final long serialVersionUID = 0L; - // Use Version.newBuilder() to construct. - private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Version() { - major_ = 0; - minor_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Version( - 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 8: { - - major_ = input.readUInt32(); - break; - } - case 16: { - - minor_ = input.readUInt32(); - 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.TransportSecurityCommon.internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.TransportSecurityCommon.internal_static_grpc_gcp_RpcProtocolVersions_Version_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.class, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder.class); - } - - public static final int MAJOR_FIELD_NUMBER = 1; - private int major_; - /** - * uint32 major = 1; - */ - public int getMajor() { - return major_; - } - - public static final int MINOR_FIELD_NUMBER = 2; - private int minor_; - /** - * uint32 minor = 2; - */ - public int getMinor() { - return minor_; - } - - 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 (major_ != 0) { - output.writeUInt32(1, major_); - } - if (minor_ != 0) { - output.writeUInt32(2, minor_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (major_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, major_); - } - if (minor_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, minor_); - } - 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.TransportSecurityCommon.RpcProtocolVersions.Version)) { - return super.equals(obj); - } - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version other = (io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version) obj; - - boolean result = true; - result = result && (getMajor() - == other.getMajor()); - result = result && (getMinor() - == other.getMinor()); - 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) + MAJOR_FIELD_NUMBER; - hash = (53 * hash) + getMajor(); - hash = (37 * hash) + MINOR_FIELD_NUMBER; - hash = (53 * hash) + getMinor(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version 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.TransportSecurityCommon.RpcProtocolVersions.Version parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version 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.TransportSecurityCommon.RpcProtocolVersions.Version parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version 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.TransportSecurityCommon.RpcProtocolVersions.Version parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version 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.TransportSecurityCommon.RpcProtocolVersions.Version parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version 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.TransportSecurityCommon.RpcProtocolVersions.Version 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; - } - /** - *
-       * RPC version contains a major version and a minor version.
-       * 
- * - * Protobuf type {@code grpc.gcp.RpcProtocolVersions.Version} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.RpcProtocolVersions.Version) - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.TransportSecurityCommon.internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.TransportSecurityCommon.internal_static_grpc_gcp_RpcProtocolVersions_Version_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.class, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder.class); - } - - // Construct using io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.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(); - major_ = 0; - - minor_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grpc.alts.internal.TransportSecurityCommon.internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor; - } - - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version getDefaultInstanceForType() { - return io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.getDefaultInstance(); - } - - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version build() { - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version buildPartial() { - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version result = new io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version(this); - result.major_ = major_; - result.minor_ = minor_; - 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.TransportSecurityCommon.RpcProtocolVersions.Version) { - return mergeFrom((io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version other) { - if (other == io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.getDefaultInstance()) return this; - if (other.getMajor() != 0) { - setMajor(other.getMajor()); - } - if (other.getMinor() != 0) { - setMinor(other.getMinor()); - } - 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.TransportSecurityCommon.RpcProtocolVersions.Version parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int major_ ; - /** - * uint32 major = 1; - */ - public int getMajor() { - return major_; - } - /** - * uint32 major = 1; - */ - public Builder setMajor(int value) { - - major_ = value; - onChanged(); - return this; - } - /** - * uint32 major = 1; - */ - public Builder clearMajor() { - - major_ = 0; - onChanged(); - return this; - } - - private int minor_ ; - /** - * uint32 minor = 2; - */ - public int getMinor() { - return minor_; - } - /** - * uint32 minor = 2; - */ - public Builder setMinor(int value) { - - minor_ = value; - onChanged(); - return this; - } - /** - * uint32 minor = 2; - */ - public Builder clearMinor() { - - minor_ = 0; - onChanged(); - return this; - } - 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.RpcProtocolVersions.Version) - } - - // @@protoc_insertion_point(class_scope:grpc.gcp.RpcProtocolVersions.Version) - private static final io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version(); - } - - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Version parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Version(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int MAX_RPC_VERSION_FIELD_NUMBER = 1; - private io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version maxRpcVersion_; - /** - *
-     * Maximum supported RPC version.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - public boolean hasMaxRpcVersion() { - return maxRpcVersion_ != null; - } - /** - *
-     * Maximum supported RPC version.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version getMaxRpcVersion() { - return maxRpcVersion_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.getDefaultInstance() : maxRpcVersion_; - } - /** - *
-     * Maximum supported RPC version.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder getMaxRpcVersionOrBuilder() { - return getMaxRpcVersion(); - } - - public static final int MIN_RPC_VERSION_FIELD_NUMBER = 2; - private io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version minRpcVersion_; - /** - *
-     * Minimum supported RPC version.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - public boolean hasMinRpcVersion() { - return minRpcVersion_ != null; - } - /** - *
-     * Minimum supported RPC version.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version getMinRpcVersion() { - return minRpcVersion_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.getDefaultInstance() : minRpcVersion_; - } - /** - *
-     * Minimum supported RPC version.
-     * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder getMinRpcVersionOrBuilder() { - return getMinRpcVersion(); - } - - 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 (maxRpcVersion_ != null) { - output.writeMessage(1, getMaxRpcVersion()); - } - if (minRpcVersion_ != null) { - output.writeMessage(2, getMinRpcVersion()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (maxRpcVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getMaxRpcVersion()); - } - if (minRpcVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMinRpcVersion()); - } - 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.TransportSecurityCommon.RpcProtocolVersions)) { - return super.equals(obj); - } - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions other = (io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions) obj; - - boolean result = true; - result = result && (hasMaxRpcVersion() == other.hasMaxRpcVersion()); - if (hasMaxRpcVersion()) { - result = result && getMaxRpcVersion() - .equals(other.getMaxRpcVersion()); - } - result = result && (hasMinRpcVersion() == other.hasMinRpcVersion()); - if (hasMinRpcVersion()) { - result = result && getMinRpcVersion() - .equals(other.getMinRpcVersion()); - } - 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 (hasMaxRpcVersion()) { - hash = (37 * hash) + MAX_RPC_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getMaxRpcVersion().hashCode(); - } - if (hasMinRpcVersion()) { - hash = (37 * hash) + MIN_RPC_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getMinRpcVersion().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions 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.TransportSecurityCommon.RpcProtocolVersions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions 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.TransportSecurityCommon.RpcProtocolVersions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions 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.TransportSecurityCommon.RpcProtocolVersions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions 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.TransportSecurityCommon.RpcProtocolVersions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions 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.TransportSecurityCommon.RpcProtocolVersions 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; - } - /** - *
-     * Max and min supported RPC protocol versions.
-     * 
- * - * Protobuf type {@code grpc.gcp.RpcProtocolVersions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gcp.RpcProtocolVersions) - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.grpc.alts.internal.TransportSecurityCommon.internal_static_grpc_gcp_RpcProtocolVersions_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.grpc.alts.internal.TransportSecurityCommon.internal_static_grpc_gcp_RpcProtocolVersions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.class, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder.class); - } - - // Construct using io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.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(); - if (maxRpcVersionBuilder_ == null) { - maxRpcVersion_ = null; - } else { - maxRpcVersion_ = null; - maxRpcVersionBuilder_ = null; - } - if (minRpcVersionBuilder_ == null) { - minRpcVersion_ = null; - } else { - minRpcVersion_ = null; - minRpcVersionBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.grpc.alts.internal.TransportSecurityCommon.internal_static_grpc_gcp_RpcProtocolVersions_descriptor; - } - - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getDefaultInstanceForType() { - return io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance(); - } - - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions build() { - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions buildPartial() { - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions result = new io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions(this); - if (maxRpcVersionBuilder_ == null) { - result.maxRpcVersion_ = maxRpcVersion_; - } else { - result.maxRpcVersion_ = maxRpcVersionBuilder_.build(); - } - if (minRpcVersionBuilder_ == null) { - result.minRpcVersion_ = minRpcVersion_; - } else { - result.minRpcVersion_ = minRpcVersionBuilder_.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.TransportSecurityCommon.RpcProtocolVersions) { - return mergeFrom((io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions other) { - if (other == io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance()) return this; - if (other.hasMaxRpcVersion()) { - mergeMaxRpcVersion(other.getMaxRpcVersion()); - } - if (other.hasMinRpcVersion()) { - mergeMinRpcVersion(other.getMinRpcVersion()); - } - 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.TransportSecurityCommon.RpcProtocolVersions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version maxRpcVersion_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder> maxRpcVersionBuilder_; - /** - *
-       * Maximum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - public boolean hasMaxRpcVersion() { - return maxRpcVersionBuilder_ != null || maxRpcVersion_ != null; - } - /** - *
-       * Maximum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version getMaxRpcVersion() { - if (maxRpcVersionBuilder_ == null) { - return maxRpcVersion_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.getDefaultInstance() : maxRpcVersion_; - } else { - return maxRpcVersionBuilder_.getMessage(); - } - } - /** - *
-       * Maximum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - public Builder setMaxRpcVersion(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version value) { - if (maxRpcVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - maxRpcVersion_ = value; - onChanged(); - } else { - maxRpcVersionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Maximum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - public Builder setMaxRpcVersion( - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder builderForValue) { - if (maxRpcVersionBuilder_ == null) { - maxRpcVersion_ = builderForValue.build(); - onChanged(); - } else { - maxRpcVersionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Maximum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - public Builder mergeMaxRpcVersion(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version value) { - if (maxRpcVersionBuilder_ == null) { - if (maxRpcVersion_ != null) { - maxRpcVersion_ = - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.newBuilder(maxRpcVersion_).mergeFrom(value).buildPartial(); - } else { - maxRpcVersion_ = value; - } - onChanged(); - } else { - maxRpcVersionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Maximum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - public Builder clearMaxRpcVersion() { - if (maxRpcVersionBuilder_ == null) { - maxRpcVersion_ = null; - onChanged(); - } else { - maxRpcVersion_ = null; - maxRpcVersionBuilder_ = null; - } - - return this; - } - /** - *
-       * Maximum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder getMaxRpcVersionBuilder() { - - onChanged(); - return getMaxRpcVersionFieldBuilder().getBuilder(); - } - /** - *
-       * Maximum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder getMaxRpcVersionOrBuilder() { - if (maxRpcVersionBuilder_ != null) { - return maxRpcVersionBuilder_.getMessageOrBuilder(); - } else { - return maxRpcVersion_ == null ? - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.getDefaultInstance() : maxRpcVersion_; - } - } - /** - *
-       * Maximum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version max_rpc_version = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder> - getMaxRpcVersionFieldBuilder() { - if (maxRpcVersionBuilder_ == null) { - maxRpcVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder>( - getMaxRpcVersion(), - getParentForChildren(), - isClean()); - maxRpcVersion_ = null; - } - return maxRpcVersionBuilder_; - } - - private io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version minRpcVersion_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder> minRpcVersionBuilder_; - /** - *
-       * Minimum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - public boolean hasMinRpcVersion() { - return minRpcVersionBuilder_ != null || minRpcVersion_ != null; - } - /** - *
-       * Minimum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version getMinRpcVersion() { - if (minRpcVersionBuilder_ == null) { - return minRpcVersion_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.getDefaultInstance() : minRpcVersion_; - } else { - return minRpcVersionBuilder_.getMessage(); - } - } - /** - *
-       * Minimum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - public Builder setMinRpcVersion(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version value) { - if (minRpcVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - minRpcVersion_ = value; - onChanged(); - } else { - minRpcVersionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Minimum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - public Builder setMinRpcVersion( - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder builderForValue) { - if (minRpcVersionBuilder_ == null) { - minRpcVersion_ = builderForValue.build(); - onChanged(); - } else { - minRpcVersionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Minimum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - public Builder mergeMinRpcVersion(io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version value) { - if (minRpcVersionBuilder_ == null) { - if (minRpcVersion_ != null) { - minRpcVersion_ = - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.newBuilder(minRpcVersion_).mergeFrom(value).buildPartial(); - } else { - minRpcVersion_ = value; - } - onChanged(); - } else { - minRpcVersionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Minimum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - public Builder clearMinRpcVersion() { - if (minRpcVersionBuilder_ == null) { - minRpcVersion_ = null; - onChanged(); - } else { - minRpcVersion_ = null; - minRpcVersionBuilder_ = null; - } - - return this; - } - /** - *
-       * Minimum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder getMinRpcVersionBuilder() { - - onChanged(); - return getMinRpcVersionFieldBuilder().getBuilder(); - } - /** - *
-       * Minimum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder getMinRpcVersionOrBuilder() { - if (minRpcVersionBuilder_ != null) { - return minRpcVersionBuilder_.getMessageOrBuilder(); - } else { - return minRpcVersion_ == null ? - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.getDefaultInstance() : minRpcVersion_; - } - } - /** - *
-       * Minimum supported RPC version.
-       * 
- * - * .grpc.gcp.RpcProtocolVersions.Version min_rpc_version = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder> - getMinRpcVersionFieldBuilder() { - if (minRpcVersionBuilder_ == null) { - minRpcVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version.Builder, io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.VersionOrBuilder>( - getMinRpcVersion(), - getParentForChildren(), - isClean()); - minRpcVersion_ = null; - } - return minRpcVersionBuilder_; - } - 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.RpcProtocolVersions) - } - - // @@protoc_insertion_point(class_scope:grpc.gcp.RpcProtocolVersions) - private static final io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions(); - } - - public static io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public RpcProtocolVersions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RpcProtocolVersions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_RpcProtocolVersions_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_RpcProtocolVersions_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gcp_RpcProtocolVersions_Version_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n(grpc/gcp/transport_security_common.pro" + - "to\022\010grpc.gcp\"\276\001\n\023RpcProtocolVersions\022>\n\017" + - "max_rpc_version\030\001 \001(\0132%.grpc.gcp.RpcProt" + - "ocolVersions.Version\022>\n\017min_rpc_version\030" + - "\002 \001(\0132%.grpc.gcp.RpcProtocolVersions.Ver" + - "sion\032\'\n\007Version\022\r\n\005major\030\001 \001(\r\022\r\n\005minor\030" + - "\002 \001(\r*Q\n\rSecurityLevel\022\021\n\rSECURITY_NONE\020" + - "\000\022\022\n\016INTEGRITY_ONLY\020\001\022\031\n\025INTEGRITY_AND_P" + - "RIVACY\020\002B\027\n\025io.grpc.alts.internalb\006proto" + - "3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_grpc_gcp_RpcProtocolVersions_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grpc_gcp_RpcProtocolVersions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_RpcProtocolVersions_descriptor, - new java.lang.String[] { "MaxRpcVersion", "MinRpcVersion", }); - internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor = - internal_static_grpc_gcp_RpcProtocolVersions_descriptor.getNestedTypes().get(0); - internal_static_grpc_gcp_RpcProtocolVersions_Version_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor, - new java.lang.String[] { "Major", "Minor", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/alts/src/generated/main/java/io/grpc/alts/internal/TransportSecurityCommonProto.java b/alts/src/generated/main/java/io/grpc/alts/internal/TransportSecurityCommonProto.java new file mode 100644 index 0000000000..878b805296 --- /dev/null +++ b/alts/src/generated/main/java/io/grpc/alts/internal/TransportSecurityCommonProto.java @@ -0,0 +1,76 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/gcp/transport_security_common.proto + +package io.grpc.alts.internal; + +public final class TransportSecurityCommonProto { + private TransportSecurityCommonProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_RpcProtocolVersions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_RpcProtocolVersions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gcp_RpcProtocolVersions_Version_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n(grpc/gcp/transport_security_common.pro" + + "to\022\010grpc.gcp\"\276\001\n\023RpcProtocolVersions\022>\n\017" + + "max_rpc_version\030\001 \001(\0132%.grpc.gcp.RpcProt" + + "ocolVersions.Version\022>\n\017min_rpc_version\030" + + "\002 \001(\0132%.grpc.gcp.RpcProtocolVersions.Ver" + + "sion\032\'\n\007Version\022\r\n\005major\030\001 \001(\r\022\r\n\005minor\030" + + "\002 \001(\r*Q\n\rSecurityLevel\022\021\n\rSECURITY_NONE\020" + + "\000\022\022\n\016INTEGRITY_ONLY\020\001\022\031\n\025INTEGRITY_AND_P" + + "RIVACY\020\002Bx\n\025io.grpc.alts.internalB\034Trans" + + "portSecurityCommonProtoP\001Z?google.golang" + + ".org/grpc/credentials/alts/internal/prot" + + "o/grpc_gcpb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_grpc_gcp_RpcProtocolVersions_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grpc_gcp_RpcProtocolVersions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_RpcProtocolVersions_descriptor, + new java.lang.String[] { "MaxRpcVersion", "MinRpcVersion", }); + internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor = + internal_static_grpc_gcp_RpcProtocolVersions_descriptor.getNestedTypes().get(0); + internal_static_grpc_gcp_RpcProtocolVersions_Version_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gcp_RpcProtocolVersions_Version_descriptor, + new java.lang.String[] { "Major", "Minor", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/alts/src/main/java/io/grpc/alts/internal/AltsAuthContext.java b/alts/src/main/java/io/grpc/alts/internal/AltsAuthContext.java index cc335fe96d..4cd06c4b4e 100644 --- a/alts/src/main/java/io/grpc/alts/internal/AltsAuthContext.java +++ b/alts/src/main/java/io/grpc/alts/internal/AltsAuthContext.java @@ -17,10 +17,10 @@ package io.grpc.alts.internal; import com.google.common.annotations.VisibleForTesting; -import io.grpc.alts.internal.Altscontext.AltsContext; -import io.grpc.alts.internal.Handshaker.HandshakerResult; -import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions; -import io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel; +import io.grpc.alts.internal.AltsContext; +import io.grpc.alts.internal.HandshakerResult; +import io.grpc.alts.internal.RpcProtocolVersions; +import io.grpc.alts.internal.SecurityLevel; /** AltsAuthContext contains security-related context information about an ALTs connection. */ public final class AltsAuthContext { diff --git a/alts/src/main/java/io/grpc/alts/internal/AltsClientOptions.java b/alts/src/main/java/io/grpc/alts/internal/AltsClientOptions.java index e70e7d9ddb..9ad614c962 100644 --- a/alts/src/main/java/io/grpc/alts/internal/AltsClientOptions.java +++ b/alts/src/main/java/io/grpc/alts/internal/AltsClientOptions.java @@ -17,7 +17,6 @@ package io.grpc.alts.internal; import com.google.common.collect.ImmutableList; -import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions; import javax.annotation.Nullable; /** Handshaker options for creating ALTS client channel. */ diff --git a/alts/src/main/java/io/grpc/alts/internal/AltsHandshakerClient.java b/alts/src/main/java/io/grpc/alts/internal/AltsHandshakerClient.java index 8f1d79bf0a..26dcde3873 100644 --- a/alts/src/main/java/io/grpc/alts/internal/AltsHandshakerClient.java +++ b/alts/src/main/java/io/grpc/alts/internal/AltsHandshakerClient.java @@ -21,15 +21,6 @@ import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.google.protobuf.ByteString; import io.grpc.Status; -import io.grpc.alts.internal.Handshaker.HandshakeProtocol; -import io.grpc.alts.internal.Handshaker.HandshakerReq; -import io.grpc.alts.internal.Handshaker.HandshakerResp; -import io.grpc.alts.internal.Handshaker.HandshakerResult; -import io.grpc.alts.internal.Handshaker.HandshakerStatus; -import io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq; -import io.grpc.alts.internal.Handshaker.ServerHandshakeParameters; -import io.grpc.alts.internal.Handshaker.StartClientHandshakeReq; -import io.grpc.alts.internal.Handshaker.StartServerHandshakeReq; import io.grpc.alts.internal.HandshakerServiceGrpc.HandshakerServiceStub; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/alts/src/main/java/io/grpc/alts/internal/AltsHandshakerOptions.java b/alts/src/main/java/io/grpc/alts/internal/AltsHandshakerOptions.java index 5e0dbdbe29..d50f92f185 100644 --- a/alts/src/main/java/io/grpc/alts/internal/AltsHandshakerOptions.java +++ b/alts/src/main/java/io/grpc/alts/internal/AltsHandshakerOptions.java @@ -16,7 +16,6 @@ package io.grpc.alts.internal; -import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions; import javax.annotation.Nullable; /** Handshaker options for creating ALTS channel. */ diff --git a/alts/src/main/java/io/grpc/alts/internal/AltsHandshakerStub.java b/alts/src/main/java/io/grpc/alts/internal/AltsHandshakerStub.java index ee979aa433..5dc31919fe 100644 --- a/alts/src/main/java/io/grpc/alts/internal/AltsHandshakerStub.java +++ b/alts/src/main/java/io/grpc/alts/internal/AltsHandshakerStub.java @@ -18,8 +18,6 @@ package io.grpc.alts.internal; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Optional; -import io.grpc.alts.internal.Handshaker.HandshakerReq; -import io.grpc.alts.internal.Handshaker.HandshakerResp; import io.grpc.alts.internal.HandshakerServiceGrpc.HandshakerServiceStub; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/alts/src/main/java/io/grpc/alts/internal/RpcProtocolVersionsUtil.java b/alts/src/main/java/io/grpc/alts/internal/RpcProtocolVersionsUtil.java index b685b6b2d3..005065b4e2 100644 --- a/alts/src/main/java/io/grpc/alts/internal/RpcProtocolVersionsUtil.java +++ b/alts/src/main/java/io/grpc/alts/internal/RpcProtocolVersionsUtil.java @@ -17,8 +17,7 @@ package io.grpc.alts.internal; import com.google.common.annotations.VisibleForTesting; -import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions; -import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version; +import io.grpc.alts.internal.RpcProtocolVersions.Version; import javax.annotation.Nullable; /** Utility class for Rpc Protocol Versions. */ diff --git a/alts/src/main/proto/grpc/gcp/altscontext.proto b/alts/src/main/proto/grpc/gcp/altscontext.proto index ab22a03968..98ef21cacd 100644 --- a/alts/src/main/proto/grpc/gcp/altscontext.proto +++ b/alts/src/main/proto/grpc/gcp/altscontext.proto @@ -12,12 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The canonical version of this proto can be found at +// https://github.com/grpc/grpc-proto/blob/master/grpc/gcp/altscontext.proto + syntax = "proto3"; package grpc.gcp; import "grpc/gcp/transport_security_common.proto"; +option go_package = "google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp"; +option java_multiple_files = true; +option java_outer_classname = "AltsContextProto"; option java_package = "io.grpc.alts.internal"; message AltsContext { @@ -42,3 +48,4 @@ message AltsContext { // Additional attributes of the peer. map peer_attributes = 7; } + diff --git a/alts/src/main/proto/grpc/gcp/handshaker.proto b/alts/src/main/proto/grpc/gcp/handshaker.proto index bb057c6cb2..a29024ffce 100644 --- a/alts/src/main/proto/grpc/gcp/handshaker.proto +++ b/alts/src/main/proto/grpc/gcp/handshaker.proto @@ -12,14 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The canonical version of this proto can be found at +// https://github.com/grpc/grpc-proto/blob/master/grpc/gcp/handshaker.proto + syntax = "proto3"; package grpc.gcp; import "grpc/gcp/transport_security_common.proto"; +option go_package = "google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp"; +option java_multiple_files = true; +option java_outer_classname = "HandshakerProto"; option java_package = "io.grpc.alts.internal"; + enum HandshakeProtocol { // Default value. HANDSHAKE_PROTOCOL_UNSPECIFIED = 0; @@ -222,6 +229,7 @@ service HandshakerService { // service expects to respond. Client does not have to wait for service's // response before sending next request. rpc DoHandshake(stream HandshakerReq) - returns (stream HandshakerResp) { + returns (stream HandshakerResp) { } } + diff --git a/alts/src/main/proto/grpc/gcp/transport_security_common.proto b/alts/src/main/proto/grpc/gcp/transport_security_common.proto index e10197159e..f328a51c54 100644 --- a/alts/src/main/proto/grpc/gcp/transport_security_common.proto +++ b/alts/src/main/proto/grpc/gcp/transport_security_common.proto @@ -12,10 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The canonical version of this proto can be found at +// https://github.com/grpc/grpc-proto/blob/master/grpc/gcp/transport_security_common.proto + syntax = "proto3"; package grpc.gcp; +option go_package = "google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp"; +option java_multiple_files = true; +option java_outer_classname = "TransportSecurityCommonProto"; option java_package = "io.grpc.alts.internal"; // The security level of the created channel. The list is sorted in increasing @@ -38,3 +44,4 @@ message RpcProtocolVersions { // Minimum supported RPC version. Version min_rpc_version = 2; } + diff --git a/alts/src/test/java/io/grpc/alts/internal/AltsAuthContextTest.java b/alts/src/test/java/io/grpc/alts/internal/AltsAuthContextTest.java index eb1fbf9cac..2fc2c43464 100644 --- a/alts/src/test/java/io/grpc/alts/internal/AltsAuthContextTest.java +++ b/alts/src/test/java/io/grpc/alts/internal/AltsAuthContextTest.java @@ -18,10 +18,6 @@ package io.grpc.alts.internal; import static org.junit.Assert.assertEquals; -import io.grpc.alts.internal.Handshaker.HandshakerResult; -import io.grpc.alts.internal.Handshaker.Identity; -import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions; -import io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/alts/src/test/java/io/grpc/alts/internal/AltsClientOptionsTest.java b/alts/src/test/java/io/grpc/alts/internal/AltsClientOptionsTest.java index 5a7cf84913..47d7fc79ea 100644 --- a/alts/src/test/java/io/grpc/alts/internal/AltsClientOptionsTest.java +++ b/alts/src/test/java/io/grpc/alts/internal/AltsClientOptionsTest.java @@ -19,7 +19,6 @@ package io.grpc.alts.internal; import static com.google.common.truth.Truth.assertThat; import com.google.common.collect.ImmutableList; -import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; diff --git a/alts/src/test/java/io/grpc/alts/internal/AltsHandshakerClientTest.java b/alts/src/test/java/io/grpc/alts/internal/AltsHandshakerClientTest.java index 41923b5467..a8eb48ad26 100644 --- a/alts/src/test/java/io/grpc/alts/internal/AltsHandshakerClientTest.java +++ b/alts/src/test/java/io/grpc/alts/internal/AltsHandshakerClientTest.java @@ -29,11 +29,6 @@ import static org.mockito.Mockito.when; import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; -import io.grpc.alts.internal.Handshaker.HandshakeProtocol; -import io.grpc.alts.internal.Handshaker.HandshakerReq; -import io.grpc.alts.internal.Handshaker.Identity; -import io.grpc.alts.internal.Handshaker.StartClientHandshakeReq; -import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions; import java.nio.ByteBuffer; import java.security.GeneralSecurityException; import org.junit.Before; diff --git a/alts/src/test/java/io/grpc/alts/internal/AltsHandshakerOptionsTest.java b/alts/src/test/java/io/grpc/alts/internal/AltsHandshakerOptionsTest.java index 6a7814b300..ab065f2f2e 100644 --- a/alts/src/test/java/io/grpc/alts/internal/AltsHandshakerOptionsTest.java +++ b/alts/src/test/java/io/grpc/alts/internal/AltsHandshakerOptionsTest.java @@ -18,7 +18,6 @@ package io.grpc.alts.internal; import static com.google.common.truth.Truth.assertThat; -import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; diff --git a/alts/src/test/java/io/grpc/alts/internal/AltsHandshakerStubTest.java b/alts/src/test/java/io/grpc/alts/internal/AltsHandshakerStubTest.java index b896b5bf77..2267a765a9 100644 --- a/alts/src/test/java/io/grpc/alts/internal/AltsHandshakerStubTest.java +++ b/alts/src/test/java/io/grpc/alts/internal/AltsHandshakerStubTest.java @@ -21,9 +21,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import com.google.protobuf.ByteString; -import io.grpc.alts.internal.Handshaker.HandshakerReq; -import io.grpc.alts.internal.Handshaker.HandshakerResp; -import io.grpc.alts.internal.Handshaker.NextHandshakeMessageReq; import io.grpc.stub.StreamObserver; import java.io.IOException; import org.junit.Before; diff --git a/alts/src/test/java/io/grpc/alts/internal/AltsProtocolNegotiatorTest.java b/alts/src/test/java/io/grpc/alts/internal/AltsProtocolNegotiatorTest.java index 88f64784be..e92a2f9412 100644 --- a/alts/src/test/java/io/grpc/alts/internal/AltsProtocolNegotiatorTest.java +++ b/alts/src/test/java/io/grpc/alts/internal/AltsProtocolNegotiatorTest.java @@ -27,7 +27,6 @@ import io.grpc.Attributes; import io.grpc.Grpc; import io.grpc.InternalChannelz; import io.grpc.SecurityLevel; -import io.grpc.alts.internal.Handshaker.HandshakerResult; import io.grpc.alts.internal.TsiFrameProtector.Consumer; import io.grpc.alts.internal.TsiPeer.Property; import io.grpc.internal.GrpcAttributes; diff --git a/alts/src/test/java/io/grpc/alts/internal/AltsTsiHandshakerTest.java b/alts/src/test/java/io/grpc/alts/internal/AltsTsiHandshakerTest.java index ac3dfb8f2d..627e52a6db 100644 --- a/alts/src/test/java/io/grpc/alts/internal/AltsTsiHandshakerTest.java +++ b/alts/src/test/java/io/grpc/alts/internal/AltsTsiHandshakerTest.java @@ -26,9 +26,6 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import com.google.protobuf.ByteString; -import io.grpc.alts.internal.Handshaker.HandshakerResult; -import io.grpc.alts.internal.Handshaker.Identity; -import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions; import java.nio.ByteBuffer; import org.junit.Before; import org.junit.Test; diff --git a/alts/src/test/java/io/grpc/alts/internal/AltsTsiTest.java b/alts/src/test/java/io/grpc/alts/internal/AltsTsiTest.java index 8d990bda88..a6832ad8de 100644 --- a/alts/src/test/java/io/grpc/alts/internal/AltsTsiTest.java +++ b/alts/src/test/java/io/grpc/alts/internal/AltsTsiTest.java @@ -20,9 +20,6 @@ import static org.junit.Assert.assertEquals; import com.google.common.testing.GcFinalization; import io.grpc.alts.internal.ByteBufTestUtils.RegisterRef; -import io.grpc.alts.internal.Handshaker.HandshakeProtocol; -import io.grpc.alts.internal.Handshaker.HandshakerReq; -import io.grpc.alts.internal.Handshaker.HandshakerResp; import io.grpc.alts.internal.TsiTest.Handshakers; import io.netty.buffer.ByteBuf; import io.netty.util.ReferenceCounted; diff --git a/alts/src/test/java/io/grpc/alts/internal/MockAltsHandshakerResp.java b/alts/src/test/java/io/grpc/alts/internal/MockAltsHandshakerResp.java index 205746690d..7843d68120 100644 --- a/alts/src/test/java/io/grpc/alts/internal/MockAltsHandshakerResp.java +++ b/alts/src/test/java/io/grpc/alts/internal/MockAltsHandshakerResp.java @@ -20,10 +20,6 @@ import static java.nio.charset.StandardCharsets.UTF_8; import com.google.protobuf.ByteString; import io.grpc.Status; -import io.grpc.alts.internal.Handshaker.HandshakerResp; -import io.grpc.alts.internal.Handshaker.HandshakerResult; -import io.grpc.alts.internal.Handshaker.HandshakerStatus; -import io.grpc.alts.internal.Handshaker.Identity; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.security.SecureRandom; diff --git a/alts/src/test/java/io/grpc/alts/internal/RpcProtocolVersionsUtilTest.java b/alts/src/test/java/io/grpc/alts/internal/RpcProtocolVersionsUtilTest.java index dc3c7eb5d8..07e0358e70 100644 --- a/alts/src/test/java/io/grpc/alts/internal/RpcProtocolVersionsUtilTest.java +++ b/alts/src/test/java/io/grpc/alts/internal/RpcProtocolVersionsUtilTest.java @@ -20,9 +20,8 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import io.grpc.alts.internal.RpcProtocolVersions.Version; import io.grpc.alts.internal.RpcProtocolVersionsUtil.RpcVersionsCheckResult; -import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions; -import io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Version; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4;