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

io.envoyproxy.envoy.config.overload.v3.OverloadAction Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: envoy/config/overload/v3/overload.proto

package io.envoyproxy.envoy.config.overload.v3;

/**
 * Protobuf type {@code envoy.config.overload.v3.OverloadAction}
 */
public final class OverloadAction extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:envoy.config.overload.v3.OverloadAction)
    OverloadActionOrBuilder {
private static final long serialVersionUID = 0L;
  // Use OverloadAction.newBuilder() to construct.
  private OverloadAction(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private OverloadAction() {
    name_ = "";
    triggers_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new OverloadAction();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private OverloadAction(
      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;
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            name_ = s;
            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              triggers_ = new java.util.ArrayList();
              mutable_bitField0_ |= 0x00000001;
            }
            triggers_.add(
                input.readMessage(io.envoyproxy.envoy.config.overload.v3.Trigger.parser(), extensionRegistry));
            break;
          }
          case 26: {
            com.google.protobuf.Any.Builder subBuilder = null;
            if (typedConfig_ != null) {
              subBuilder = typedConfig_.toBuilder();
            }
            typedConfig_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(typedConfig_);
              typedConfig_ = subBuilder.buildPartial();
            }

            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (com.google.protobuf.UninitializedMessageException e) {
      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        triggers_ = java.util.Collections.unmodifiableList(triggers_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.envoyproxy.envoy.config.overload.v3.OverloadProto.internal_static_envoy_config_overload_v3_OverloadAction_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.envoyproxy.envoy.config.overload.v3.OverloadProto.internal_static_envoy_config_overload_v3_OverloadAction_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.envoyproxy.envoy.config.overload.v3.OverloadAction.class, io.envoyproxy.envoy.config.overload.v3.OverloadAction.Builder.class);
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * 
   * The name of the overload action. This is just a well-known string that listeners can
   * use for registering callbacks. Custom overload actions should be named using reverse
   * DNS to ensure uniqueness.
   * 
* * string name = 1 [(.validate.rules) = { ... } * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; 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(); name_ = s; return s; } } /** *
   * The name of the overload action. This is just a well-known string that listeners can
   * use for registering callbacks. Custom overload actions should be named using reverse
   * DNS to ensure uniqueness.
   * 
* * string name = 1 [(.validate.rules) = { ... } * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TRIGGERS_FIELD_NUMBER = 2; private java.util.List triggers_; /** *
   * A set of triggers for this action. The state of the action is the maximum
   * state of all triggers, which can be scalar values between 0 and 1 or
   * saturated. Listeners are notified when the overload action changes state.
   * An overload manager action can only have one trigger for a given resource
   * e.g. :ref:`Trigger.name
   * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
   * in this list.
   * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ @java.lang.Override public java.util.List getTriggersList() { return triggers_; } /** *
   * A set of triggers for this action. The state of the action is the maximum
   * state of all triggers, which can be scalar values between 0 and 1 or
   * saturated. Listeners are notified when the overload action changes state.
   * An overload manager action can only have one trigger for a given resource
   * e.g. :ref:`Trigger.name
   * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
   * in this list.
   * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ @java.lang.Override public java.util.List getTriggersOrBuilderList() { return triggers_; } /** *
   * A set of triggers for this action. The state of the action is the maximum
   * state of all triggers, which can be scalar values between 0 and 1 or
   * saturated. Listeners are notified when the overload action changes state.
   * An overload manager action can only have one trigger for a given resource
   * e.g. :ref:`Trigger.name
   * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
   * in this list.
   * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ @java.lang.Override public int getTriggersCount() { return triggers_.size(); } /** *
   * A set of triggers for this action. The state of the action is the maximum
   * state of all triggers, which can be scalar values between 0 and 1 or
   * saturated. Listeners are notified when the overload action changes state.
   * An overload manager action can only have one trigger for a given resource
   * e.g. :ref:`Trigger.name
   * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
   * in this list.
   * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ @java.lang.Override public io.envoyproxy.envoy.config.overload.v3.Trigger getTriggers(int index) { return triggers_.get(index); } /** *
   * A set of triggers for this action. The state of the action is the maximum
   * state of all triggers, which can be scalar values between 0 and 1 or
   * saturated. Listeners are notified when the overload action changes state.
   * An overload manager action can only have one trigger for a given resource
   * e.g. :ref:`Trigger.name
   * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
   * in this list.
   * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ @java.lang.Override public io.envoyproxy.envoy.config.overload.v3.TriggerOrBuilder getTriggersOrBuilder( int index) { return triggers_.get(index); } public static final int TYPED_CONFIG_FIELD_NUMBER = 3; private com.google.protobuf.Any typedConfig_; /** *
   * Configuration for the action being instantiated.
   * 
* * .google.protobuf.Any typed_config = 3; * @return Whether the typedConfig field is set. */ @java.lang.Override public boolean hasTypedConfig() { return typedConfig_ != null; } /** *
   * Configuration for the action being instantiated.
   * 
* * .google.protobuf.Any typed_config = 3; * @return The typedConfig. */ @java.lang.Override public com.google.protobuf.Any getTypedConfig() { return typedConfig_ == null ? com.google.protobuf.Any.getDefaultInstance() : typedConfig_; } /** *
   * Configuration for the action being instantiated.
   * 
* * .google.protobuf.Any typed_config = 3; */ @java.lang.Override public com.google.protobuf.AnyOrBuilder getTypedConfigOrBuilder() { return getTypedConfig(); } 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < triggers_.size(); i++) { output.writeMessage(2, triggers_.get(i)); } if (typedConfig_ != null) { output.writeMessage(3, getTypedConfig()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } for (int i = 0; i < triggers_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, triggers_.get(i)); } if (typedConfig_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getTypedConfig()); } 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.envoyproxy.envoy.config.overload.v3.OverloadAction)) { return super.equals(obj); } io.envoyproxy.envoy.config.overload.v3.OverloadAction other = (io.envoyproxy.envoy.config.overload.v3.OverloadAction) obj; if (!getName() .equals(other.getName())) return false; if (!getTriggersList() .equals(other.getTriggersList())) return false; if (hasTypedConfig() != other.hasTypedConfig()) return false; if (hasTypedConfig()) { if (!getTypedConfig() .equals(other.getTypedConfig())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (getTriggersCount() > 0) { hash = (37 * hash) + TRIGGERS_FIELD_NUMBER; hash = (53 * hash) + getTriggersList().hashCode(); } if (hasTypedConfig()) { hash = (37 * hash) + TYPED_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getTypedConfig().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.config.overload.v3.OverloadAction parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.overload.v3.OverloadAction parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.overload.v3.OverloadAction parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.overload.v3.OverloadAction parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.overload.v3.OverloadAction parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.overload.v3.OverloadAction parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.overload.v3.OverloadAction parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.overload.v3.OverloadAction 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.envoyproxy.envoy.config.overload.v3.OverloadAction parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.overload.v3.OverloadAction 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.envoyproxy.envoy.config.overload.v3.OverloadAction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.overload.v3.OverloadAction 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.envoyproxy.envoy.config.overload.v3.OverloadAction 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 envoy.config.overload.v3.OverloadAction} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.config.overload.v3.OverloadAction) io.envoyproxy.envoy.config.overload.v3.OverloadActionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.overload.v3.OverloadProto.internal_static_envoy_config_overload_v3_OverloadAction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.config.overload.v3.OverloadProto.internal_static_envoy_config_overload_v3_OverloadAction_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.overload.v3.OverloadAction.class, io.envoyproxy.envoy.config.overload.v3.OverloadAction.Builder.class); } // Construct using io.envoyproxy.envoy.config.overload.v3.OverloadAction.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getTriggersFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; if (triggersBuilder_ == null) { triggers_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { triggersBuilder_.clear(); } if (typedConfigBuilder_ == null) { typedConfig_ = null; } else { typedConfig_ = null; typedConfigBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.config.overload.v3.OverloadProto.internal_static_envoy_config_overload_v3_OverloadAction_descriptor; } @java.lang.Override public io.envoyproxy.envoy.config.overload.v3.OverloadAction getDefaultInstanceForType() { return io.envoyproxy.envoy.config.overload.v3.OverloadAction.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.config.overload.v3.OverloadAction build() { io.envoyproxy.envoy.config.overload.v3.OverloadAction result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.config.overload.v3.OverloadAction buildPartial() { io.envoyproxy.envoy.config.overload.v3.OverloadAction result = new io.envoyproxy.envoy.config.overload.v3.OverloadAction(this); int from_bitField0_ = bitField0_; result.name_ = name_; if (triggersBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { triggers_ = java.util.Collections.unmodifiableList(triggers_); bitField0_ = (bitField0_ & ~0x00000001); } result.triggers_ = triggers_; } else { result.triggers_ = triggersBuilder_.build(); } if (typedConfigBuilder_ == null) { result.typedConfig_ = typedConfig_; } else { result.typedConfig_ = typedConfigBuilder_.build(); } onBuilt(); return result; } @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.envoyproxy.envoy.config.overload.v3.OverloadAction) { return mergeFrom((io.envoyproxy.envoy.config.overload.v3.OverloadAction)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.config.overload.v3.OverloadAction other) { if (other == io.envoyproxy.envoy.config.overload.v3.OverloadAction.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (triggersBuilder_ == null) { if (!other.triggers_.isEmpty()) { if (triggers_.isEmpty()) { triggers_ = other.triggers_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureTriggersIsMutable(); triggers_.addAll(other.triggers_); } onChanged(); } } else { if (!other.triggers_.isEmpty()) { if (triggersBuilder_.isEmpty()) { triggersBuilder_.dispose(); triggersBuilder_ = null; triggers_ = other.triggers_; bitField0_ = (bitField0_ & ~0x00000001); triggersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTriggersFieldBuilder() : null; } else { triggersBuilder_.addAllMessages(other.triggers_); } } } if (other.hasTypedConfig()) { mergeTypedConfig(other.getTypedConfig()); } this.mergeUnknownFields(other.unknownFields); 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 { io.envoyproxy.envoy.config.overload.v3.OverloadAction parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.config.overload.v3.OverloadAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object name_ = ""; /** *
     * The name of the overload action. This is just a well-known string that listeners can
     * use for registering callbacks. Custom overload actions should be named using reverse
     * DNS to ensure uniqueness.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The name of the overload action. This is just a well-known string that listeners can
     * use for registering callbacks. Custom overload actions should be named using reverse
     * DNS to ensure uniqueness.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The name of the overload action. This is just a well-known string that listeners can
     * use for registering callbacks. Custom overload actions should be named using reverse
     * DNS to ensure uniqueness.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
     * The name of the overload action. This is just a well-known string that listeners can
     * use for registering callbacks. Custom overload actions should be named using reverse
     * DNS to ensure uniqueness.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
     * The name of the overload action. This is just a well-known string that listeners can
     * use for registering callbacks. Custom overload actions should be named using reverse
     * DNS to ensure uniqueness.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private java.util.List triggers_ = java.util.Collections.emptyList(); private void ensureTriggersIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { triggers_ = new java.util.ArrayList(triggers_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.overload.v3.Trigger, io.envoyproxy.envoy.config.overload.v3.Trigger.Builder, io.envoyproxy.envoy.config.overload.v3.TriggerOrBuilder> triggersBuilder_; /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public java.util.List getTriggersList() { if (triggersBuilder_ == null) { return java.util.Collections.unmodifiableList(triggers_); } else { return triggersBuilder_.getMessageList(); } } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public int getTriggersCount() { if (triggersBuilder_ == null) { return triggers_.size(); } else { return triggersBuilder_.getCount(); } } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.overload.v3.Trigger getTriggers(int index) { if (triggersBuilder_ == null) { return triggers_.get(index); } else { return triggersBuilder_.getMessage(index); } } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public Builder setTriggers( int index, io.envoyproxy.envoy.config.overload.v3.Trigger value) { if (triggersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTriggersIsMutable(); triggers_.set(index, value); onChanged(); } else { triggersBuilder_.setMessage(index, value); } return this; } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public Builder setTriggers( int index, io.envoyproxy.envoy.config.overload.v3.Trigger.Builder builderForValue) { if (triggersBuilder_ == null) { ensureTriggersIsMutable(); triggers_.set(index, builderForValue.build()); onChanged(); } else { triggersBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public Builder addTriggers(io.envoyproxy.envoy.config.overload.v3.Trigger value) { if (triggersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTriggersIsMutable(); triggers_.add(value); onChanged(); } else { triggersBuilder_.addMessage(value); } return this; } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public Builder addTriggers( int index, io.envoyproxy.envoy.config.overload.v3.Trigger value) { if (triggersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTriggersIsMutable(); triggers_.add(index, value); onChanged(); } else { triggersBuilder_.addMessage(index, value); } return this; } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public Builder addTriggers( io.envoyproxy.envoy.config.overload.v3.Trigger.Builder builderForValue) { if (triggersBuilder_ == null) { ensureTriggersIsMutable(); triggers_.add(builderForValue.build()); onChanged(); } else { triggersBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public Builder addTriggers( int index, io.envoyproxy.envoy.config.overload.v3.Trigger.Builder builderForValue) { if (triggersBuilder_ == null) { ensureTriggersIsMutable(); triggers_.add(index, builderForValue.build()); onChanged(); } else { triggersBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public Builder addAllTriggers( java.lang.Iterable values) { if (triggersBuilder_ == null) { ensureTriggersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, triggers_); onChanged(); } else { triggersBuilder_.addAllMessages(values); } return this; } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public Builder clearTriggers() { if (triggersBuilder_ == null) { triggers_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { triggersBuilder_.clear(); } return this; } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public Builder removeTriggers(int index) { if (triggersBuilder_ == null) { ensureTriggersIsMutable(); triggers_.remove(index); onChanged(); } else { triggersBuilder_.remove(index); } return this; } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.overload.v3.Trigger.Builder getTriggersBuilder( int index) { return getTriggersFieldBuilder().getBuilder(index); } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.overload.v3.TriggerOrBuilder getTriggersOrBuilder( int index) { if (triggersBuilder_ == null) { return triggers_.get(index); } else { return triggersBuilder_.getMessageOrBuilder(index); } } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public java.util.List getTriggersOrBuilderList() { if (triggersBuilder_ != null) { return triggersBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(triggers_); } } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.overload.v3.Trigger.Builder addTriggersBuilder() { return getTriggersFieldBuilder().addBuilder( io.envoyproxy.envoy.config.overload.v3.Trigger.getDefaultInstance()); } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public io.envoyproxy.envoy.config.overload.v3.Trigger.Builder addTriggersBuilder( int index) { return getTriggersFieldBuilder().addBuilder( index, io.envoyproxy.envoy.config.overload.v3.Trigger.getDefaultInstance()); } /** *
     * A set of triggers for this action. The state of the action is the maximum
     * state of all triggers, which can be scalar values between 0 and 1 or
     * saturated. Listeners are notified when the overload action changes state.
     * An overload manager action can only have one trigger for a given resource
     * e.g. :ref:`Trigger.name
     * <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
     * in this list.
     * 
* * repeated .envoy.config.overload.v3.Trigger triggers = 2 [(.validate.rules) = { ... } */ public java.util.List getTriggersBuilderList() { return getTriggersFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.overload.v3.Trigger, io.envoyproxy.envoy.config.overload.v3.Trigger.Builder, io.envoyproxy.envoy.config.overload.v3.TriggerOrBuilder> getTriggersFieldBuilder() { if (triggersBuilder_ == null) { triggersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.config.overload.v3.Trigger, io.envoyproxy.envoy.config.overload.v3.Trigger.Builder, io.envoyproxy.envoy.config.overload.v3.TriggerOrBuilder>( triggers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); triggers_ = null; } return triggersBuilder_; } private com.google.protobuf.Any typedConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> typedConfigBuilder_; /** *
     * Configuration for the action being instantiated.
     * 
* * .google.protobuf.Any typed_config = 3; * @return Whether the typedConfig field is set. */ public boolean hasTypedConfig() { return typedConfigBuilder_ != null || typedConfig_ != null; } /** *
     * Configuration for the action being instantiated.
     * 
* * .google.protobuf.Any typed_config = 3; * @return The typedConfig. */ public com.google.protobuf.Any getTypedConfig() { if (typedConfigBuilder_ == null) { return typedConfig_ == null ? com.google.protobuf.Any.getDefaultInstance() : typedConfig_; } else { return typedConfigBuilder_.getMessage(); } } /** *
     * Configuration for the action being instantiated.
     * 
* * .google.protobuf.Any typed_config = 3; */ public Builder setTypedConfig(com.google.protobuf.Any value) { if (typedConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } typedConfig_ = value; onChanged(); } else { typedConfigBuilder_.setMessage(value); } return this; } /** *
     * Configuration for the action being instantiated.
     * 
* * .google.protobuf.Any typed_config = 3; */ public Builder setTypedConfig( com.google.protobuf.Any.Builder builderForValue) { if (typedConfigBuilder_ == null) { typedConfig_ = builderForValue.build(); onChanged(); } else { typedConfigBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Configuration for the action being instantiated.
     * 
* * .google.protobuf.Any typed_config = 3; */ public Builder mergeTypedConfig(com.google.protobuf.Any value) { if (typedConfigBuilder_ == null) { if (typedConfig_ != null) { typedConfig_ = com.google.protobuf.Any.newBuilder(typedConfig_).mergeFrom(value).buildPartial(); } else { typedConfig_ = value; } onChanged(); } else { typedConfigBuilder_.mergeFrom(value); } return this; } /** *
     * Configuration for the action being instantiated.
     * 
* * .google.protobuf.Any typed_config = 3; */ public Builder clearTypedConfig() { if (typedConfigBuilder_ == null) { typedConfig_ = null; onChanged(); } else { typedConfig_ = null; typedConfigBuilder_ = null; } return this; } /** *
     * Configuration for the action being instantiated.
     * 
* * .google.protobuf.Any typed_config = 3; */ public com.google.protobuf.Any.Builder getTypedConfigBuilder() { onChanged(); return getTypedConfigFieldBuilder().getBuilder(); } /** *
     * Configuration for the action being instantiated.
     * 
* * .google.protobuf.Any typed_config = 3; */ public com.google.protobuf.AnyOrBuilder getTypedConfigOrBuilder() { if (typedConfigBuilder_ != null) { return typedConfigBuilder_.getMessageOrBuilder(); } else { return typedConfig_ == null ? com.google.protobuf.Any.getDefaultInstance() : typedConfig_; } } /** *
     * Configuration for the action being instantiated.
     * 
* * .google.protobuf.Any typed_config = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> getTypedConfigFieldBuilder() { if (typedConfigBuilder_ == null) { typedConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( getTypedConfig(), getParentForChildren(), isClean()); typedConfig_ = null; } return typedConfigBuilder_; } @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:envoy.config.overload.v3.OverloadAction) } // @@protoc_insertion_point(class_scope:envoy.config.overload.v3.OverloadAction) private static final io.envoyproxy.envoy.config.overload.v3.OverloadAction DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.overload.v3.OverloadAction(); } public static io.envoyproxy.envoy.config.overload.v3.OverloadAction getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public OverloadAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new OverloadAction(input, extensionRegistry); } }; 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.envoyproxy.envoy.config.overload.v3.OverloadAction getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy