blob: 9e40b65b6c89b41c1b0875a671bc7ce49b9690a4 [file] [log] [blame]
// 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 {
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
java.lang.String getApplicationProtocol();
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
com.google.protobuf.ByteString
getApplicationProtocolBytes();
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
java.lang.String getRecordProtocol();
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
com.google.protobuf.ByteString
getRecordProtocolBytes();
/**
* <pre>
* The security level of the created secure channel.
* </pre>
*
* <code>.grpc.gcp.SecurityLevel security_level = 3;</code>
*/
int getSecurityLevelValue();
/**
* <pre>
* The security level of the created secure channel.
* </pre>
*
* <code>.grpc.gcp.SecurityLevel security_level = 3;</code>
*/
io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel getSecurityLevel();
/**
* <pre>
* The peer service account.
* </pre>
*
* <code>string peer_service_account = 4;</code>
*/
java.lang.String getPeerServiceAccount();
/**
* <pre>
* The peer service account.
* </pre>
*
* <code>string peer_service_account = 4;</code>
*/
com.google.protobuf.ByteString
getPeerServiceAccountBytes();
/**
* <pre>
* The local service account.
* </pre>
*
* <code>string local_service_account = 5;</code>
*/
java.lang.String getLocalServiceAccount();
/**
* <pre>
* The local service account.
* </pre>
*
* <code>string local_service_account = 5;</code>
*/
com.google.protobuf.ByteString
getLocalServiceAccountBytes();
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
boolean hasPeerRpcVersions();
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getPeerRpcVersions();
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersionsOrBuilder getPeerRpcVersionsOrBuilder();
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
int getPeerAttributesCount();
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
boolean containsPeerAttributes(
java.lang.String key);
/**
* Use {@link #getPeerAttributesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, java.lang.String>
getPeerAttributes();
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
java.util.Map<java.lang.String, java.lang.String>
getPeerAttributesMap();
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
java.lang.String getPeerAttributesOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
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<java.lang.String, java.lang.String>
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_;
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public java.lang.String getApplicationProtocol() {
java.lang.Object ref = applicationProtocol_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
applicationProtocol_ = s;
return s;
}
}
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public com.google.protobuf.ByteString
getApplicationProtocolBytes() {
java.lang.Object ref = applicationProtocol_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
applicationProtocol_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RECORD_PROTOCOL_FIELD_NUMBER = 2;
private volatile java.lang.Object recordProtocol_;
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public java.lang.String getRecordProtocol() {
java.lang.Object ref = recordProtocol_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
recordProtocol_ = s;
return s;
}
}
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public com.google.protobuf.ByteString
getRecordProtocolBytes() {
java.lang.Object ref = recordProtocol_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
recordProtocol_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SECURITY_LEVEL_FIELD_NUMBER = 3;
private int securityLevel_;
/**
* <pre>
* The security level of the created secure channel.
* </pre>
*
* <code>.grpc.gcp.SecurityLevel security_level = 3;</code>
*/
public int getSecurityLevelValue() {
return securityLevel_;
}
/**
* <pre>
* The security level of the created secure channel.
* </pre>
*
* <code>.grpc.gcp.SecurityLevel security_level = 3;</code>
*/
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_;
/**
* <pre>
* The peer service account.
* </pre>
*
* <code>string peer_service_account = 4;</code>
*/
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;
}
}
/**
* <pre>
* The peer service account.
* </pre>
*
* <code>string peer_service_account = 4;</code>
*/
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_;
/**
* <pre>
* The local service account.
* </pre>
*
* <code>string local_service_account = 5;</code>
*/
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;
}
}
/**
* <pre>
* The local service account.
* </pre>
*
* <code>string local_service_account = 5;</code>
*/
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_;
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
public boolean hasPeerRpcVersions() {
return peerRpcVersions_ != null;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions getPeerRpcVersions() {
return peerRpcVersions_ == null ? io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.getDefaultInstance() : peerRpcVersions_;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
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
.<java.lang.String, java.lang.String>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<java.lang.String, java.lang.String>
internalGetPeerAttributes() {
if (peerAttributes_ == null) {
return com.google.protobuf.MapField.emptyMapField(
PeerAttributesDefaultEntryHolder.defaultEntry);
}
return peerAttributes_;
}
public int getPeerAttributesCount() {
return internalGetPeerAttributes().getMap().size();
}
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
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<java.lang.String, java.lang.String> getPeerAttributes() {
return getPeerAttributesMap();
}
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
public java.util.Map<java.lang.String, java.lang.String> getPeerAttributesMap() {
return internalGetPeerAttributes().getMap();
}
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
public java.lang.String getPeerAttributesOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetPeerAttributes().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
public java.lang.String getPeerAttributesOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.String> 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<java.lang.String, java.lang.String> entry
: internalGetPeerAttributes().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
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<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_ = "";
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public java.lang.String getApplicationProtocol() {
java.lang.Object ref = applicationProtocol_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
applicationProtocol_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public com.google.protobuf.ByteString
getApplicationProtocolBytes() {
java.lang.Object ref = applicationProtocol_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
applicationProtocol_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public Builder setApplicationProtocol(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
applicationProtocol_ = value;
onChanged();
return this;
}
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public Builder clearApplicationProtocol() {
applicationProtocol_ = getDefaultInstance().getApplicationProtocol();
onChanged();
return this;
}
/**
* <pre>
* The application protocol negotiated for this connection.
* </pre>
*
* <code>string application_protocol = 1;</code>
*/
public Builder setApplicationProtocolBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
applicationProtocol_ = value;
onChanged();
return this;
}
private java.lang.Object recordProtocol_ = "";
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public java.lang.String getRecordProtocol() {
java.lang.Object ref = recordProtocol_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
recordProtocol_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public com.google.protobuf.ByteString
getRecordProtocolBytes() {
java.lang.Object ref = recordProtocol_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
recordProtocol_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public Builder setRecordProtocol(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
recordProtocol_ = value;
onChanged();
return this;
}
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public Builder clearRecordProtocol() {
recordProtocol_ = getDefaultInstance().getRecordProtocol();
onChanged();
return this;
}
/**
* <pre>
* The record protocol negotiated for this connection.
* </pre>
*
* <code>string record_protocol = 2;</code>
*/
public Builder setRecordProtocolBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
recordProtocol_ = value;
onChanged();
return this;
}
private int securityLevel_ = 0;
/**
* <pre>
* The security level of the created secure channel.
* </pre>
*
* <code>.grpc.gcp.SecurityLevel security_level = 3;</code>
*/
public int getSecurityLevelValue() {
return securityLevel_;
}
/**
* <pre>
* The security level of the created secure channel.
* </pre>
*
* <code>.grpc.gcp.SecurityLevel security_level = 3;</code>
*/
public Builder setSecurityLevelValue(int value) {
securityLevel_ = value;
onChanged();
return this;
}
/**
* <pre>
* The security level of the created secure channel.
* </pre>
*
* <code>.grpc.gcp.SecurityLevel security_level = 3;</code>
*/
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;
}
/**
* <pre>
* The security level of the created secure channel.
* </pre>
*
* <code>.grpc.gcp.SecurityLevel security_level = 3;</code>
*/
public Builder setSecurityLevel(io.grpc.alts.internal.TransportSecurityCommon.SecurityLevel value) {
if (value == null) {
throw new NullPointerException();
}
securityLevel_ = value.getNumber();
onChanged();
return this;
}
/**
* <pre>
* The security level of the created secure channel.
* </pre>
*
* <code>.grpc.gcp.SecurityLevel security_level = 3;</code>
*/
public Builder clearSecurityLevel() {
securityLevel_ = 0;
onChanged();
return this;
}
private java.lang.Object peerServiceAccount_ = "";
/**
* <pre>
* The peer service account.
* </pre>
*
* <code>string peer_service_account = 4;</code>
*/
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;
}
}
/**
* <pre>
* The peer service account.
* </pre>
*
* <code>string peer_service_account = 4;</code>
*/
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;
}
}
/**
* <pre>
* The peer service account.
* </pre>
*
* <code>string peer_service_account = 4;</code>
*/
public Builder setPeerServiceAccount(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
peerServiceAccount_ = value;
onChanged();
return this;
}
/**
* <pre>
* The peer service account.
* </pre>
*
* <code>string peer_service_account = 4;</code>
*/
public Builder clearPeerServiceAccount() {
peerServiceAccount_ = getDefaultInstance().getPeerServiceAccount();
onChanged();
return this;
}
/**
* <pre>
* The peer service account.
* </pre>
*
* <code>string peer_service_account = 4;</code>
*/
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_ = "";
/**
* <pre>
* The local service account.
* </pre>
*
* <code>string local_service_account = 5;</code>
*/
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;
}
}
/**
* <pre>
* The local service account.
* </pre>
*
* <code>string local_service_account = 5;</code>
*/
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;
}
}
/**
* <pre>
* The local service account.
* </pre>
*
* <code>string local_service_account = 5;</code>
*/
public Builder setLocalServiceAccount(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
localServiceAccount_ = value;
onChanged();
return this;
}
/**
* <pre>
* The local service account.
* </pre>
*
* <code>string local_service_account = 5;</code>
*/
public Builder clearLocalServiceAccount() {
localServiceAccount_ = getDefaultInstance().getLocalServiceAccount();
onChanged();
return this;
}
/**
* <pre>
* The local service account.
* </pre>
*
* <code>string local_service_account = 5;</code>
*/
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_;
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
public boolean hasPeerRpcVersions() {
return peerRpcVersionsBuilder_ != null || peerRpcVersions_ != null;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
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();
}
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
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;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
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;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
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;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
public Builder clearPeerRpcVersions() {
if (peerRpcVersionsBuilder_ == null) {
peerRpcVersions_ = null;
onChanged();
} else {
peerRpcVersions_ = null;
peerRpcVersionsBuilder_ = null;
}
return this;
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
public io.grpc.alts.internal.TransportSecurityCommon.RpcProtocolVersions.Builder getPeerRpcVersionsBuilder() {
onChanged();
return getPeerRpcVersionsFieldBuilder().getBuilder();
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
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_;
}
}
/**
* <pre>
* The RPC protocol versions supported by the peer.
* </pre>
*
* <code>.grpc.gcp.RpcProtocolVersions peer_rpc_versions = 6;</code>
*/
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<java.lang.String, java.lang.String>
internalGetPeerAttributes() {
if (peerAttributes_ == null) {
return com.google.protobuf.MapField.emptyMapField(
PeerAttributesDefaultEntryHolder.defaultEntry);
}
return peerAttributes_;
}
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
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();
}
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
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<java.lang.String, java.lang.String> getPeerAttributes() {
return getPeerAttributesMap();
}
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
public java.util.Map<java.lang.String, java.lang.String> getPeerAttributesMap() {
return internalGetPeerAttributes().getMap();
}
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
public java.lang.String getPeerAttributesOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetPeerAttributes().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
public java.lang.String getPeerAttributesOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetPeerAttributes().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearPeerAttributes() {
internalGetMutablePeerAttributes().getMutableMap()
.clear();
return this;
}
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
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<java.lang.String, java.lang.String>
getMutablePeerAttributes() {
return internalGetMutablePeerAttributes().getMutableMap();
}
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
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;
}
/**
* <pre>
* Additional attributes of the peer.
* </pre>
*
* <code>map&lt;string, string&gt; peer_attributes = 7;</code>
*/
public Builder putAllPeerAttributes(
java.util.Map<java.lang.String, java.lang.String> 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<AltsContext>
PARSER = new com.google.protobuf.AbstractParser<AltsContext>() {
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<AltsContext> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AltsContext> 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)
}