// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/api/logging.proto

package com.google.api;

/**
 * <pre>
 * Logging configuration of the service.
 * The following example shows how to configure logs to be sent to the
 * producer and consumer projects. In the example, the `activity_history`
 * log is sent to both the producer and consumer projects, whereas the
 * `purchase_history` log is only sent to the producer project.
 *     monitored_resources:
 *     - type: library.googleapis.com/branch
 *       labels:
 *       - key: /city
 *         description: The city where the library branch is located in.
 *       - key: /name
 *         description: The name of the branch.
 *     logs:
 *     - name: activity_history
 *       labels:
 *       - key: /customer_id
 *     - name: purchase_history
 *     logging:
 *       producer_destinations:
 *       - monitored_resource: library.googleapis.com/branch
 *         logs:
 *         - activity_history
 *         - purchase_history
 *       consumer_destinations:
 *       - monitored_resource: library.googleapis.com/branch
 *         logs:
 *         - activity_history
 * </pre>
 *
 * Protobuf type {@code google.api.Logging}
 */
public  final class Logging extends
    com.google.protobuf.GeneratedMessageLite<
        Logging, Logging.Builder> implements
    // @@protoc_insertion_point(message_implements:google.api.Logging)
    LoggingOrBuilder {
  private Logging() {
    producerDestinations_ = emptyProtobufList();
    consumerDestinations_ = emptyProtobufList();
  }
  public interface LoggingDestinationOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.api.Logging.LoggingDestination)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <pre>
     * The monitored resource type. The type must be defined in the
     * [Service.monitored_resources][google.api.Service.monitored_resources] section.
     * </pre>
     *
     * <code>string monitored_resource = 3;</code>
     * @return The monitoredResource.
     */
    java.lang.String getMonitoredResource();
    /**
     * <pre>
     * The monitored resource type. The type must be defined in the
     * [Service.monitored_resources][google.api.Service.monitored_resources] section.
     * </pre>
     *
     * <code>string monitored_resource = 3;</code>
     * @return The bytes for monitoredResource.
     */
    com.google.protobuf.ByteString
        getMonitoredResourceBytes();

    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     * @return A list containing the logs.
     */
    java.util.List<java.lang.String>
        getLogsList();
    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     * @return The count of logs.
     */
    int getLogsCount();
    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     * @param index The index of the element to return.
     * @return The logs at the given index.
     */
    java.lang.String getLogs(int index);
    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     * @param index The index of the element to return.
     * @return The logs at the given index.
     */
    com.google.protobuf.ByteString
        getLogsBytes(int index);
  }
  /**
   * <pre>
   * Configuration of a specific logging destination (the producer project
   * or the consumer project).
   * </pre>
   *
   * Protobuf type {@code google.api.Logging.LoggingDestination}
   */
  public  static final class LoggingDestination extends
      com.google.protobuf.GeneratedMessageLite<
          LoggingDestination, LoggingDestination.Builder> implements
      // @@protoc_insertion_point(message_implements:google.api.Logging.LoggingDestination)
      LoggingDestinationOrBuilder {
    private LoggingDestination() {
      monitoredResource_ = "";
      logs_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
    }
    public static final int MONITORED_RESOURCE_FIELD_NUMBER = 3;
    private java.lang.String monitoredResource_;
    /**
     * <pre>
     * The monitored resource type. The type must be defined in the
     * [Service.monitored_resources][google.api.Service.monitored_resources] section.
     * </pre>
     *
     * <code>string monitored_resource = 3;</code>
     * @return The monitoredResource.
     */
    @java.lang.Override
    public java.lang.String getMonitoredResource() {
      return monitoredResource_;
    }
    /**
     * <pre>
     * The monitored resource type. The type must be defined in the
     * [Service.monitored_resources][google.api.Service.monitored_resources] section.
     * </pre>
     *
     * <code>string monitored_resource = 3;</code>
     * @return The bytes for monitoredResource.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getMonitoredResourceBytes() {
      return com.google.protobuf.ByteString.copyFromUtf8(monitoredResource_);
    }
    /**
     * <pre>
     * The monitored resource type. The type must be defined in the
     * [Service.monitored_resources][google.api.Service.monitored_resources] section.
     * </pre>
     *
     * <code>string monitored_resource = 3;</code>
     * @param value The monitoredResource to set.
     */
    private void setMonitoredResource(
        java.lang.String value) {
      value.getClass();
  
      monitoredResource_ = value;
    }
    /**
     * <pre>
     * The monitored resource type. The type must be defined in the
     * [Service.monitored_resources][google.api.Service.monitored_resources] section.
     * </pre>
     *
     * <code>string monitored_resource = 3;</code>
     */
    private void clearMonitoredResource() {
      
      monitoredResource_ = getDefaultInstance().getMonitoredResource();
    }
    /**
     * <pre>
     * The monitored resource type. The type must be defined in the
     * [Service.monitored_resources][google.api.Service.monitored_resources] section.
     * </pre>
     *
     * <code>string monitored_resource = 3;</code>
     * @param value The bytes for monitoredResource to set.
     */
    private void setMonitoredResourceBytes(
        com.google.protobuf.ByteString value) {
      checkByteStringIsUtf8(value);
      monitoredResource_ = value.toStringUtf8();
      
    }

    public static final int LOGS_FIELD_NUMBER = 1;
    private com.google.protobuf.Internal.ProtobufList<java.lang.String> logs_;
    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     * @return A list containing the logs.
     */
    @java.lang.Override
    public java.util.List<java.lang.String> getLogsList() {
      return logs_;
    }
    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     * @return The count of logs.
     */
    @java.lang.Override
    public int getLogsCount() {
      return logs_.size();
    }
    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     * @param index The index of the element to return.
     * @return The logs at the given index.
     */
    @java.lang.Override
    public java.lang.String getLogs(int index) {
      return logs_.get(index);
    }
    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     * @param index The index of the value to return.
     * @return The bytes of the logs at the given index.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getLogsBytes(int index) {
      return com.google.protobuf.ByteString.copyFromUtf8(
          logs_.get(index));
    }
    private void ensureLogsIsMutable() {
      com.google.protobuf.Internal.ProtobufList<java.lang.String> tmp =
          logs_;  if (!tmp.isModifiable()) {
        logs_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
       }
    }
    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     * @param index The index to set the value at.
     * @param value The logs to set.
     */
    private void setLogs(
        int index, java.lang.String value) {
      value.getClass();
  ensureLogsIsMutable();
      logs_.set(index, value);
    }
    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     * @param value The logs to add.
     */
    private void addLogs(
        java.lang.String value) {
      value.getClass();
  ensureLogsIsMutable();
      logs_.add(value);
    }
    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     * @param values The logs to add.
     */
    private void addAllLogs(
        java.lang.Iterable<java.lang.String> values) {
      ensureLogsIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, logs_);
    }
    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     */
    private void clearLogs() {
      logs_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
    }
    /**
     * <pre>
     * Names of the logs to be sent to this destination. Each name must
     * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
     * not a domain scoped name, it will be automatically prefixed with
     * the service name followed by "/".
     * </pre>
     *
     * <code>repeated string logs = 1;</code>
     * @param value The bytes of the logs to add.
     */
    private void addLogsBytes(
        com.google.protobuf.ByteString value) {
      checkByteStringIsUtf8(value);
      ensureLogsIsMutable();
      logs_.add(value.toStringUtf8());
    }

    public static com.google.api.Logging.LoggingDestination parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.google.api.Logging.LoggingDestination parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.google.api.Logging.LoggingDestination parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.google.api.Logging.LoggingDestination parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.google.api.Logging.LoggingDestination parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.google.api.Logging.LoggingDestination parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.google.api.Logging.LoggingDestination parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static com.google.api.Logging.LoggingDestination parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static com.google.api.Logging.LoggingDestination parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static com.google.api.Logging.LoggingDestination parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static com.google.api.Logging.LoggingDestination parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static com.google.api.Logging.LoggingDestination parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return (Builder) DEFAULT_INSTANCE.createBuilder();
    }
    public static Builder newBuilder(com.google.api.Logging.LoggingDestination prototype) {
      return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
    }

    /**
     * <pre>
     * Configuration of a specific logging destination (the producer project
     * or the consumer project).
     * </pre>
     *
     * Protobuf type {@code google.api.Logging.LoggingDestination}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          com.google.api.Logging.LoggingDestination, Builder> implements
        // @@protoc_insertion_point(builder_implements:google.api.Logging.LoggingDestination)
        com.google.api.Logging.LoggingDestinationOrBuilder {
      // Construct using com.google.api.Logging.LoggingDestination.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <pre>
       * The monitored resource type. The type must be defined in the
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * </pre>
       *
       * <code>string monitored_resource = 3;</code>
       * @return The monitoredResource.
       */
      @java.lang.Override
      public java.lang.String getMonitoredResource() {
        return instance.getMonitoredResource();
      }
      /**
       * <pre>
       * The monitored resource type. The type must be defined in the
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * </pre>
       *
       * <code>string monitored_resource = 3;</code>
       * @return The bytes for monitoredResource.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString
          getMonitoredResourceBytes() {
        return instance.getMonitoredResourceBytes();
      }
      /**
       * <pre>
       * The monitored resource type. The type must be defined in the
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * </pre>
       *
       * <code>string monitored_resource = 3;</code>
       * @param value The monitoredResource to set.
       * @return This builder for chaining.
       */
      public Builder setMonitoredResource(
          java.lang.String value) {
        copyOnWrite();
        instance.setMonitoredResource(value);
        return this;
      }
      /**
       * <pre>
       * The monitored resource type. The type must be defined in the
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * </pre>
       *
       * <code>string monitored_resource = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearMonitoredResource() {
        copyOnWrite();
        instance.clearMonitoredResource();
        return this;
      }
      /**
       * <pre>
       * The monitored resource type. The type must be defined in the
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * </pre>
       *
       * <code>string monitored_resource = 3;</code>
       * @param value The bytes for monitoredResource to set.
       * @return This builder for chaining.
       */
      public Builder setMonitoredResourceBytes(
          com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setMonitoredResourceBytes(value);
        return this;
      }

      /**
       * <pre>
       * Names of the logs to be sent to this destination. Each name must
       * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
       * not a domain scoped name, it will be automatically prefixed with
       * the service name followed by "/".
       * </pre>
       *
       * <code>repeated string logs = 1;</code>
       * @return A list containing the logs.
       */
      @java.lang.Override
      public java.util.List<java.lang.String>
          getLogsList() {
        return java.util.Collections.unmodifiableList(
            instance.getLogsList());
      }
      /**
       * <pre>
       * Names of the logs to be sent to this destination. Each name must
       * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
       * not a domain scoped name, it will be automatically prefixed with
       * the service name followed by "/".
       * </pre>
       *
       * <code>repeated string logs = 1;</code>
       * @return The count of logs.
       */
      @java.lang.Override
      public int getLogsCount() {
        return instance.getLogsCount();
      }
      /**
       * <pre>
       * Names of the logs to be sent to this destination. Each name must
       * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
       * not a domain scoped name, it will be automatically prefixed with
       * the service name followed by "/".
       * </pre>
       *
       * <code>repeated string logs = 1;</code>
       * @param index The index of the element to return.
       * @return The logs at the given index.
       */
      @java.lang.Override
      public java.lang.String getLogs(int index) {
        return instance.getLogs(index);
      }
      /**
       * <pre>
       * Names of the logs to be sent to this destination. Each name must
       * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
       * not a domain scoped name, it will be automatically prefixed with
       * the service name followed by "/".
       * </pre>
       *
       * <code>repeated string logs = 1;</code>
       * @param index The index of the value to return.
       * @return The bytes of the logs at the given index.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString
          getLogsBytes(int index) {
        return instance.getLogsBytes(index);
      }
      /**
       * <pre>
       * Names of the logs to be sent to this destination. Each name must
       * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
       * not a domain scoped name, it will be automatically prefixed with
       * the service name followed by "/".
       * </pre>
       *
       * <code>repeated string logs = 1;</code>
       * @param index The index to set the value at.
       * @param value The logs to set.
       * @return This builder for chaining.
       */
      public Builder setLogs(
          int index, java.lang.String value) {
        copyOnWrite();
        instance.setLogs(index, value);
        return this;
      }
      /**
       * <pre>
       * Names of the logs to be sent to this destination. Each name must
       * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
       * not a domain scoped name, it will be automatically prefixed with
       * the service name followed by "/".
       * </pre>
       *
       * <code>repeated string logs = 1;</code>
       * @param value The logs to add.
       * @return This builder for chaining.
       */
      public Builder addLogs(
          java.lang.String value) {
        copyOnWrite();
        instance.addLogs(value);
        return this;
      }
      /**
       * <pre>
       * Names of the logs to be sent to this destination. Each name must
       * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
       * not a domain scoped name, it will be automatically prefixed with
       * the service name followed by "/".
       * </pre>
       *
       * <code>repeated string logs = 1;</code>
       * @param values The logs to add.
       * @return This builder for chaining.
       */
      public Builder addAllLogs(
          java.lang.Iterable<java.lang.String> values) {
        copyOnWrite();
        instance.addAllLogs(values);
        return this;
      }
      /**
       * <pre>
       * Names of the logs to be sent to this destination. Each name must
       * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
       * not a domain scoped name, it will be automatically prefixed with
       * the service name followed by "/".
       * </pre>
       *
       * <code>repeated string logs = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearLogs() {
        copyOnWrite();
        instance.clearLogs();
        return this;
      }
      /**
       * <pre>
       * Names of the logs to be sent to this destination. Each name must
       * be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
       * not a domain scoped name, it will be automatically prefixed with
       * the service name followed by "/".
       * </pre>
       *
       * <code>repeated string logs = 1;</code>
       * @param value The bytes of the logs to add.
       * @return This builder for chaining.
       */
      public Builder addLogsBytes(
          com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.addLogsBytes(value);
        return this;
      }

      // @@protoc_insertion_point(builder_scope:google.api.Logging.LoggingDestination)
    }
    @java.lang.Override
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new com.google.api.Logging.LoggingDestination();
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case BUILD_MESSAGE_INFO: {
            java.lang.Object[] objects = new java.lang.Object[] {
              "logs_",
              "monitoredResource_",
            };
            java.lang.String info =
                "\u0000\u0002\u0000\u0000\u0001\u0003\u0002\u0000\u0001\u0000\u0001\u021a\u0003\u0208" +
                "";
            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          com.google.protobuf.Parser<com.google.api.Logging.LoggingDestination> parser = PARSER;
          if (parser == null) {
            synchronized (com.google.api.Logging.LoggingDestination.class) {
              parser = PARSER;
              if (parser == null) {
                parser =
                    new DefaultInstanceBasedParser<com.google.api.Logging.LoggingDestination>(
                        DEFAULT_INSTANCE);
                PARSER = parser;
              }
            }
          }
          return parser;
      }
      case GET_MEMOIZED_IS_INITIALIZED: {
        return (byte) 1;
      }
      case SET_MEMOIZED_IS_INITIALIZED: {
        return null;
      }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:google.api.Logging.LoggingDestination)
    private static final com.google.api.Logging.LoggingDestination DEFAULT_INSTANCE;
    static {
      LoggingDestination defaultInstance = new LoggingDestination();
      // New instances are implicitly immutable so no need to make
      // immutable.
      DEFAULT_INSTANCE = defaultInstance;
      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
        LoggingDestination.class, defaultInstance);
    }

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

    private static volatile com.google.protobuf.Parser<LoggingDestination> PARSER;

    public static com.google.protobuf.Parser<LoggingDestination> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  public static final int PRODUCER_DESTINATIONS_FIELD_NUMBER = 1;
  private com.google.protobuf.Internal.ProtobufList<com.google.api.Logging.LoggingDestination> producerDestinations_;
  /**
   * <pre>
   * Logging configurations for sending logs to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one producer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.api.Logging.LoggingDestination> getProducerDestinationsList() {
    return producerDestinations_;
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one producer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
   */
  public java.util.List<? extends com.google.api.Logging.LoggingDestinationOrBuilder> 
      getProducerDestinationsOrBuilderList() {
    return producerDestinations_;
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one producer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
   */
  @java.lang.Override
  public int getProducerDestinationsCount() {
    return producerDestinations_.size();
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one producer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
   */
  @java.lang.Override
  public com.google.api.Logging.LoggingDestination getProducerDestinations(int index) {
    return producerDestinations_.get(index);
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one producer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
   */
  public com.google.api.Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder(
      int index) {
    return producerDestinations_.get(index);
  }
  private void ensureProducerDestinationsIsMutable() {
    com.google.protobuf.Internal.ProtobufList<com.google.api.Logging.LoggingDestination> tmp = producerDestinations_;
    if (!tmp.isModifiable()) {
      producerDestinations_ =
          com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
     }
  }

  /**
   * <pre>
   * Logging configurations for sending logs to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one producer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
   */
  private void setProducerDestinations(
      int index, com.google.api.Logging.LoggingDestination value) {
    value.getClass();
  ensureProducerDestinationsIsMutable();
    producerDestinations_.set(index, value);
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one producer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
   */
  private void addProducerDestinations(com.google.api.Logging.LoggingDestination value) {
    value.getClass();
  ensureProducerDestinationsIsMutable();
    producerDestinations_.add(value);
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one producer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
   */
  private void addProducerDestinations(
      int index, com.google.api.Logging.LoggingDestination value) {
    value.getClass();
  ensureProducerDestinationsIsMutable();
    producerDestinations_.add(index, value);
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one producer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
   */
  private void addAllProducerDestinations(
      java.lang.Iterable<? extends com.google.api.Logging.LoggingDestination> values) {
    ensureProducerDestinationsIsMutable();
    com.google.protobuf.AbstractMessageLite.addAll(
        values, producerDestinations_);
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one producer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
   */
  private void clearProducerDestinations() {
    producerDestinations_ = emptyProtobufList();
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the producer project.
   * There can be multiple producer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one producer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
   */
  private void removeProducerDestinations(int index) {
    ensureProducerDestinationsIsMutable();
    producerDestinations_.remove(index);
  }

  public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER = 2;
  private com.google.protobuf.Internal.ProtobufList<com.google.api.Logging.LoggingDestination> consumerDestinations_;
  /**
   * <pre>
   * Logging configurations for sending logs to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one consumer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.api.Logging.LoggingDestination> getConsumerDestinationsList() {
    return consumerDestinations_;
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one consumer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
   */
  public java.util.List<? extends com.google.api.Logging.LoggingDestinationOrBuilder> 
      getConsumerDestinationsOrBuilderList() {
    return consumerDestinations_;
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one consumer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
   */
  @java.lang.Override
  public int getConsumerDestinationsCount() {
    return consumerDestinations_.size();
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one consumer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
   */
  @java.lang.Override
  public com.google.api.Logging.LoggingDestination getConsumerDestinations(int index) {
    return consumerDestinations_.get(index);
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one consumer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
   */
  public com.google.api.Logging.LoggingDestinationOrBuilder getConsumerDestinationsOrBuilder(
      int index) {
    return consumerDestinations_.get(index);
  }
  private void ensureConsumerDestinationsIsMutable() {
    com.google.protobuf.Internal.ProtobufList<com.google.api.Logging.LoggingDestination> tmp = consumerDestinations_;
    if (!tmp.isModifiable()) {
      consumerDestinations_ =
          com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
     }
  }

  /**
   * <pre>
   * Logging configurations for sending logs to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one consumer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
   */
  private void setConsumerDestinations(
      int index, com.google.api.Logging.LoggingDestination value) {
    value.getClass();
  ensureConsumerDestinationsIsMutable();
    consumerDestinations_.set(index, value);
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one consumer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
   */
  private void addConsumerDestinations(com.google.api.Logging.LoggingDestination value) {
    value.getClass();
  ensureConsumerDestinationsIsMutable();
    consumerDestinations_.add(value);
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one consumer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
   */
  private void addConsumerDestinations(
      int index, com.google.api.Logging.LoggingDestination value) {
    value.getClass();
  ensureConsumerDestinationsIsMutable();
    consumerDestinations_.add(index, value);
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one consumer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
   */
  private void addAllConsumerDestinations(
      java.lang.Iterable<? extends com.google.api.Logging.LoggingDestination> values) {
    ensureConsumerDestinationsIsMutable();
    com.google.protobuf.AbstractMessageLite.addAll(
        values, consumerDestinations_);
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one consumer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
   */
  private void clearConsumerDestinations() {
    consumerDestinations_ = emptyProtobufList();
  }
  /**
   * <pre>
   * Logging configurations for sending logs to the consumer project.
   * There can be multiple consumer destinations, each one must have a
   * different monitored resource type. A log can be used in at most
   * one consumer destination.
   * </pre>
   *
   * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
   */
  private void removeConsumerDestinations(int index) {
    ensureConsumerDestinationsIsMutable();
    consumerDestinations_.remove(index);
  }

  public static com.google.api.Logging parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.api.Logging parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.google.api.Logging parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.api.Logging parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.google.api.Logging parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.api.Logging parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.google.api.Logging parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static com.google.api.Logging parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static com.google.api.Logging parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input);
  }
  public static com.google.api.Logging parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static com.google.api.Logging parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static com.google.api.Logging parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }

  public static Builder newBuilder() {
    return (Builder) DEFAULT_INSTANCE.createBuilder();
  }
  public static Builder newBuilder(com.google.api.Logging prototype) {
    return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
  }

  /**
   * <pre>
   * Logging configuration of the service.
   * The following example shows how to configure logs to be sent to the
   * producer and consumer projects. In the example, the `activity_history`
   * log is sent to both the producer and consumer projects, whereas the
   * `purchase_history` log is only sent to the producer project.
   *     monitored_resources:
   *     - type: library.googleapis.com/branch
   *       labels:
   *       - key: /city
   *         description: The city where the library branch is located in.
   *       - key: /name
   *         description: The name of the branch.
   *     logs:
   *     - name: activity_history
   *       labels:
   *       - key: /customer_id
   *     - name: purchase_history
   *     logging:
   *       producer_destinations:
   *       - monitored_resource: library.googleapis.com/branch
   *         logs:
   *         - activity_history
   *         - purchase_history
   *       consumer_destinations:
   *       - monitored_resource: library.googleapis.com/branch
   *         logs:
   *         - activity_history
   * </pre>
   *
   * Protobuf type {@code google.api.Logging}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageLite.Builder<
        com.google.api.Logging, Builder> implements
      // @@protoc_insertion_point(builder_implements:google.api.Logging)
      com.google.api.LoggingOrBuilder {
    // Construct using com.google.api.Logging.newBuilder()
    private Builder() {
      super(DEFAULT_INSTANCE);
    }


    /**
     * <pre>
     * Logging configurations for sending logs to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one producer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
     */
    @java.lang.Override
    public java.util.List<com.google.api.Logging.LoggingDestination> getProducerDestinationsList() {
      return java.util.Collections.unmodifiableList(
          instance.getProducerDestinationsList());
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one producer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
     */
    @java.lang.Override
    public int getProducerDestinationsCount() {
      return instance.getProducerDestinationsCount();
    }/**
     * <pre>
     * Logging configurations for sending logs to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one producer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
     */
    @java.lang.Override
    public com.google.api.Logging.LoggingDestination getProducerDestinations(int index) {
      return instance.getProducerDestinations(index);
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one producer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
     */
    public Builder setProducerDestinations(
        int index, com.google.api.Logging.LoggingDestination value) {
      copyOnWrite();
      instance.setProducerDestinations(index, value);
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one producer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
     */
    public Builder setProducerDestinations(
        int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) {
      copyOnWrite();
      instance.setProducerDestinations(index,
          builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one producer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
     */
    public Builder addProducerDestinations(com.google.api.Logging.LoggingDestination value) {
      copyOnWrite();
      instance.addProducerDestinations(value);
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one producer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
     */
    public Builder addProducerDestinations(
        int index, com.google.api.Logging.LoggingDestination value) {
      copyOnWrite();
      instance.addProducerDestinations(index, value);
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one producer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
     */
    public Builder addProducerDestinations(
        com.google.api.Logging.LoggingDestination.Builder builderForValue) {
      copyOnWrite();
      instance.addProducerDestinations(builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one producer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
     */
    public Builder addProducerDestinations(
        int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) {
      copyOnWrite();
      instance.addProducerDestinations(index,
          builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one producer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
     */
    public Builder addAllProducerDestinations(
        java.lang.Iterable<? extends com.google.api.Logging.LoggingDestination> values) {
      copyOnWrite();
      instance.addAllProducerDestinations(values);
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one producer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
     */
    public Builder clearProducerDestinations() {
      copyOnWrite();
      instance.clearProducerDestinations();
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the producer project.
     * There can be multiple producer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one producer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code>
     */
    public Builder removeProducerDestinations(int index) {
      copyOnWrite();
      instance.removeProducerDestinations(index);
      return this;
    }

    /**
     * <pre>
     * Logging configurations for sending logs to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one consumer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
     */
    @java.lang.Override
    public java.util.List<com.google.api.Logging.LoggingDestination> getConsumerDestinationsList() {
      return java.util.Collections.unmodifiableList(
          instance.getConsumerDestinationsList());
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one consumer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
     */
    @java.lang.Override
    public int getConsumerDestinationsCount() {
      return instance.getConsumerDestinationsCount();
    }/**
     * <pre>
     * Logging configurations for sending logs to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one consumer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
     */
    @java.lang.Override
    public com.google.api.Logging.LoggingDestination getConsumerDestinations(int index) {
      return instance.getConsumerDestinations(index);
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one consumer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
     */
    public Builder setConsumerDestinations(
        int index, com.google.api.Logging.LoggingDestination value) {
      copyOnWrite();
      instance.setConsumerDestinations(index, value);
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one consumer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
     */
    public Builder setConsumerDestinations(
        int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) {
      copyOnWrite();
      instance.setConsumerDestinations(index,
          builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one consumer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
     */
    public Builder addConsumerDestinations(com.google.api.Logging.LoggingDestination value) {
      copyOnWrite();
      instance.addConsumerDestinations(value);
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one consumer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
     */
    public Builder addConsumerDestinations(
        int index, com.google.api.Logging.LoggingDestination value) {
      copyOnWrite();
      instance.addConsumerDestinations(index, value);
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one consumer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
     */
    public Builder addConsumerDestinations(
        com.google.api.Logging.LoggingDestination.Builder builderForValue) {
      copyOnWrite();
      instance.addConsumerDestinations(builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one consumer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
     */
    public Builder addConsumerDestinations(
        int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) {
      copyOnWrite();
      instance.addConsumerDestinations(index,
          builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one consumer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
     */
    public Builder addAllConsumerDestinations(
        java.lang.Iterable<? extends com.google.api.Logging.LoggingDestination> values) {
      copyOnWrite();
      instance.addAllConsumerDestinations(values);
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one consumer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
     */
    public Builder clearConsumerDestinations() {
      copyOnWrite();
      instance.clearConsumerDestinations();
      return this;
    }
    /**
     * <pre>
     * Logging configurations for sending logs to the consumer project.
     * There can be multiple consumer destinations, each one must have a
     * different monitored resource type. A log can be used in at most
     * one consumer destination.
     * </pre>
     *
     * <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code>
     */
    public Builder removeConsumerDestinations(int index) {
      copyOnWrite();
      instance.removeConsumerDestinations(index);
      return this;
    }

    // @@protoc_insertion_point(builder_scope:google.api.Logging)
  }
  @java.lang.Override
  @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
  protected final java.lang.Object dynamicMethod(
      com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
      java.lang.Object arg0, java.lang.Object arg1) {
    switch (method) {
      case NEW_MUTABLE_INSTANCE: {
        return new com.google.api.Logging();
      }
      case NEW_BUILDER: {
        return new Builder();
      }
      case BUILD_MESSAGE_INFO: {
          java.lang.Object[] objects = new java.lang.Object[] {
            "producerDestinations_",
            com.google.api.Logging.LoggingDestination.class,
            "consumerDestinations_",
            com.google.api.Logging.LoggingDestination.class,
          };
          java.lang.String info =
              "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0002\u0000\u0001\u001b\u0002\u001b" +
              "";
          return newMessageInfo(DEFAULT_INSTANCE, info, objects);
      }
      // fall through
      case GET_DEFAULT_INSTANCE: {
        return DEFAULT_INSTANCE;
      }
      case GET_PARSER: {
        com.google.protobuf.Parser<com.google.api.Logging> parser = PARSER;
        if (parser == null) {
          synchronized (com.google.api.Logging.class) {
            parser = PARSER;
            if (parser == null) {
              parser =
                  new DefaultInstanceBasedParser<com.google.api.Logging>(
                      DEFAULT_INSTANCE);
              PARSER = parser;
            }
          }
        }
        return parser;
    }
    case GET_MEMOIZED_IS_INITIALIZED: {
      return (byte) 1;
    }
    case SET_MEMOIZED_IS_INITIALIZED: {
      return null;
    }
    }
    throw new UnsupportedOperationException();
  }


  // @@protoc_insertion_point(class_scope:google.api.Logging)
  private static final com.google.api.Logging DEFAULT_INSTANCE;
  static {
    Logging defaultInstance = new Logging();
    // New instances are implicitly immutable so no need to make
    // immutable.
    DEFAULT_INSTANCE = defaultInstance;
    com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
      Logging.class, defaultInstance);
  }

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

  private static volatile com.google.protobuf.Parser<Logging> PARSER;

  public static com.google.protobuf.Parser<Logging> parser() {
    return DEFAULT_INSTANCE.getParserForType();
  }
}

