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

com.google.api.LoggingKt.kt Maven / Gradle / Ivy

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

// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.api;

@kotlin.jvm.JvmName("-initializelogging")
public inline fun logging(block: com.google.api.LoggingKt.Dsl.() -> kotlin.Unit): com.google.api.Logging =
  com.google.api.LoggingKt.Dsl._create(com.google.api.Logging.newBuilder()).apply { block() }._build()
/**
 * ```
 * 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
 * ```
 *
 * Protobuf type `google.api.Logging`
 */
public object LoggingKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  public class Dsl private constructor(
    private val _builder: com.google.api.Logging.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.api.Logging.Builder): Dsl = Dsl(builder)
    }

    @kotlin.jvm.JvmSynthetic
    @kotlin.PublishedApi
    internal fun _build(): com.google.api.Logging = _builder.build()

    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class ProducerDestinationsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination producer_destinations = 1;`
     */
     public val producerDestinations: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getProducerDestinationsList()
      )
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination producer_destinations = 1;`
     * @param value The producerDestinations to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addProducerDestinations")
    public fun com.google.protobuf.kotlin.DslList.add(value: com.google.api.Logging.LoggingDestination) {
      _builder.addProducerDestinations(value)
    }
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination producer_destinations = 1;`
     * @param value The producerDestinations to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignProducerDestinations")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.api.Logging.LoggingDestination) {
      add(value)
    }
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination producer_destinations = 1;`
     * @param values The producerDestinations to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllProducerDestinations")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllProducerDestinations(values)
    }
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination producer_destinations = 1;`
     * @param values The producerDestinations to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllProducerDestinations")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination producer_destinations = 1;`
     * @param index The index to set the value at.
     * @param value The producerDestinations to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setProducerDestinations")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.api.Logging.LoggingDestination) {
      _builder.setProducerDestinations(index, value)
    }
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination producer_destinations = 1;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearProducerDestinations")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearProducerDestinations()
    }


    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class ConsumerDestinationsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;`
     */
     public val consumerDestinations: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getConsumerDestinationsList()
      )
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;`
     * @param value The consumerDestinations to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addConsumerDestinations")
    public fun com.google.protobuf.kotlin.DslList.add(value: com.google.api.Logging.LoggingDestination) {
      _builder.addConsumerDestinations(value)
    }
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;`
     * @param value The consumerDestinations to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignConsumerDestinations")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.api.Logging.LoggingDestination) {
      add(value)
    }
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;`
     * @param values The consumerDestinations to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllConsumerDestinations")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllConsumerDestinations(values)
    }
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;`
     * @param values The consumerDestinations to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllConsumerDestinations")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;`
     * @param index The index to set the value at.
     * @param value The consumerDestinations to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setConsumerDestinations")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.api.Logging.LoggingDestination) {
      _builder.setConsumerDestinations(index, value)
    }
    /**
     * ```
     * 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.
     * ```
     *
     * `repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearConsumerDestinations")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearConsumerDestinations()
    }

  }
  @kotlin.jvm.JvmName("-initializeloggingDestination")
  public inline fun loggingDestination(block: com.google.api.LoggingKt.LoggingDestinationKt.Dsl.() -> kotlin.Unit): com.google.api.Logging.LoggingDestination =
    com.google.api.LoggingKt.LoggingDestinationKt.Dsl._create(com.google.api.Logging.LoggingDestination.newBuilder()).apply { block() }._build()
  /**
   * ```
   * Configuration of a specific logging destination (the producer project
   * or the consumer project).
   * ```
   *
   * Protobuf type `google.api.Logging.LoggingDestination`
   */
  public object LoggingDestinationKt {
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    @com.google.protobuf.kotlin.ProtoDslMarker
    public class Dsl private constructor(
      private val _builder: com.google.api.Logging.LoggingDestination.Builder
    ) {
      public companion object {
        @kotlin.jvm.JvmSynthetic
        @kotlin.PublishedApi
        internal fun _create(builder: com.google.api.Logging.LoggingDestination.Builder): Dsl = Dsl(builder)
      }

      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _build(): com.google.api.Logging.LoggingDestination = _builder.build()

      /**
       * ```
       * The monitored resource type. The type must be defined in the
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * ```
       *
       * `string monitored_resource = 3;`
       */
      public var monitoredResource: kotlin.String
        @JvmName("getMonitoredResource")
        get() = _builder.getMonitoredResource()
        @JvmName("setMonitoredResource")
        set(value) {
          _builder.setMonitoredResource(value)
        }
      /**
       * ```
       * The monitored resource type. The type must be defined in the
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * ```
       *
       * `string monitored_resource = 3;`
       */
      public fun clearMonitoredResource() {
        _builder.clearMonitoredResource()
      }

      /**
       * An uninstantiable, behaviorless type to represent the field in
       * generics.
       */
      @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
      public class LogsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
      /**
       * ```
       * 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 "/".
       * ```
       *
       * `repeated string logs = 1;`
       * @return A list containing the logs.
       */
      public val logs: com.google.protobuf.kotlin.DslList
        @kotlin.jvm.JvmSynthetic
        get() = com.google.protobuf.kotlin.DslList(
          _builder.getLogsList()
        )
      /**
       * ```
       * 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 "/".
       * ```
       *
       * `repeated string logs = 1;`
       * @param value The logs to add.
       */
      @kotlin.jvm.JvmSynthetic
      @kotlin.jvm.JvmName("addLogs")
      public fun com.google.protobuf.kotlin.DslList.add(value: kotlin.String) {
        _builder.addLogs(value)
      }
      /**
       * ```
       * 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 "/".
       * ```
       *
       * `repeated string logs = 1;`
       * @param value The logs to add.
       */
      @kotlin.jvm.JvmSynthetic
      @kotlin.jvm.JvmName("plusAssignLogs")
      @Suppress("NOTHING_TO_INLINE")
      public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: kotlin.String) {
        add(value)
      }
      /**
       * ```
       * 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 "/".
       * ```
       *
       * `repeated string logs = 1;`
       * @param values The logs to add.
       */
      @kotlin.jvm.JvmSynthetic
      @kotlin.jvm.JvmName("addAllLogs")
      public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
        _builder.addAllLogs(values)
      }
      /**
       * ```
       * 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 "/".
       * ```
       *
       * `repeated string logs = 1;`
       * @param values The logs to add.
       */
      @kotlin.jvm.JvmSynthetic
      @kotlin.jvm.JvmName("plusAssignAllLogs")
      @Suppress("NOTHING_TO_INLINE")
      public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
        addAll(values)
      }
      /**
       * ```
       * 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 "/".
       * ```
       *
       * `repeated string logs = 1;`
       * @param index The index to set the value at.
       * @param value The logs to set.
       */
      @kotlin.jvm.JvmSynthetic
      @kotlin.jvm.JvmName("setLogs")
      public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: kotlin.String) {
        _builder.setLogs(index, value)
      }/**
       * ```
       * 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 "/".
       * ```
       *
       * `repeated string logs = 1;`
       */
      @kotlin.jvm.JvmSynthetic
      @kotlin.jvm.JvmName("clearLogs")
      public fun com.google.protobuf.kotlin.DslList.clear() {
        _builder.clearLogs()
      }}
  }
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.api.Logging.copy(block: `com.google.api`.LoggingKt.Dsl.() -> kotlin.Unit): com.google.api.Logging =
  `com.google.api`.LoggingKt.Dsl._create(this.toBuilder()).apply { block() }._build()

@kotlin.jvm.JvmSynthetic
public inline fun com.google.api.Logging.LoggingDestination.copy(block: `com.google.api`.LoggingKt.LoggingDestinationKt.Dsl.() -> kotlin.Unit): com.google.api.Logging.LoggingDestination =
  `com.google.api`.LoggingKt.LoggingDestinationKt.Dsl._create(this.toBuilder()).apply { block() }._build()





© 2015 - 2024 Weber Informatics LLC | Privacy Policy