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

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

There is a newer version: 1.2.13
Show newest version
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/monitored_resource.proto

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

@kotlin.jvm.JvmName("-initializemonitoredResourceDescriptor")
public inline fun monitoredResourceDescriptor(block: com.google.api.MonitoredResourceDescriptorKt.Dsl.() -> kotlin.Unit): com.google.api.MonitoredResourceDescriptor =
  com.google.api.MonitoredResourceDescriptorKt.Dsl._create(com.google.api.MonitoredResourceDescriptor.newBuilder()).apply { block() }._build()
/**
 * ```
 * An object that describes the schema of a [MonitoredResource][google.api.MonitoredResource] object using a
 * type name and a set of labels.  For example, the monitored resource
 * descriptor for Google Compute Engine VM instances has a type of
 * `"gce_instance"` and specifies the use of the labels `"instance_id"` and
 * `"zone"` to identify particular VM instances.
 *
 * Different APIs can support different monitored resource types. APIs generally
 * provide a `list` method that returns the monitored resource descriptors used
 * by the API.
 * ```
 *
 * Protobuf type `google.api.MonitoredResourceDescriptor`
 */
public object MonitoredResourceDescriptorKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  public class Dsl private constructor(
    private val _builder: com.google.api.MonitoredResourceDescriptor.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.api.MonitoredResourceDescriptor.Builder): Dsl = Dsl(builder)
    }

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

    /**
     * ```
     * Optional. The resource name of the monitored resource descriptor:
     * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
     * {type} is the value of the `type` field in this object and
     * {project_id} is a project ID that provides API-specific context for
     * accessing the type.  APIs that do not use project information can use the
     * resource name format `"monitoredResourceDescriptors/{type}"`.
     * ```
     *
     * `string name = 5;`
     */
    public var name: kotlin.String
      @JvmName("getName")
      get() = _builder.getName()
      @JvmName("setName")
      set(value) {
        _builder.setName(value)
      }
    /**
     * ```
     * Optional. The resource name of the monitored resource descriptor:
     * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
     * {type} is the value of the `type` field in this object and
     * {project_id} is a project ID that provides API-specific context for
     * accessing the type.  APIs that do not use project information can use the
     * resource name format `"monitoredResourceDescriptors/{type}"`.
     * ```
     *
     * `string name = 5;`
     */
    public fun clearName() {
      _builder.clearName()
    }

    /**
     * ```
     * Required. The monitored resource type. For example, the type
     * `"cloudsql_database"` represents databases in Google Cloud SQL.
     * The maximum length of this value is 256 characters.
     * ```
     *
     * `string type = 1;`
     */
    public var type: kotlin.String
      @JvmName("getType")
      get() = _builder.getType()
      @JvmName("setType")
      set(value) {
        _builder.setType(value)
      }
    /**
     * ```
     * Required. The monitored resource type. For example, the type
     * `"cloudsql_database"` represents databases in Google Cloud SQL.
     * The maximum length of this value is 256 characters.
     * ```
     *
     * `string type = 1;`
     */
    public fun clearType() {
      _builder.clearType()
    }

    /**
     * ```
     * Optional. A concise name for the monitored resource type that might be
     * displayed in user interfaces. It should be a Title Cased Noun Phrase,
     * without any article or other determiners. For example,
     * `"Google Cloud SQL Database"`.
     * ```
     *
     * `string display_name = 2;`
     */
    public var displayName: kotlin.String
      @JvmName("getDisplayName")
      get() = _builder.getDisplayName()
      @JvmName("setDisplayName")
      set(value) {
        _builder.setDisplayName(value)
      }
    /**
     * ```
     * Optional. A concise name for the monitored resource type that might be
     * displayed in user interfaces. It should be a Title Cased Noun Phrase,
     * without any article or other determiners. For example,
     * `"Google Cloud SQL Database"`.
     * ```
     *
     * `string display_name = 2;`
     */
    public fun clearDisplayName() {
      _builder.clearDisplayName()
    }

    /**
     * ```
     * Optional. A detailed description of the monitored resource type that might
     * be used in documentation.
     * ```
     *
     * `string description = 3;`
     */
    public var description: kotlin.String
      @JvmName("getDescription")
      get() = _builder.getDescription()
      @JvmName("setDescription")
      set(value) {
        _builder.setDescription(value)
      }
    /**
     * ```
     * Optional. A detailed description of the monitored resource type that might
     * be used in documentation.
     * ```
     *
     * `string description = 3;`
     */
    public fun clearDescription() {
      _builder.clearDescription()
    }

    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class LabelsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * Required. A set of labels used to describe instances of this monitored
     * resource type. For example, an individual Google Cloud SQL database is
     * identified by values for the labels `"database_id"` and `"zone"`.
     * ```
     *
     * `repeated .google.api.LabelDescriptor labels = 4;`
     */
     public val labels: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getLabelsList()
      )
    /**
     * ```
     * Required. A set of labels used to describe instances of this monitored
     * resource type. For example, an individual Google Cloud SQL database is
     * identified by values for the labels `"database_id"` and `"zone"`.
     * ```
     *
     * `repeated .google.api.LabelDescriptor labels = 4;`
     * @param value The labels to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addLabels")
    public fun com.google.protobuf.kotlin.DslList.add(value: com.google.api.LabelDescriptor) {
      _builder.addLabels(value)
    }
    /**
     * ```
     * Required. A set of labels used to describe instances of this monitored
     * resource type. For example, an individual Google Cloud SQL database is
     * identified by values for the labels `"database_id"` and `"zone"`.
     * ```
     *
     * `repeated .google.api.LabelDescriptor labels = 4;`
     * @param value The labels to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignLabels")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.api.LabelDescriptor) {
      add(value)
    }
    /**
     * ```
     * Required. A set of labels used to describe instances of this monitored
     * resource type. For example, an individual Google Cloud SQL database is
     * identified by values for the labels `"database_id"` and `"zone"`.
     * ```
     *
     * `repeated .google.api.LabelDescriptor labels = 4;`
     * @param values The labels to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllLabels")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllLabels(values)
    }
    /**
     * ```
     * Required. A set of labels used to describe instances of this monitored
     * resource type. For example, an individual Google Cloud SQL database is
     * identified by values for the labels `"database_id"` and `"zone"`.
     * ```
     *
     * `repeated .google.api.LabelDescriptor labels = 4;`
     * @param values The labels to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllLabels")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * Required. A set of labels used to describe instances of this monitored
     * resource type. For example, an individual Google Cloud SQL database is
     * identified by values for the labels `"database_id"` and `"zone"`.
     * ```
     *
     * `repeated .google.api.LabelDescriptor labels = 4;`
     * @param index The index to set the value at.
     * @param value The labels to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setLabels")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.api.LabelDescriptor) {
      _builder.setLabels(index, value)
    }
    /**
     * ```
     * Required. A set of labels used to describe instances of this monitored
     * resource type. For example, an individual Google Cloud SQL database is
     * identified by values for the labels `"database_id"` and `"zone"`.
     * ```
     *
     * `repeated .google.api.LabelDescriptor labels = 4;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearLabels")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearLabels()
    }

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





© 2015 - 2025 Weber Informatics LLC | Privacy Policy