/*
 * Copyright 2026 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/api/client.proto
// Protobuf Java Version: 4.33.2

package com.google.api;

/**
 *
 *
 * <pre>
 * Describes the generator configuration for a method.
 * </pre>
 *
 * Protobuf type {@code google.api.MethodSettings}
 */
@com.google.protobuf.Generated
public final class MethodSettings extends com.google.protobuf.GeneratedMessage
    implements
    // @@protoc_insertion_point(message_implements:google.api.MethodSettings)
    MethodSettingsOrBuilder {
  private static final long serialVersionUID = 0L;

  static {
    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
        /* major= */ 4,
        /* minor= */ 33,
        /* patch= */ 2,
        /* suffix= */ "",
        "MethodSettings");
  }

  // Use MethodSettings.newBuilder() to construct.
  private MethodSettings(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
    super(builder);
  }

  private MethodSettings() {
    selector_ = "";
    autoPopulatedFields_ = com.google.protobuf.LazyStringArrayList.emptyList();
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.api.ClientProto.internal_static_google_api_MethodSettings_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.api.ClientProto.internal_static_google_api_MethodSettings_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.api.MethodSettings.class, com.google.api.MethodSettings.Builder.class);
  }

  public interface LongRunningOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.api.MethodSettings.LongRunning)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Initial delay after which the first poll request will be made.
     * Default value: 5 seconds.
     * </pre>
     *
     * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
     *
     * @return Whether the initialPollDelay field is set.
     */
    boolean hasInitialPollDelay();

    /**
     *
     *
     * <pre>
     * Initial delay after which the first poll request will be made.
     * Default value: 5 seconds.
     * </pre>
     *
     * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
     *
     * @return The initialPollDelay.
     */
    com.google.protobuf.Duration getInitialPollDelay();

    /**
     *
     *
     * <pre>
     * Initial delay after which the first poll request will be made.
     * Default value: 5 seconds.
     * </pre>
     *
     * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
     */
    com.google.protobuf.DurationOrBuilder getInitialPollDelayOrBuilder();

    /**
     *
     *
     * <pre>
     * Multiplier to gradually increase delay between subsequent polls until it
     * reaches max_poll_delay.
     * Default value: 1.5.
     * </pre>
     *
     * <code>float poll_delay_multiplier = 2;</code>
     *
     * @return The pollDelayMultiplier.
     */
    float getPollDelayMultiplier();

    /**
     *
     *
     * <pre>
     * Maximum time between two subsequent poll requests.
     * Default value: 45 seconds.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
     *
     * @return Whether the maxPollDelay field is set.
     */
    boolean hasMaxPollDelay();

    /**
     *
     *
     * <pre>
     * Maximum time between two subsequent poll requests.
     * Default value: 45 seconds.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
     *
     * @return The maxPollDelay.
     */
    com.google.protobuf.Duration getMaxPollDelay();

    /**
     *
     *
     * <pre>
     * Maximum time between two subsequent poll requests.
     * Default value: 45 seconds.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
     */
    com.google.protobuf.DurationOrBuilder getMaxPollDelayOrBuilder();

    /**
     *
     *
     * <pre>
     * Total polling timeout.
     * Default value: 5 minutes.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
     *
     * @return Whether the totalPollTimeout field is set.
     */
    boolean hasTotalPollTimeout();

    /**
     *
     *
     * <pre>
     * Total polling timeout.
     * Default value: 5 minutes.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
     *
     * @return The totalPollTimeout.
     */
    com.google.protobuf.Duration getTotalPollTimeout();

    /**
     *
     *
     * <pre>
     * Total polling timeout.
     * Default value: 5 minutes.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
     */
    com.google.protobuf.DurationOrBuilder getTotalPollTimeoutOrBuilder();
  }

  /**
   *
   *
   * <pre>
   * Describes settings to use when generating API methods that use the
   * long-running operation pattern.
   * All default values below are from those used in the client library
   * generators (e.g.
   * [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
   * </pre>
   *
   * Protobuf type {@code google.api.MethodSettings.LongRunning}
   */
  public static final class LongRunning extends com.google.protobuf.GeneratedMessage
      implements
      // @@protoc_insertion_point(message_implements:google.api.MethodSettings.LongRunning)
      LongRunningOrBuilder {
    private static final long serialVersionUID = 0L;

    static {
      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
          /* major= */ 4,
          /* minor= */ 33,
          /* patch= */ 2,
          /* suffix= */ "",
          "LongRunning");
    }

    // Use LongRunning.newBuilder() to construct.
    private LongRunning(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }

    private LongRunning() {}

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.api.ClientProto
          .internal_static_google_api_MethodSettings_LongRunning_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.api.ClientProto
          .internal_static_google_api_MethodSettings_LongRunning_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.api.MethodSettings.LongRunning.class,
              com.google.api.MethodSettings.LongRunning.Builder.class);
    }

    private int bitField0_;
    public static final int INITIAL_POLL_DELAY_FIELD_NUMBER = 1;
    private com.google.protobuf.Duration initialPollDelay_;

    /**
     *
     *
     * <pre>
     * Initial delay after which the first poll request will be made.
     * Default value: 5 seconds.
     * </pre>
     *
     * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
     *
     * @return Whether the initialPollDelay field is set.
     */
    @java.lang.Override
    public boolean hasInitialPollDelay() {
      return ((bitField0_ & 0x00000001) != 0);
    }

    /**
     *
     *
     * <pre>
     * Initial delay after which the first poll request will be made.
     * Default value: 5 seconds.
     * </pre>
     *
     * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
     *
     * @return The initialPollDelay.
     */
    @java.lang.Override
    public com.google.protobuf.Duration getInitialPollDelay() {
      return initialPollDelay_ == null
          ? com.google.protobuf.Duration.getDefaultInstance()
          : initialPollDelay_;
    }

    /**
     *
     *
     * <pre>
     * Initial delay after which the first poll request will be made.
     * Default value: 5 seconds.
     * </pre>
     *
     * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
     */
    @java.lang.Override
    public com.google.protobuf.DurationOrBuilder getInitialPollDelayOrBuilder() {
      return initialPollDelay_ == null
          ? com.google.protobuf.Duration.getDefaultInstance()
          : initialPollDelay_;
    }

    public static final int POLL_DELAY_MULTIPLIER_FIELD_NUMBER = 2;
    private float pollDelayMultiplier_ = 0F;

    /**
     *
     *
     * <pre>
     * Multiplier to gradually increase delay between subsequent polls until it
     * reaches max_poll_delay.
     * Default value: 1.5.
     * </pre>
     *
     * <code>float poll_delay_multiplier = 2;</code>
     *
     * @return The pollDelayMultiplier.
     */
    @java.lang.Override
    public float getPollDelayMultiplier() {
      return pollDelayMultiplier_;
    }

    public static final int MAX_POLL_DELAY_FIELD_NUMBER = 3;
    private com.google.protobuf.Duration maxPollDelay_;

    /**
     *
     *
     * <pre>
     * Maximum time between two subsequent poll requests.
     * Default value: 45 seconds.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
     *
     * @return Whether the maxPollDelay field is set.
     */
    @java.lang.Override
    public boolean hasMaxPollDelay() {
      return ((bitField0_ & 0x00000002) != 0);
    }

    /**
     *
     *
     * <pre>
     * Maximum time between two subsequent poll requests.
     * Default value: 45 seconds.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
     *
     * @return The maxPollDelay.
     */
    @java.lang.Override
    public com.google.protobuf.Duration getMaxPollDelay() {
      return maxPollDelay_ == null
          ? com.google.protobuf.Duration.getDefaultInstance()
          : maxPollDelay_;
    }

    /**
     *
     *
     * <pre>
     * Maximum time between two subsequent poll requests.
     * Default value: 45 seconds.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
     */
    @java.lang.Override
    public com.google.protobuf.DurationOrBuilder getMaxPollDelayOrBuilder() {
      return maxPollDelay_ == null
          ? com.google.protobuf.Duration.getDefaultInstance()
          : maxPollDelay_;
    }

    public static final int TOTAL_POLL_TIMEOUT_FIELD_NUMBER = 4;
    private com.google.protobuf.Duration totalPollTimeout_;

    /**
     *
     *
     * <pre>
     * Total polling timeout.
     * Default value: 5 minutes.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
     *
     * @return Whether the totalPollTimeout field is set.
     */
    @java.lang.Override
    public boolean hasTotalPollTimeout() {
      return ((bitField0_ & 0x00000004) != 0);
    }

    /**
     *
     *
     * <pre>
     * Total polling timeout.
     * Default value: 5 minutes.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
     *
     * @return The totalPollTimeout.
     */
    @java.lang.Override
    public com.google.protobuf.Duration getTotalPollTimeout() {
      return totalPollTimeout_ == null
          ? com.google.protobuf.Duration.getDefaultInstance()
          : totalPollTimeout_;
    }

    /**
     *
     *
     * <pre>
     * Total polling timeout.
     * Default value: 5 minutes.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
     */
    @java.lang.Override
    public com.google.protobuf.DurationOrBuilder getTotalPollTimeoutOrBuilder() {
      return totalPollTimeout_ == null
          ? com.google.protobuf.Duration.getDefaultInstance()
          : totalPollTimeout_;
    }

    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 (((bitField0_ & 0x00000001) != 0)) {
        output.writeMessage(1, getInitialPollDelay());
      }
      if (java.lang.Float.floatToRawIntBits(pollDelayMultiplier_) != 0) {
        output.writeFloat(2, pollDelayMultiplier_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeMessage(3, getMaxPollDelay());
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        output.writeMessage(4, getTotalPollTimeout());
      }
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) != 0)) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInitialPollDelay());
      }
      if (java.lang.Float.floatToRawIntBits(pollDelayMultiplier_) != 0) {
        size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, pollDelayMultiplier_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMaxPollDelay());
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTotalPollTimeout());
      }
      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 com.google.api.MethodSettings.LongRunning)) {
        return super.equals(obj);
      }
      com.google.api.MethodSettings.LongRunning other =
          (com.google.api.MethodSettings.LongRunning) obj;

      if (hasInitialPollDelay() != other.hasInitialPollDelay()) return false;
      if (hasInitialPollDelay()) {
        if (!getInitialPollDelay().equals(other.getInitialPollDelay())) return false;
      }
      if (java.lang.Float.floatToIntBits(getPollDelayMultiplier())
          != java.lang.Float.floatToIntBits(other.getPollDelayMultiplier())) return false;
      if (hasMaxPollDelay() != other.hasMaxPollDelay()) return false;
      if (hasMaxPollDelay()) {
        if (!getMaxPollDelay().equals(other.getMaxPollDelay())) return false;
      }
      if (hasTotalPollTimeout() != other.hasTotalPollTimeout()) return false;
      if (hasTotalPollTimeout()) {
        if (!getTotalPollTimeout().equals(other.getTotalPollTimeout())) return false;
      }
      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 (hasInitialPollDelay()) {
        hash = (37 * hash) + INITIAL_POLL_DELAY_FIELD_NUMBER;
        hash = (53 * hash) + getInitialPollDelay().hashCode();
      }
      hash = (37 * hash) + POLL_DELAY_MULTIPLIER_FIELD_NUMBER;
      hash = (53 * hash) + java.lang.Float.floatToIntBits(getPollDelayMultiplier());
      if (hasMaxPollDelay()) {
        hash = (37 * hash) + MAX_POLL_DELAY_FIELD_NUMBER;
        hash = (53 * hash) + getMaxPollDelay().hashCode();
      }
      if (hasTotalPollTimeout()) {
        hash = (37 * hash) + TOTAL_POLL_TIMEOUT_FIELD_NUMBER;
        hash = (53 * hash) + getTotalPollTimeout().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.api.MethodSettings.LongRunning parseFrom(java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.api.MethodSettings.LongRunning parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.api.MethodSettings.LongRunning parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.api.MethodSettings.LongRunning parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.api.MethodSettings.LongRunning parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.api.MethodSettings.LongRunning parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.api.MethodSettings.LongRunning parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
    }

    public static com.google.api.MethodSettings.LongRunning parseFrom(
        java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage.parseWithIOException(
          PARSER, input, extensionRegistry);
    }

    public static com.google.api.MethodSettings.LongRunning parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.api.MethodSettings.LongRunning parseDelimitedFrom(
        java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
          PARSER, input, extensionRegistry);
    }

    public static com.google.api.MethodSettings.LongRunning parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
    }

    public static com.google.api.MethodSettings.LongRunning parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage.parseWithIOException(
          PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() {
      return newBuilder();
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(com.google.api.MethodSettings.LongRunning 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.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }

    /**
     *
     *
     * <pre>
     * Describes settings to use when generating API methods that use the
     * long-running operation pattern.
     * All default values below are from those used in the client library
     * generators (e.g.
     * [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
     * </pre>
     *
     * Protobuf type {@code google.api.MethodSettings.LongRunning}
     */
    public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.api.MethodSettings.LongRunning)
        com.google.api.MethodSettings.LongRunningOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.api.ClientProto
            .internal_static_google_api_MethodSettings_LongRunning_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.api.ClientProto
            .internal_static_google_api_MethodSettings_LongRunning_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.api.MethodSettings.LongRunning.class,
                com.google.api.MethodSettings.LongRunning.Builder.class);
      }

      // Construct using com.google.api.MethodSettings.LongRunning.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }

      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          internalGetInitialPollDelayFieldBuilder();
          internalGetMaxPollDelayFieldBuilder();
          internalGetTotalPollTimeoutFieldBuilder();
        }
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        initialPollDelay_ = null;
        if (initialPollDelayBuilder_ != null) {
          initialPollDelayBuilder_.dispose();
          initialPollDelayBuilder_ = null;
        }
        pollDelayMultiplier_ = 0F;
        maxPollDelay_ = null;
        if (maxPollDelayBuilder_ != null) {
          maxPollDelayBuilder_.dispose();
          maxPollDelayBuilder_ = null;
        }
        totalPollTimeout_ = null;
        if (totalPollTimeoutBuilder_ != null) {
          totalPollTimeoutBuilder_.dispose();
          totalPollTimeoutBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.api.ClientProto
            .internal_static_google_api_MethodSettings_LongRunning_descriptor;
      }

      @java.lang.Override
      public com.google.api.MethodSettings.LongRunning getDefaultInstanceForType() {
        return com.google.api.MethodSettings.LongRunning.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.api.MethodSettings.LongRunning build() {
        com.google.api.MethodSettings.LongRunning result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.api.MethodSettings.LongRunning buildPartial() {
        com.google.api.MethodSettings.LongRunning result =
            new com.google.api.MethodSettings.LongRunning(this);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartial0(com.google.api.MethodSettings.LongRunning result) {
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.initialPollDelay_ =
              initialPollDelayBuilder_ == null
                  ? initialPollDelay_
                  : initialPollDelayBuilder_.build();
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.pollDelayMultiplier_ = pollDelayMultiplier_;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.maxPollDelay_ =
              maxPollDelayBuilder_ == null ? maxPollDelay_ : maxPollDelayBuilder_.build();
          to_bitField0_ |= 0x00000002;
        }
        if (((from_bitField0_ & 0x00000008) != 0)) {
          result.totalPollTimeout_ =
              totalPollTimeoutBuilder_ == null
                  ? totalPollTimeout_
                  : totalPollTimeoutBuilder_.build();
          to_bitField0_ |= 0x00000004;
        }
        result.bitField0_ |= to_bitField0_;
      }

      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.api.MethodSettings.LongRunning) {
          return mergeFrom((com.google.api.MethodSettings.LongRunning) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.api.MethodSettings.LongRunning other) {
        if (other == com.google.api.MethodSettings.LongRunning.getDefaultInstance()) return this;
        if (other.hasInitialPollDelay()) {
          mergeInitialPollDelay(other.getInitialPollDelay());
        }
        if (java.lang.Float.floatToRawIntBits(other.getPollDelayMultiplier()) != 0) {
          setPollDelayMultiplier(other.getPollDelayMultiplier());
        }
        if (other.hasMaxPollDelay()) {
          mergeMaxPollDelay(other.getMaxPollDelay());
        }
        if (other.hasTotalPollTimeout()) {
          mergeTotalPollTimeout(other.getTotalPollTimeout());
        }
        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:
                {
                  input.readMessage(
                      internalGetInitialPollDelayFieldBuilder().getBuilder(), extensionRegistry);
                  bitField0_ |= 0x00000001;
                  break;
                } // case 10
              case 21:
                {
                  pollDelayMultiplier_ = input.readFloat();
                  bitField0_ |= 0x00000002;
                  break;
                } // case 21
              case 26:
                {
                  input.readMessage(
                      internalGetMaxPollDelayFieldBuilder().getBuilder(), extensionRegistry);
                  bitField0_ |= 0x00000004;
                  break;
                } // case 26
              case 34:
                {
                  input.readMessage(
                      internalGetTotalPollTimeoutFieldBuilder().getBuilder(), extensionRegistry);
                  bitField0_ |= 0x00000008;
                  break;
                } // case 34
              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 bitField0_;

      private com.google.protobuf.Duration initialPollDelay_;
      private com.google.protobuf.SingleFieldBuilder<
              com.google.protobuf.Duration,
              com.google.protobuf.Duration.Builder,
              com.google.protobuf.DurationOrBuilder>
          initialPollDelayBuilder_;

      /**
       *
       *
       * <pre>
       * Initial delay after which the first poll request will be made.
       * Default value: 5 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
       *
       * @return Whether the initialPollDelay field is set.
       */
      public boolean hasInitialPollDelay() {
        return ((bitField0_ & 0x00000001) != 0);
      }

      /**
       *
       *
       * <pre>
       * Initial delay after which the first poll request will be made.
       * Default value: 5 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
       *
       * @return The initialPollDelay.
       */
      public com.google.protobuf.Duration getInitialPollDelay() {
        if (initialPollDelayBuilder_ == null) {
          return initialPollDelay_ == null
              ? com.google.protobuf.Duration.getDefaultInstance()
              : initialPollDelay_;
        } else {
          return initialPollDelayBuilder_.getMessage();
        }
      }

      /**
       *
       *
       * <pre>
       * Initial delay after which the first poll request will be made.
       * Default value: 5 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
       */
      public Builder setInitialPollDelay(com.google.protobuf.Duration value) {
        if (initialPollDelayBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          initialPollDelay_ = value;
        } else {
          initialPollDelayBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * Initial delay after which the first poll request will be made.
       * Default value: 5 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
       */
      public Builder setInitialPollDelay(com.google.protobuf.Duration.Builder builderForValue) {
        if (initialPollDelayBuilder_ == null) {
          initialPollDelay_ = builderForValue.build();
        } else {
          initialPollDelayBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * Initial delay after which the first poll request will be made.
       * Default value: 5 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
       */
      public Builder mergeInitialPollDelay(com.google.protobuf.Duration value) {
        if (initialPollDelayBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)
              && initialPollDelay_ != null
              && initialPollDelay_ != com.google.protobuf.Duration.getDefaultInstance()) {
            getInitialPollDelayBuilder().mergeFrom(value);
          } else {
            initialPollDelay_ = value;
          }
        } else {
          initialPollDelayBuilder_.mergeFrom(value);
        }
        if (initialPollDelay_ != null) {
          bitField0_ |= 0x00000001;
          onChanged();
        }
        return this;
      }

      /**
       *
       *
       * <pre>
       * Initial delay after which the first poll request will be made.
       * Default value: 5 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
       */
      public Builder clearInitialPollDelay() {
        bitField0_ = (bitField0_ & ~0x00000001);
        initialPollDelay_ = null;
        if (initialPollDelayBuilder_ != null) {
          initialPollDelayBuilder_.dispose();
          initialPollDelayBuilder_ = null;
        }
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * Initial delay after which the first poll request will be made.
       * Default value: 5 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
       */
      public com.google.protobuf.Duration.Builder getInitialPollDelayBuilder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return internalGetInitialPollDelayFieldBuilder().getBuilder();
      }

      /**
       *
       *
       * <pre>
       * Initial delay after which the first poll request will be made.
       * Default value: 5 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
       */
      public com.google.protobuf.DurationOrBuilder getInitialPollDelayOrBuilder() {
        if (initialPollDelayBuilder_ != null) {
          return initialPollDelayBuilder_.getMessageOrBuilder();
        } else {
          return initialPollDelay_ == null
              ? com.google.protobuf.Duration.getDefaultInstance()
              : initialPollDelay_;
        }
      }

      /**
       *
       *
       * <pre>
       * Initial delay after which the first poll request will be made.
       * Default value: 5 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration initial_poll_delay = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilder<
              com.google.protobuf.Duration,
              com.google.protobuf.Duration.Builder,
              com.google.protobuf.DurationOrBuilder>
          internalGetInitialPollDelayFieldBuilder() {
        if (initialPollDelayBuilder_ == null) {
          initialPollDelayBuilder_ =
              new com.google.protobuf.SingleFieldBuilder<
                  com.google.protobuf.Duration,
                  com.google.protobuf.Duration.Builder,
                  com.google.protobuf.DurationOrBuilder>(
                  getInitialPollDelay(), getParentForChildren(), isClean());
          initialPollDelay_ = null;
        }
        return initialPollDelayBuilder_;
      }

      private float pollDelayMultiplier_;

      /**
       *
       *
       * <pre>
       * Multiplier to gradually increase delay between subsequent polls until it
       * reaches max_poll_delay.
       * Default value: 1.5.
       * </pre>
       *
       * <code>float poll_delay_multiplier = 2;</code>
       *
       * @return The pollDelayMultiplier.
       */
      @java.lang.Override
      public float getPollDelayMultiplier() {
        return pollDelayMultiplier_;
      }

      /**
       *
       *
       * <pre>
       * Multiplier to gradually increase delay between subsequent polls until it
       * reaches max_poll_delay.
       * Default value: 1.5.
       * </pre>
       *
       * <code>float poll_delay_multiplier = 2;</code>
       *
       * @param value The pollDelayMultiplier to set.
       * @return This builder for chaining.
       */
      public Builder setPollDelayMultiplier(float value) {

        pollDelayMultiplier_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * Multiplier to gradually increase delay between subsequent polls until it
       * reaches max_poll_delay.
       * Default value: 1.5.
       * </pre>
       *
       * <code>float poll_delay_multiplier = 2;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearPollDelayMultiplier() {
        bitField0_ = (bitField0_ & ~0x00000002);
        pollDelayMultiplier_ = 0F;
        onChanged();
        return this;
      }

      private com.google.protobuf.Duration maxPollDelay_;
      private com.google.protobuf.SingleFieldBuilder<
              com.google.protobuf.Duration,
              com.google.protobuf.Duration.Builder,
              com.google.protobuf.DurationOrBuilder>
          maxPollDelayBuilder_;

      /**
       *
       *
       * <pre>
       * Maximum time between two subsequent poll requests.
       * Default value: 45 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
       *
       * @return Whether the maxPollDelay field is set.
       */
      public boolean hasMaxPollDelay() {
        return ((bitField0_ & 0x00000004) != 0);
      }

      /**
       *
       *
       * <pre>
       * Maximum time between two subsequent poll requests.
       * Default value: 45 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
       *
       * @return The maxPollDelay.
       */
      public com.google.protobuf.Duration getMaxPollDelay() {
        if (maxPollDelayBuilder_ == null) {
          return maxPollDelay_ == null
              ? com.google.protobuf.Duration.getDefaultInstance()
              : maxPollDelay_;
        } else {
          return maxPollDelayBuilder_.getMessage();
        }
      }

      /**
       *
       *
       * <pre>
       * Maximum time between two subsequent poll requests.
       * Default value: 45 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
       */
      public Builder setMaxPollDelay(com.google.protobuf.Duration value) {
        if (maxPollDelayBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          maxPollDelay_ = value;
        } else {
          maxPollDelayBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * Maximum time between two subsequent poll requests.
       * Default value: 45 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
       */
      public Builder setMaxPollDelay(com.google.protobuf.Duration.Builder builderForValue) {
        if (maxPollDelayBuilder_ == null) {
          maxPollDelay_ = builderForValue.build();
        } else {
          maxPollDelayBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * Maximum time between two subsequent poll requests.
       * Default value: 45 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
       */
      public Builder mergeMaxPollDelay(com.google.protobuf.Duration value) {
        if (maxPollDelayBuilder_ == null) {
          if (((bitField0_ & 0x00000004) != 0)
              && maxPollDelay_ != null
              && maxPollDelay_ != com.google.protobuf.Duration.getDefaultInstance()) {
            getMaxPollDelayBuilder().mergeFrom(value);
          } else {
            maxPollDelay_ = value;
          }
        } else {
          maxPollDelayBuilder_.mergeFrom(value);
        }
        if (maxPollDelay_ != null) {
          bitField0_ |= 0x00000004;
          onChanged();
        }
        return this;
      }

      /**
       *
       *
       * <pre>
       * Maximum time between two subsequent poll requests.
       * Default value: 45 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
       */
      public Builder clearMaxPollDelay() {
        bitField0_ = (bitField0_ & ~0x00000004);
        maxPollDelay_ = null;
        if (maxPollDelayBuilder_ != null) {
          maxPollDelayBuilder_.dispose();
          maxPollDelayBuilder_ = null;
        }
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * Maximum time between two subsequent poll requests.
       * Default value: 45 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
       */
      public com.google.protobuf.Duration.Builder getMaxPollDelayBuilder() {
        bitField0_ |= 0x00000004;
        onChanged();
        return internalGetMaxPollDelayFieldBuilder().getBuilder();
      }

      /**
       *
       *
       * <pre>
       * Maximum time between two subsequent poll requests.
       * Default value: 45 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
       */
      public com.google.protobuf.DurationOrBuilder getMaxPollDelayOrBuilder() {
        if (maxPollDelayBuilder_ != null) {
          return maxPollDelayBuilder_.getMessageOrBuilder();
        } else {
          return maxPollDelay_ == null
              ? com.google.protobuf.Duration.getDefaultInstance()
              : maxPollDelay_;
        }
      }

      /**
       *
       *
       * <pre>
       * Maximum time between two subsequent poll requests.
       * Default value: 45 seconds.
       * </pre>
       *
       * <code>.google.protobuf.Duration max_poll_delay = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilder<
              com.google.protobuf.Duration,
              com.google.protobuf.Duration.Builder,
              com.google.protobuf.DurationOrBuilder>
          internalGetMaxPollDelayFieldBuilder() {
        if (maxPollDelayBuilder_ == null) {
          maxPollDelayBuilder_ =
              new com.google.protobuf.SingleFieldBuilder<
                  com.google.protobuf.Duration,
                  com.google.protobuf.Duration.Builder,
                  com.google.protobuf.DurationOrBuilder>(
                  getMaxPollDelay(), getParentForChildren(), isClean());
          maxPollDelay_ = null;
        }
        return maxPollDelayBuilder_;
      }

      private com.google.protobuf.Duration totalPollTimeout_;
      private com.google.protobuf.SingleFieldBuilder<
              com.google.protobuf.Duration,
              com.google.protobuf.Duration.Builder,
              com.google.protobuf.DurationOrBuilder>
          totalPollTimeoutBuilder_;

      /**
       *
       *
       * <pre>
       * Total polling timeout.
       * Default value: 5 minutes.
       * </pre>
       *
       * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
       *
       * @return Whether the totalPollTimeout field is set.
       */
      public boolean hasTotalPollTimeout() {
        return ((bitField0_ & 0x00000008) != 0);
      }

      /**
       *
       *
       * <pre>
       * Total polling timeout.
       * Default value: 5 minutes.
       * </pre>
       *
       * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
       *
       * @return The totalPollTimeout.
       */
      public com.google.protobuf.Duration getTotalPollTimeout() {
        if (totalPollTimeoutBuilder_ == null) {
          return totalPollTimeout_ == null
              ? com.google.protobuf.Duration.getDefaultInstance()
              : totalPollTimeout_;
        } else {
          return totalPollTimeoutBuilder_.getMessage();
        }
      }

      /**
       *
       *
       * <pre>
       * Total polling timeout.
       * Default value: 5 minutes.
       * </pre>
       *
       * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
       */
      public Builder setTotalPollTimeout(com.google.protobuf.Duration value) {
        if (totalPollTimeoutBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          totalPollTimeout_ = value;
        } else {
          totalPollTimeoutBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * Total polling timeout.
       * Default value: 5 minutes.
       * </pre>
       *
       * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
       */
      public Builder setTotalPollTimeout(com.google.protobuf.Duration.Builder builderForValue) {
        if (totalPollTimeoutBuilder_ == null) {
          totalPollTimeout_ = builderForValue.build();
        } else {
          totalPollTimeoutBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * Total polling timeout.
       * Default value: 5 minutes.
       * </pre>
       *
       * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
       */
      public Builder mergeTotalPollTimeout(com.google.protobuf.Duration value) {
        if (totalPollTimeoutBuilder_ == null) {
          if (((bitField0_ & 0x00000008) != 0)
              && totalPollTimeout_ != null
              && totalPollTimeout_ != com.google.protobuf.Duration.getDefaultInstance()) {
            getTotalPollTimeoutBuilder().mergeFrom(value);
          } else {
            totalPollTimeout_ = value;
          }
        } else {
          totalPollTimeoutBuilder_.mergeFrom(value);
        }
        if (totalPollTimeout_ != null) {
          bitField0_ |= 0x00000008;
          onChanged();
        }
        return this;
      }

      /**
       *
       *
       * <pre>
       * Total polling timeout.
       * Default value: 5 minutes.
       * </pre>
       *
       * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
       */
      public Builder clearTotalPollTimeout() {
        bitField0_ = (bitField0_ & ~0x00000008);
        totalPollTimeout_ = null;
        if (totalPollTimeoutBuilder_ != null) {
          totalPollTimeoutBuilder_.dispose();
          totalPollTimeoutBuilder_ = null;
        }
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * Total polling timeout.
       * Default value: 5 minutes.
       * </pre>
       *
       * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
       */
      public com.google.protobuf.Duration.Builder getTotalPollTimeoutBuilder() {
        bitField0_ |= 0x00000008;
        onChanged();
        return internalGetTotalPollTimeoutFieldBuilder().getBuilder();
      }

      /**
       *
       *
       * <pre>
       * Total polling timeout.
       * Default value: 5 minutes.
       * </pre>
       *
       * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
       */
      public com.google.protobuf.DurationOrBuilder getTotalPollTimeoutOrBuilder() {
        if (totalPollTimeoutBuilder_ != null) {
          return totalPollTimeoutBuilder_.getMessageOrBuilder();
        } else {
          return totalPollTimeout_ == null
              ? com.google.protobuf.Duration.getDefaultInstance()
              : totalPollTimeout_;
        }
      }

      /**
       *
       *
       * <pre>
       * Total polling timeout.
       * Default value: 5 minutes.
       * </pre>
       *
       * <code>.google.protobuf.Duration total_poll_timeout = 4;</code>
       */
      private com.google.protobuf.SingleFieldBuilder<
              com.google.protobuf.Duration,
              com.google.protobuf.Duration.Builder,
              com.google.protobuf.DurationOrBuilder>
          internalGetTotalPollTimeoutFieldBuilder() {
        if (totalPollTimeoutBuilder_ == null) {
          totalPollTimeoutBuilder_ =
              new com.google.protobuf.SingleFieldBuilder<
                  com.google.protobuf.Duration,
                  com.google.protobuf.Duration.Builder,
                  com.google.protobuf.DurationOrBuilder>(
                  getTotalPollTimeout(), getParentForChildren(), isClean());
          totalPollTimeout_ = null;
        }
        return totalPollTimeoutBuilder_;
      }

      // @@protoc_insertion_point(builder_scope:google.api.MethodSettings.LongRunning)
    }

    // @@protoc_insertion_point(class_scope:google.api.MethodSettings.LongRunning)
    private static final com.google.api.MethodSettings.LongRunning DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.api.MethodSettings.LongRunning();
    }

    public static com.google.api.MethodSettings.LongRunning getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<LongRunning> PARSER =
        new com.google.protobuf.AbstractParser<LongRunning>() {
          @java.lang.Override
          public LongRunning 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<LongRunning> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<LongRunning> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.api.MethodSettings.LongRunning getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  private int bitField0_;
  public static final int SELECTOR_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object selector_ = "";

  /**
   *
   *
   * <pre>
   * The fully qualified name of the method, for which the options below apply.
   * This is used to find the method to apply the options.
   *
   * Example:
   *
   * publishing:
   * method_settings:
   * - selector: google.storage.control.v2.StorageControl.CreateFolder
   * # method settings for CreateFolder...
   * </pre>
   *
   * <code>string selector = 1;</code>
   *
   * @return The selector.
   */
  @java.lang.Override
  public java.lang.String getSelector() {
    java.lang.Object ref = selector_;
    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();
      selector_ = s;
      return s;
    }
  }

  /**
   *
   *
   * <pre>
   * The fully qualified name of the method, for which the options below apply.
   * This is used to find the method to apply the options.
   *
   * Example:
   *
   * publishing:
   * method_settings:
   * - selector: google.storage.control.v2.StorageControl.CreateFolder
   * # method settings for CreateFolder...
   * </pre>
   *
   * <code>string selector = 1;</code>
   *
   * @return The bytes for selector.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getSelectorBytes() {
    java.lang.Object ref = selector_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      selector_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int LONG_RUNNING_FIELD_NUMBER = 2;
  private com.google.api.MethodSettings.LongRunning longRunning_;

  /**
   *
   *
   * <pre>
   * Describes settings to use for long-running operations when generating
   * API methods for RPCs. Complements RPCs that use the annotations in
   * google/longrunning/operations.proto.
   *
   * Example of a YAML configuration::
   *
   * publishing:
   * method_settings:
   * - selector: google.cloud.speech.v2.Speech.BatchRecognize
   * long_running:
   * initial_poll_delay: 60s # 1 minute
   * poll_delay_multiplier: 1.5
   * max_poll_delay: 360s # 6 minutes
   * total_poll_timeout: 54000s # 90 minutes
   * </pre>
   *
   * <code>.google.api.MethodSettings.LongRunning long_running = 2;</code>
   *
   * @return Whether the longRunning field is set.
   */
  @java.lang.Override
  public boolean hasLongRunning() {
    return ((bitField0_ & 0x00000001) != 0);
  }

  /**
   *
   *
   * <pre>
   * Describes settings to use for long-running operations when generating
   * API methods for RPCs. Complements RPCs that use the annotations in
   * google/longrunning/operations.proto.
   *
   * Example of a YAML configuration::
   *
   * publishing:
   * method_settings:
   * - selector: google.cloud.speech.v2.Speech.BatchRecognize
   * long_running:
   * initial_poll_delay: 60s # 1 minute
   * poll_delay_multiplier: 1.5
   * max_poll_delay: 360s # 6 minutes
   * total_poll_timeout: 54000s # 90 minutes
   * </pre>
   *
   * <code>.google.api.MethodSettings.LongRunning long_running = 2;</code>
   *
   * @return The longRunning.
   */
  @java.lang.Override
  public com.google.api.MethodSettings.LongRunning getLongRunning() {
    return longRunning_ == null
        ? com.google.api.MethodSettings.LongRunning.getDefaultInstance()
        : longRunning_;
  }

  /**
   *
   *
   * <pre>
   * Describes settings to use for long-running operations when generating
   * API methods for RPCs. Complements RPCs that use the annotations in
   * google/longrunning/operations.proto.
   *
   * Example of a YAML configuration::
   *
   * publishing:
   * method_settings:
   * - selector: google.cloud.speech.v2.Speech.BatchRecognize
   * long_running:
   * initial_poll_delay: 60s # 1 minute
   * poll_delay_multiplier: 1.5
   * max_poll_delay: 360s # 6 minutes
   * total_poll_timeout: 54000s # 90 minutes
   * </pre>
   *
   * <code>.google.api.MethodSettings.LongRunning long_running = 2;</code>
   */
  @java.lang.Override
  public com.google.api.MethodSettings.LongRunningOrBuilder getLongRunningOrBuilder() {
    return longRunning_ == null
        ? com.google.api.MethodSettings.LongRunning.getDefaultInstance()
        : longRunning_;
  }

  public static final int AUTO_POPULATED_FIELDS_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringArrayList autoPopulatedFields_ =
      com.google.protobuf.LazyStringArrayList.emptyList();

  /**
   *
   *
   * <pre>
   * List of top-level fields of the request message, that should be
   * automatically populated by the client libraries based on their
   * (google.api.field_info).format. Currently supported format: UUID4.
   *
   * Example of a YAML configuration:
   *
   * publishing:
   * method_settings:
   * - selector: google.example.v1.ExampleService.CreateExample
   * auto_populated_fields:
   * - request_id
   * </pre>
   *
   * <code>repeated string auto_populated_fields = 3;</code>
   *
   * @return A list containing the autoPopulatedFields.
   */
  public com.google.protobuf.ProtocolStringList getAutoPopulatedFieldsList() {
    return autoPopulatedFields_;
  }

  /**
   *
   *
   * <pre>
   * List of top-level fields of the request message, that should be
   * automatically populated by the client libraries based on their
   * (google.api.field_info).format. Currently supported format: UUID4.
   *
   * Example of a YAML configuration:
   *
   * publishing:
   * method_settings:
   * - selector: google.example.v1.ExampleService.CreateExample
   * auto_populated_fields:
   * - request_id
   * </pre>
   *
   * <code>repeated string auto_populated_fields = 3;</code>
   *
   * @return The count of autoPopulatedFields.
   */
  public int getAutoPopulatedFieldsCount() {
    return autoPopulatedFields_.size();
  }

  /**
   *
   *
   * <pre>
   * List of top-level fields of the request message, that should be
   * automatically populated by the client libraries based on their
   * (google.api.field_info).format. Currently supported format: UUID4.
   *
   * Example of a YAML configuration:
   *
   * publishing:
   * method_settings:
   * - selector: google.example.v1.ExampleService.CreateExample
   * auto_populated_fields:
   * - request_id
   * </pre>
   *
   * <code>repeated string auto_populated_fields = 3;</code>
   *
   * @param index The index of the element to return.
   * @return The autoPopulatedFields at the given index.
   */
  public java.lang.String getAutoPopulatedFields(int index) {
    return autoPopulatedFields_.get(index);
  }

  /**
   *
   *
   * <pre>
   * List of top-level fields of the request message, that should be
   * automatically populated by the client libraries based on their
   * (google.api.field_info).format. Currently supported format: UUID4.
   *
   * Example of a YAML configuration:
   *
   * publishing:
   * method_settings:
   * - selector: google.example.v1.ExampleService.CreateExample
   * auto_populated_fields:
   * - request_id
   * </pre>
   *
   * <code>repeated string auto_populated_fields = 3;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the autoPopulatedFields at the given index.
   */
  public com.google.protobuf.ByteString getAutoPopulatedFieldsBytes(int index) {
    return autoPopulatedFields_.getByteString(index);
  }

  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.GeneratedMessage.isStringEmpty(selector_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(2, getLongRunning());
    }
    for (int i = 0; i < autoPopulatedFields_.size(); i++) {
      com.google.protobuf.GeneratedMessage.writeString(output, 3, autoPopulatedFields_.getRaw(i));
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(selector_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, selector_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLongRunning());
    }
    {
      int dataSize = 0;
      for (int i = 0; i < autoPopulatedFields_.size(); i++) {
        dataSize += computeStringSizeNoTag(autoPopulatedFields_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getAutoPopulatedFieldsList().size();
    }
    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 com.google.api.MethodSettings)) {
      return super.equals(obj);
    }
    com.google.api.MethodSettings other = (com.google.api.MethodSettings) obj;

    if (!getSelector().equals(other.getSelector())) return false;
    if (hasLongRunning() != other.hasLongRunning()) return false;
    if (hasLongRunning()) {
      if (!getLongRunning().equals(other.getLongRunning())) return false;
    }
    if (!getAutoPopulatedFieldsList().equals(other.getAutoPopulatedFieldsList())) return false;
    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();
    hash = (37 * hash) + SELECTOR_FIELD_NUMBER;
    hash = (53 * hash) + getSelector().hashCode();
    if (hasLongRunning()) {
      hash = (37 * hash) + LONG_RUNNING_FIELD_NUMBER;
      hash = (53 * hash) + getLongRunning().hashCode();
    }
    if (getAutoPopulatedFieldsCount() > 0) {
      hash = (37 * hash) + AUTO_POPULATED_FIELDS_FIELD_NUMBER;
      hash = (53 * hash) + getAutoPopulatedFieldsList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.api.MethodSettings parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.api.MethodSettings parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.api.MethodSettings parseFrom(com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.api.MethodSettings parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.api.MethodSettings parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.api.MethodSettings parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.api.MethodSettings parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
  }

  public static com.google.api.MethodSettings parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.api.MethodSettings parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.api.MethodSettings parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.api.MethodSettings parseFrom(com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
  }

  public static com.google.api.MethodSettings parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.api.MethodSettings 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.GeneratedMessage.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }

  /**
   *
   *
   * <pre>
   * Describes the generator configuration for a method.
   * </pre>
   *
   * Protobuf type {@code google.api.MethodSettings}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.api.MethodSettings)
      com.google.api.MethodSettingsOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.api.ClientProto.internal_static_google_api_MethodSettings_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.api.ClientProto.internal_static_google_api_MethodSettings_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.api.MethodSettings.class, com.google.api.MethodSettings.Builder.class);
    }

    // Construct using com.google.api.MethodSettings.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        internalGetLongRunningFieldBuilder();
      }
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      selector_ = "";
      longRunning_ = null;
      if (longRunningBuilder_ != null) {
        longRunningBuilder_.dispose();
        longRunningBuilder_ = null;
      }
      autoPopulatedFields_ = com.google.protobuf.LazyStringArrayList.emptyList();
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.api.ClientProto.internal_static_google_api_MethodSettings_descriptor;
    }

    @java.lang.Override
    public com.google.api.MethodSettings getDefaultInstanceForType() {
      return com.google.api.MethodSettings.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.api.MethodSettings build() {
      com.google.api.MethodSettings result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.api.MethodSettings buildPartial() {
      com.google.api.MethodSettings result = new com.google.api.MethodSettings(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartial0(com.google.api.MethodSettings result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.selector_ = selector_;
      }
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.longRunning_ =
            longRunningBuilder_ == null ? longRunning_ : longRunningBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        autoPopulatedFields_.makeImmutable();
        result.autoPopulatedFields_ = autoPopulatedFields_;
      }
      result.bitField0_ |= to_bitField0_;
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.api.MethodSettings) {
        return mergeFrom((com.google.api.MethodSettings) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.api.MethodSettings other) {
      if (other == com.google.api.MethodSettings.getDefaultInstance()) return this;
      if (!other.getSelector().isEmpty()) {
        selector_ = other.selector_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.hasLongRunning()) {
        mergeLongRunning(other.getLongRunning());
      }
      if (!other.autoPopulatedFields_.isEmpty()) {
        if (autoPopulatedFields_.isEmpty()) {
          autoPopulatedFields_ = other.autoPopulatedFields_;
          bitField0_ |= 0x00000004;
        } else {
          ensureAutoPopulatedFieldsIsMutable();
          autoPopulatedFields_.addAll(other.autoPopulatedFields_);
        }
        onChanged();
      }
      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:
              {
                selector_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                input.readMessage(
                    internalGetLongRunningFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureAutoPopulatedFieldsIsMutable();
                autoPopulatedFields_.add(s);
                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 bitField0_;

    private java.lang.Object selector_ = "";

    /**
     *
     *
     * <pre>
     * The fully qualified name of the method, for which the options below apply.
     * This is used to find the method to apply the options.
     *
     * Example:
     *
     * publishing:
     * method_settings:
     * - selector: google.storage.control.v2.StorageControl.CreateFolder
     * # method settings for CreateFolder...
     * </pre>
     *
     * <code>string selector = 1;</code>
     *
     * @return The selector.
     */
    public java.lang.String getSelector() {
      java.lang.Object ref = selector_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        selector_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The fully qualified name of the method, for which the options below apply.
     * This is used to find the method to apply the options.
     *
     * Example:
     *
     * publishing:
     * method_settings:
     * - selector: google.storage.control.v2.StorageControl.CreateFolder
     * # method settings for CreateFolder...
     * </pre>
     *
     * <code>string selector = 1;</code>
     *
     * @return The bytes for selector.
     */
    public com.google.protobuf.ByteString getSelectorBytes() {
      java.lang.Object ref = selector_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        selector_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The fully qualified name of the method, for which the options below apply.
     * This is used to find the method to apply the options.
     *
     * Example:
     *
     * publishing:
     * method_settings:
     * - selector: google.storage.control.v2.StorageControl.CreateFolder
     * # method settings for CreateFolder...
     * </pre>
     *
     * <code>string selector = 1;</code>
     *
     * @param value The selector to set.
     * @return This builder for chaining.
     */
    public Builder setSelector(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      selector_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The fully qualified name of the method, for which the options below apply.
     * This is used to find the method to apply the options.
     *
     * Example:
     *
     * publishing:
     * method_settings:
     * - selector: google.storage.control.v2.StorageControl.CreateFolder
     * # method settings for CreateFolder...
     * </pre>
     *
     * <code>string selector = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSelector() {
      selector_ = getDefaultInstance().getSelector();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The fully qualified name of the method, for which the options below apply.
     * This is used to find the method to apply the options.
     *
     * Example:
     *
     * publishing:
     * method_settings:
     * - selector: google.storage.control.v2.StorageControl.CreateFolder
     * # method settings for CreateFolder...
     * </pre>
     *
     * <code>string selector = 1;</code>
     *
     * @param value The bytes for selector to set.
     * @return This builder for chaining.
     */
    public Builder setSelectorBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      selector_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private com.google.api.MethodSettings.LongRunning longRunning_;
    private com.google.protobuf.SingleFieldBuilder<
            com.google.api.MethodSettings.LongRunning,
            com.google.api.MethodSettings.LongRunning.Builder,
            com.google.api.MethodSettings.LongRunningOrBuilder>
        longRunningBuilder_;

    /**
     *
     *
     * <pre>
     * Describes settings to use for long-running operations when generating
     * API methods for RPCs. Complements RPCs that use the annotations in
     * google/longrunning/operations.proto.
     *
     * Example of a YAML configuration::
     *
     * publishing:
     * method_settings:
     * - selector: google.cloud.speech.v2.Speech.BatchRecognize
     * long_running:
     * initial_poll_delay: 60s # 1 minute
     * poll_delay_multiplier: 1.5
     * max_poll_delay: 360s # 6 minutes
     * total_poll_timeout: 54000s # 90 minutes
     * </pre>
     *
     * <code>.google.api.MethodSettings.LongRunning long_running = 2;</code>
     *
     * @return Whether the longRunning field is set.
     */
    public boolean hasLongRunning() {
      return ((bitField0_ & 0x00000002) != 0);
    }

    /**
     *
     *
     * <pre>
     * Describes settings to use for long-running operations when generating
     * API methods for RPCs. Complements RPCs that use the annotations in
     * google/longrunning/operations.proto.
     *
     * Example of a YAML configuration::
     *
     * publishing:
     * method_settings:
     * - selector: google.cloud.speech.v2.Speech.BatchRecognize
     * long_running:
     * initial_poll_delay: 60s # 1 minute
     * poll_delay_multiplier: 1.5
     * max_poll_delay: 360s # 6 minutes
     * total_poll_timeout: 54000s # 90 minutes
     * </pre>
     *
     * <code>.google.api.MethodSettings.LongRunning long_running = 2;</code>
     *
     * @return The longRunning.
     */
    public com.google.api.MethodSettings.LongRunning getLongRunning() {
      if (longRunningBuilder_ == null) {
        return longRunning_ == null
            ? com.google.api.MethodSettings.LongRunning.getDefaultInstance()
            : longRunning_;
      } else {
        return longRunningBuilder_.getMessage();
      }
    }

    /**
     *
     *
     * <pre>
     * Describes settings to use for long-running operations when generating
     * API methods for RPCs. Complements RPCs that use the annotations in
     * google/longrunning/operations.proto.
     *
     * Example of a YAML configuration::
     *
     * publishing:
     * method_settings:
     * - selector: google.cloud.speech.v2.Speech.BatchRecognize
     * long_running:
     * initial_poll_delay: 60s # 1 minute
     * poll_delay_multiplier: 1.5
     * max_poll_delay: 360s # 6 minutes
     * total_poll_timeout: 54000s # 90 minutes
     * </pre>
     *
     * <code>.google.api.MethodSettings.LongRunning long_running = 2;</code>
     */
    public Builder setLongRunning(com.google.api.MethodSettings.LongRunning value) {
      if (longRunningBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        longRunning_ = value;
      } else {
        longRunningBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * Describes settings to use for long-running operations when generating
     * API methods for RPCs. Complements RPCs that use the annotations in
     * google/longrunning/operations.proto.
     *
     * Example of a YAML configuration::
     *
     * publishing:
     * method_settings:
     * - selector: google.cloud.speech.v2.Speech.BatchRecognize
     * long_running:
     * initial_poll_delay: 60s # 1 minute
     * poll_delay_multiplier: 1.5
     * max_poll_delay: 360s # 6 minutes
     * total_poll_timeout: 54000s # 90 minutes
     * </pre>
     *
     * <code>.google.api.MethodSettings.LongRunning long_running = 2;</code>
     */
    public Builder setLongRunning(
        com.google.api.MethodSettings.LongRunning.Builder builderForValue) {
      if (longRunningBuilder_ == null) {
        longRunning_ = builderForValue.build();
      } else {
        longRunningBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * Describes settings to use for long-running operations when generating
     * API methods for RPCs. Complements RPCs that use the annotations in
     * google/longrunning/operations.proto.
     *
     * Example of a YAML configuration::
     *
     * publishing:
     * method_settings:
     * - selector: google.cloud.speech.v2.Speech.BatchRecognize
     * long_running:
     * initial_poll_delay: 60s # 1 minute
     * poll_delay_multiplier: 1.5
     * max_poll_delay: 360s # 6 minutes
     * total_poll_timeout: 54000s # 90 minutes
     * </pre>
     *
     * <code>.google.api.MethodSettings.LongRunning long_running = 2;</code>
     */
    public Builder mergeLongRunning(com.google.api.MethodSettings.LongRunning value) {
      if (longRunningBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)
            && longRunning_ != null
            && longRunning_ != com.google.api.MethodSettings.LongRunning.getDefaultInstance()) {
          getLongRunningBuilder().mergeFrom(value);
        } else {
          longRunning_ = value;
        }
      } else {
        longRunningBuilder_.mergeFrom(value);
      }
      if (longRunning_ != null) {
        bitField0_ |= 0x00000002;
        onChanged();
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * Describes settings to use for long-running operations when generating
     * API methods for RPCs. Complements RPCs that use the annotations in
     * google/longrunning/operations.proto.
     *
     * Example of a YAML configuration::
     *
     * publishing:
     * method_settings:
     * - selector: google.cloud.speech.v2.Speech.BatchRecognize
     * long_running:
     * initial_poll_delay: 60s # 1 minute
     * poll_delay_multiplier: 1.5
     * max_poll_delay: 360s # 6 minutes
     * total_poll_timeout: 54000s # 90 minutes
     * </pre>
     *
     * <code>.google.api.MethodSettings.LongRunning long_running = 2;</code>
     */
    public Builder clearLongRunning() {
      bitField0_ = (bitField0_ & ~0x00000002);
      longRunning_ = null;
      if (longRunningBuilder_ != null) {
        longRunningBuilder_.dispose();
        longRunningBuilder_ = null;
      }
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * Describes settings to use for long-running operations when generating
     * API methods for RPCs. Complements RPCs that use the annotations in
     * google/longrunning/operations.proto.
     *
     * Example of a YAML configuration::
     *
     * publishing:
     * method_settings:
     * - selector: google.cloud.speech.v2.Speech.BatchRecognize
     * long_running:
     * initial_poll_delay: 60s # 1 minute
     * poll_delay_multiplier: 1.5
     * max_poll_delay: 360s # 6 minutes
     * total_poll_timeout: 54000s # 90 minutes
     * </pre>
     *
     * <code>.google.api.MethodSettings.LongRunning long_running = 2;</code>
     */
    public com.google.api.MethodSettings.LongRunning.Builder getLongRunningBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return internalGetLongRunningFieldBuilder().getBuilder();
    }

    /**
     *
     *
     * <pre>
     * Describes settings to use for long-running operations when generating
     * API methods for RPCs. Complements RPCs that use the annotations in
     * google/longrunning/operations.proto.
     *
     * Example of a YAML configuration::
     *
     * publishing:
     * method_settings:
     * - selector: google.cloud.speech.v2.Speech.BatchRecognize
     * long_running:
     * initial_poll_delay: 60s # 1 minute
     * poll_delay_multiplier: 1.5
     * max_poll_delay: 360s # 6 minutes
     * total_poll_timeout: 54000s # 90 minutes
     * </pre>
     *
     * <code>.google.api.MethodSettings.LongRunning long_running = 2;</code>
     */
    public com.google.api.MethodSettings.LongRunningOrBuilder getLongRunningOrBuilder() {
      if (longRunningBuilder_ != null) {
        return longRunningBuilder_.getMessageOrBuilder();
      } else {
        return longRunning_ == null
            ? com.google.api.MethodSettings.LongRunning.getDefaultInstance()
            : longRunning_;
      }
    }

    /**
     *
     *
     * <pre>
     * Describes settings to use for long-running operations when generating
     * API methods for RPCs. Complements RPCs that use the annotations in
     * google/longrunning/operations.proto.
     *
     * Example of a YAML configuration::
     *
     * publishing:
     * method_settings:
     * - selector: google.cloud.speech.v2.Speech.BatchRecognize
     * long_running:
     * initial_poll_delay: 60s # 1 minute
     * poll_delay_multiplier: 1.5
     * max_poll_delay: 360s # 6 minutes
     * total_poll_timeout: 54000s # 90 minutes
     * </pre>
     *
     * <code>.google.api.MethodSettings.LongRunning long_running = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilder<
            com.google.api.MethodSettings.LongRunning,
            com.google.api.MethodSettings.LongRunning.Builder,
            com.google.api.MethodSettings.LongRunningOrBuilder>
        internalGetLongRunningFieldBuilder() {
      if (longRunningBuilder_ == null) {
        longRunningBuilder_ =
            new com.google.protobuf.SingleFieldBuilder<
                com.google.api.MethodSettings.LongRunning,
                com.google.api.MethodSettings.LongRunning.Builder,
                com.google.api.MethodSettings.LongRunningOrBuilder>(
                getLongRunning(), getParentForChildren(), isClean());
        longRunning_ = null;
      }
      return longRunningBuilder_;
    }

    private com.google.protobuf.LazyStringArrayList autoPopulatedFields_ =
        com.google.protobuf.LazyStringArrayList.emptyList();

    private void ensureAutoPopulatedFieldsIsMutable() {
      if (!autoPopulatedFields_.isModifiable()) {
        autoPopulatedFields_ = new com.google.protobuf.LazyStringArrayList(autoPopulatedFields_);
      }
      bitField0_ |= 0x00000004;
    }

    /**
     *
     *
     * <pre>
     * List of top-level fields of the request message, that should be
     * automatically populated by the client libraries based on their
     * (google.api.field_info).format. Currently supported format: UUID4.
     *
     * Example of a YAML configuration:
     *
     * publishing:
     * method_settings:
     * - selector: google.example.v1.ExampleService.CreateExample
     * auto_populated_fields:
     * - request_id
     * </pre>
     *
     * <code>repeated string auto_populated_fields = 3;</code>
     *
     * @return A list containing the autoPopulatedFields.
     */
    public com.google.protobuf.ProtocolStringList getAutoPopulatedFieldsList() {
      autoPopulatedFields_.makeImmutable();
      return autoPopulatedFields_;
    }

    /**
     *
     *
     * <pre>
     * List of top-level fields of the request message, that should be
     * automatically populated by the client libraries based on their
     * (google.api.field_info).format. Currently supported format: UUID4.
     *
     * Example of a YAML configuration:
     *
     * publishing:
     * method_settings:
     * - selector: google.example.v1.ExampleService.CreateExample
     * auto_populated_fields:
     * - request_id
     * </pre>
     *
     * <code>repeated string auto_populated_fields = 3;</code>
     *
     * @return The count of autoPopulatedFields.
     */
    public int getAutoPopulatedFieldsCount() {
      return autoPopulatedFields_.size();
    }

    /**
     *
     *
     * <pre>
     * List of top-level fields of the request message, that should be
     * automatically populated by the client libraries based on their
     * (google.api.field_info).format. Currently supported format: UUID4.
     *
     * Example of a YAML configuration:
     *
     * publishing:
     * method_settings:
     * - selector: google.example.v1.ExampleService.CreateExample
     * auto_populated_fields:
     * - request_id
     * </pre>
     *
     * <code>repeated string auto_populated_fields = 3;</code>
     *
     * @param index The index of the element to return.
     * @return The autoPopulatedFields at the given index.
     */
    public java.lang.String getAutoPopulatedFields(int index) {
      return autoPopulatedFields_.get(index);
    }

    /**
     *
     *
     * <pre>
     * List of top-level fields of the request message, that should be
     * automatically populated by the client libraries based on their
     * (google.api.field_info).format. Currently supported format: UUID4.
     *
     * Example of a YAML configuration:
     *
     * publishing:
     * method_settings:
     * - selector: google.example.v1.ExampleService.CreateExample
     * auto_populated_fields:
     * - request_id
     * </pre>
     *
     * <code>repeated string auto_populated_fields = 3;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the autoPopulatedFields at the given index.
     */
    public com.google.protobuf.ByteString getAutoPopulatedFieldsBytes(int index) {
      return autoPopulatedFields_.getByteString(index);
    }

    /**
     *
     *
     * <pre>
     * List of top-level fields of the request message, that should be
     * automatically populated by the client libraries based on their
     * (google.api.field_info).format. Currently supported format: UUID4.
     *
     * Example of a YAML configuration:
     *
     * publishing:
     * method_settings:
     * - selector: google.example.v1.ExampleService.CreateExample
     * auto_populated_fields:
     * - request_id
     * </pre>
     *
     * <code>repeated string auto_populated_fields = 3;</code>
     *
     * @param index The index to set the value at.
     * @param value The autoPopulatedFields to set.
     * @return This builder for chaining.
     */
    public Builder setAutoPopulatedFields(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAutoPopulatedFieldsIsMutable();
      autoPopulatedFields_.set(index, value);
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * List of top-level fields of the request message, that should be
     * automatically populated by the client libraries based on their
     * (google.api.field_info).format. Currently supported format: UUID4.
     *
     * Example of a YAML configuration:
     *
     * publishing:
     * method_settings:
     * - selector: google.example.v1.ExampleService.CreateExample
     * auto_populated_fields:
     * - request_id
     * </pre>
     *
     * <code>repeated string auto_populated_fields = 3;</code>
     *
     * @param value The autoPopulatedFields to add.
     * @return This builder for chaining.
     */
    public Builder addAutoPopulatedFields(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAutoPopulatedFieldsIsMutable();
      autoPopulatedFields_.add(value);
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * List of top-level fields of the request message, that should be
     * automatically populated by the client libraries based on their
     * (google.api.field_info).format. Currently supported format: UUID4.
     *
     * Example of a YAML configuration:
     *
     * publishing:
     * method_settings:
     * - selector: google.example.v1.ExampleService.CreateExample
     * auto_populated_fields:
     * - request_id
     * </pre>
     *
     * <code>repeated string auto_populated_fields = 3;</code>
     *
     * @param values The autoPopulatedFields to add.
     * @return This builder for chaining.
     */
    public Builder addAllAutoPopulatedFields(java.lang.Iterable<java.lang.String> values) {
      ensureAutoPopulatedFieldsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, autoPopulatedFields_);
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * List of top-level fields of the request message, that should be
     * automatically populated by the client libraries based on their
     * (google.api.field_info).format. Currently supported format: UUID4.
     *
     * Example of a YAML configuration:
     *
     * publishing:
     * method_settings:
     * - selector: google.example.v1.ExampleService.CreateExample
     * auto_populated_fields:
     * - request_id
     * </pre>
     *
     * <code>repeated string auto_populated_fields = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearAutoPopulatedFields() {
      autoPopulatedFields_ = com.google.protobuf.LazyStringArrayList.emptyList();
      bitField0_ = (bitField0_ & ~0x00000004);
      ;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * List of top-level fields of the request message, that should be
     * automatically populated by the client libraries based on their
     * (google.api.field_info).format. Currently supported format: UUID4.
     *
     * Example of a YAML configuration:
     *
     * publishing:
     * method_settings:
     * - selector: google.example.v1.ExampleService.CreateExample
     * auto_populated_fields:
     * - request_id
     * </pre>
     *
     * <code>repeated string auto_populated_fields = 3;</code>
     *
     * @param value The bytes of the autoPopulatedFields to add.
     * @return This builder for chaining.
     */
    public Builder addAutoPopulatedFieldsBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureAutoPopulatedFieldsIsMutable();
      autoPopulatedFields_.add(value);
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    // @@protoc_insertion_point(builder_scope:google.api.MethodSettings)
  }

  // @@protoc_insertion_point(class_scope:google.api.MethodSettings)
  private static final com.google.api.MethodSettings DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.api.MethodSettings();
  }

  public static com.google.api.MethodSettings getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<MethodSettings> PARSER =
      new com.google.protobuf.AbstractParser<MethodSettings>() {
        @java.lang.Override
        public MethodSettings 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<MethodSettings> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<MethodSettings> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.api.MethodSettings getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
