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

io.grpc.alts.internal.Identity Maven / Gradle / Ivy

There is a newer version: 1.68.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: grpc/gcp/handshaker.proto

// Protobuf Java Version: 3.25.1
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
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new Identity();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Identity_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
      int number) {
    switch (number) {
      case 3:
        return internalGetAttributes();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  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 identityOneofCase_ = 0;
  @SuppressWarnings("serial")
  private java.lang.Object identityOneof_;
  public enum IdentityOneofCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    SERVICE_ACCOUNT(1),
    HOSTNAME(2),
    IDENTITYONEOF_NOT_SET(0);
    private final int value;
    private IdentityOneofCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @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; * @return Whether the serviceAccount field is set. */ public boolean hasServiceAccount() { return identityOneofCase_ == 1; } /** *
   * Service account of a connection endpoint.
   * 
* * string service_account = 1; * @return The serviceAccount. */ 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; * @return The bytes for serviceAccount. */ 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; * @return Whether the hostname field is set. */ public boolean hasHostname() { return identityOneofCase_ == 2; } /** *
   * Hostname of a connection endpoint.
   * 
* * string hostname = 2; * @return The hostname. */ 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; * @return The bytes for hostname. */ 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, ""); } @SuppressWarnings("serial") 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; */ @java.lang.Override public boolean containsAttributes( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetAttributes().getMap().containsKey(key); } /** * Use {@link #getAttributesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getAttributes() { return getAttributesMap(); } /** *
   * Additional attributes of the identity.
   * 
* * map<string, string> attributes = 3; */ @java.lang.Override public java.util.Map getAttributesMap() { return internalGetAttributes().getMap(); } /** *
   * Additional attributes of the identity.
   * 
* * map<string, string> attributes = 3; */ @java.lang.Override public /* nullable */ java.lang.String getAttributesOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetAttributes().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * Additional attributes of the identity.
   * 
* * map<string, string> attributes = 3; */ @java.lang.Override public java.lang.String getAttributesOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetAttributes().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (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); getUnknownFields().writeTo(output); } @java.lang.Override 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 += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.grpc.alts.internal.Identity)) { return super.equals(obj); } io.grpc.alts.internal.Identity other = (io.grpc.alts.internal.Identity) obj; if (!internalGetAttributes().equals( other.internalGetAttributes())) return false; if (!getIdentityOneofCase().equals(other.getIdentityOneofCase())) return false; switch (identityOneofCase_) { case 1: if (!getServiceAccount() .equals(other.getServiceAccount())) return false; break; case 2: if (!getHostname() .equals(other.getHostname())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); 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) + getUnknownFields().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); } @java.lang.Override 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); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code 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.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: return internalGetAttributes(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 3: return internalGetMutableAttributes(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override 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() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; internalGetMutableAttributes().clear(); identityOneofCase_ = 0; identityOneof_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.grpc.alts.internal.HandshakerProto.internal_static_grpc_gcp_Identity_descriptor; } @java.lang.Override public io.grpc.alts.internal.Identity getDefaultInstanceForType() { return io.grpc.alts.internal.Identity.getDefaultInstance(); } @java.lang.Override public io.grpc.alts.internal.Identity build() { io.grpc.alts.internal.Identity result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.grpc.alts.internal.Identity buildPartial() { io.grpc.alts.internal.Identity result = new io.grpc.alts.internal.Identity(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(io.grpc.alts.internal.Identity result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000004) != 0)) { result.attributes_ = internalGetAttributes(); result.attributes_.makeImmutable(); } } private void buildPartialOneofs(io.grpc.alts.internal.Identity result) { result.identityOneofCase_ = identityOneofCase_; result.identityOneof_ = this.identityOneof_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof 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()); bitField0_ |= 0x00000004; 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.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); identityOneofCase_ = 1; identityOneof_ = s; break; } // case 10 case 18: { java.lang.String s = input.readStringRequireUtf8(); identityOneofCase_ = 2; identityOneof_ = s; break; } // case 18 case 26: { com.google.protobuf.MapEntry attributes__ = input.readMessage( AttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableAttributes().getMutableMap().put( attributes__.getKey(), attributes__.getValue()); bitField0_ |= 0x00000004; break; } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int 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; * @return Whether the serviceAccount field is set. */ @java.lang.Override public boolean hasServiceAccount() { return identityOneofCase_ == 1; } /** *
     * Service account of a connection endpoint.
     * 
* * string service_account = 1; * @return The serviceAccount. */ @java.lang.Override 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; * @return The bytes for serviceAccount. */ @java.lang.Override 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; * @param value The serviceAccount to set. * @return This builder for chaining. */ 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; * @return This builder for chaining. */ public Builder clearServiceAccount() { if (identityOneofCase_ == 1) { identityOneofCase_ = 0; identityOneof_ = null; onChanged(); } return this; } /** *
     * Service account of a connection endpoint.
     * 
* * string service_account = 1; * @param value The bytes for serviceAccount to set. * @return This builder for chaining. */ 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; * @return Whether the hostname field is set. */ @java.lang.Override public boolean hasHostname() { return identityOneofCase_ == 2; } /** *
     * Hostname of a connection endpoint.
     * 
* * string hostname = 2; * @return The hostname. */ @java.lang.Override 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; * @return The bytes for hostname. */ @java.lang.Override 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; * @param value The hostname to set. * @return This builder for chaining. */ 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; * @return This builder for chaining. */ public Builder clearHostname() { if (identityOneofCase_ == 2) { identityOneofCase_ = 0; identityOneof_ = null; onChanged(); } return this; } /** *
     * Hostname of a connection endpoint.
     * 
* * string hostname = 2; * @param value The bytes for hostname to set. * @return This builder for chaining. */ 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() { if (attributes_ == null) { attributes_ = com.google.protobuf.MapField.newMapField( AttributesDefaultEntryHolder.defaultEntry); } if (!attributes_.isMutable()) { attributes_ = attributes_.copy(); } bitField0_ |= 0x00000004; onChanged(); return attributes_; } public int getAttributesCount() { return internalGetAttributes().getMap().size(); } /** *
     * Additional attributes of the identity.
     * 
* * map<string, string> attributes = 3; */ @java.lang.Override public boolean containsAttributes( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetAttributes().getMap().containsKey(key); } /** * Use {@link #getAttributesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getAttributes() { return getAttributesMap(); } /** *
     * Additional attributes of the identity.
     * 
* * map<string, string> attributes = 3; */ @java.lang.Override public java.util.Map getAttributesMap() { return internalGetAttributes().getMap(); } /** *
     * Additional attributes of the identity.
     * 
* * map<string, string> attributes = 3; */ @java.lang.Override public /* nullable */ java.lang.String getAttributesOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetAttributes().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * Additional attributes of the identity.
     * 
* * map<string, string> attributes = 3; */ @java.lang.Override public java.lang.String getAttributesOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetAttributes().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearAttributes() { bitField0_ = (bitField0_ & ~0x00000004); 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 NullPointerException("map key"); } internalGetMutableAttributes().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableAttributes() { bitField0_ |= 0x00000004; 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 NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableAttributes().getMutableMap() .put(key, value); bitField0_ |= 0x00000004; return this; } /** *
     * Additional attributes of the identity.
     * 
* * map<string, string> attributes = 3; */ public Builder putAllAttributes( java.util.Map values) { internalGetMutableAttributes().getMutableMap() .putAll(values); bitField0_ |= 0x00000004; return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope: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() { @java.lang.Override public Identity parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.grpc.alts.internal.Identity getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy