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

shade.polaris.com.google.api.MonitoredResourceDescriptor Maven / Gradle / Ivy

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

package com.google.api;

/**
 * 
 * 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 {@code google.api.MonitoredResourceDescriptor} */ public final class MonitoredResourceDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.MonitoredResourceDescriptor) MonitoredResourceDescriptorOrBuilder { private static final long serialVersionUID = 0L; // Use MonitoredResourceDescriptor.newBuilder() to construct. private MonitoredResourceDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MonitoredResourceDescriptor() { name_ = ""; type_ = ""; displayName_ = ""; description_ = ""; labels_ = java.util.Collections.emptyList(); launchStage_ = 0; } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MonitoredResourceDescriptor( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { String s = input.readStringRequireUtf8(); type_ = s; break; } case 18: { String s = input.readStringRequireUtf8(); displayName_ = s; break; } case 26: { String s = input.readStringRequireUtf8(); description_ = s; break; } case 34: { if (!((mutable_bitField0_ & 0x00000010) != 0)) { labels_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000010; } labels_.add( input.readMessage(LabelDescriptor.parser(), extensionRegistry)); break; } case 42: { String s = input.readStringRequireUtf8(); name_ = s; break; } case 56: { int rawValue = input.readEnum(); launchStage_ = rawValue; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000010) != 0)) { labels_ = java.util.Collections.unmodifiableList(labels_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable .ensureFieldAccessorsInitialized( MonitoredResourceDescriptor.class, Builder.class); } private int bitField0_; public static final int NAME_FIELD_NUMBER = 5; private volatile Object name_; /** *
   * 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 String getName() { Object ref = name_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
   * 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 com.google.protobuf.ByteString getNameBytes() { Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TYPE_FIELD_NUMBER = 1; private volatile Object type_; /** *
   * 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 String getType() { Object ref = type_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); type_ = s; return s; } } /** *
   * 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 com.google.protobuf.ByteString getTypeBytes() { Object ref = type_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); type_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DISPLAY_NAME_FIELD_NUMBER = 2; private volatile Object displayName_; /** *
   * 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 String getDisplayName() { Object ref = displayName_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); displayName_ = s; return s; } } /** *
   * 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 com.google.protobuf.ByteString getDisplayNameBytes() { Object ref = displayName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DESCRIPTION_FIELD_NUMBER = 3; private volatile Object description_; /** *
   * Optional. A detailed description of the monitored resource type that might
   * be used in documentation.
   * 
* * string description = 3; */ public String getDescription() { Object ref = description_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); description_ = s; return s; } } /** *
   * Optional. A detailed description of the monitored resource type that might
   * be used in documentation.
   * 
* * string description = 3; */ public com.google.protobuf.ByteString getDescriptionBytes() { Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LABELS_FIELD_NUMBER = 4; private java.util.List labels_; /** *
   * 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 java.util.List getLabelsList() { return labels_; } /** *
   * 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 java.util.List getLabelsOrBuilderList() { return labels_; } /** *
   * 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 int getLabelsCount() { return labels_.size(); } /** *
   * 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 LabelDescriptor getLabels(int index) { return labels_.get(index); } /** *
   * 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 LabelDescriptorOrBuilder getLabelsOrBuilder( int index) { return labels_.get(index); } public static final int LAUNCH_STAGE_FIELD_NUMBER = 7; private int launchStage_; /** *
   * Optional. The launch stage of the monitored resource definition.
   * 
* * .google.api.LaunchStage launch_stage = 7; */ public int getLaunchStageValue() { return launchStage_; } /** *
   * Optional. The launch stage of the monitored resource definition.
   * 
* * .google.api.LaunchStage launch_stage = 7; */ public LaunchStage getLaunchStage() { @SuppressWarnings("deprecation") LaunchStage result = LaunchStage.valueOf(launchStage_); return result == null ? LaunchStage.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getTypeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); } if (!getDisplayNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); } if (!getDescriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); } for (int i = 0; i < labels_.size(); i++) { output.writeMessage(4, labels_.get(i)); } if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_); } if (launchStage_ != LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { output.writeEnum(7, launchStage_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getTypeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); } if (!getDisplayNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); } if (!getDescriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); } for (int i = 0; i < labels_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, labels_.get(i)); } if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_); } if (launchStage_ != LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(7, launchStage_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof MonitoredResourceDescriptor)) { return super.equals(obj); } MonitoredResourceDescriptor other = (MonitoredResourceDescriptor) obj; if (!getName() .equals(other.getName())) return false; if (!getType() .equals(other.getType())) return false; if (!getDisplayName() .equals(other.getDisplayName())) return false; if (!getDescription() .equals(other.getDescription())) return false; if (!getLabelsList() .equals(other.getLabelsList())) return false; if (launchStage_ != other.launchStage_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); if (getLabelsCount() > 0) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + getLabelsList().hashCode(); } hash = (37 * hash) + LAUNCH_STAGE_FIELD_NUMBER; hash = (53 * hash) + launchStage_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static MonitoredResourceDescriptor parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static MonitoredResourceDescriptor parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static MonitoredResourceDescriptor parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static MonitoredResourceDescriptor parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static MonitoredResourceDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static MonitoredResourceDescriptor parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static MonitoredResourceDescriptor parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static MonitoredResourceDescriptor parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static MonitoredResourceDescriptor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static MonitoredResourceDescriptor parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static MonitoredResourceDescriptor parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static MonitoredResourceDescriptor parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(MonitoredResourceDescriptor prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * 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 {@code google.api.MonitoredResourceDescriptor} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.api.MonitoredResourceDescriptor) com.google.api.MonitoredResourceDescriptorOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable .ensureFieldAccessorsInitialized( MonitoredResourceDescriptor.class, Builder.class); } // Construct using com.google.api.MonitoredResourceDescriptor.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getLabelsFieldBuilder(); } } @Override public Builder clear() { super.clear(); name_ = ""; type_ = ""; displayName_ = ""; description_ = ""; if (labelsBuilder_ == null) { labels_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); } else { labelsBuilder_.clear(); } launchStage_ = 0; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return MonitoredResourceProto.internal_static_google_api_MonitoredResourceDescriptor_descriptor; } @Override public MonitoredResourceDescriptor getDefaultInstanceForType() { return MonitoredResourceDescriptor.getDefaultInstance(); } @Override public MonitoredResourceDescriptor build() { MonitoredResourceDescriptor result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public MonitoredResourceDescriptor buildPartial() { MonitoredResourceDescriptor result = new MonitoredResourceDescriptor(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; result.type_ = type_; result.displayName_ = displayName_; result.description_ = description_; if (labelsBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { labels_ = java.util.Collections.unmodifiableList(labels_); bitField0_ = (bitField0_ & ~0x00000010); } result.labels_ = labels_; } else { result.labels_ = labelsBuilder_.build(); } result.launchStage_ = launchStage_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof MonitoredResourceDescriptor) { return mergeFrom((MonitoredResourceDescriptor)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(MonitoredResourceDescriptor other) { if (other == MonitoredResourceDescriptor.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getType().isEmpty()) { type_ = other.type_; onChanged(); } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); } if (labelsBuilder_ == null) { if (!other.labels_.isEmpty()) { if (labels_.isEmpty()) { labels_ = other.labels_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureLabelsIsMutable(); labels_.addAll(other.labels_); } onChanged(); } } else { if (!other.labels_.isEmpty()) { if (labelsBuilder_.isEmpty()) { labelsBuilder_.dispose(); labelsBuilder_ = null; labels_ = other.labels_; bitField0_ = (bitField0_ & ~0x00000010); labelsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLabelsFieldBuilder() : null; } else { labelsBuilder_.addAllMessages(other.labels_); } } } if (other.launchStage_ != 0) { setLaunchStageValue(other.getLaunchStageValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { MonitoredResourceDescriptor parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (MonitoredResourceDescriptor) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private Object name_ = ""; /** *
     * 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 String getName() { Object ref = name_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); name_ = s; return s; } else { return (String) ref; } } /** *
     * 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 com.google.protobuf.ByteString getNameBytes() { Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * 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 Builder setName( String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
     * 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 Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
     * 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 Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private Object type_ = ""; /** *
     * 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 String getType() { Object ref = type_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); type_ = s; return s; } else { return (String) ref; } } /** *
     * 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 com.google.protobuf.ByteString getTypeBytes() { Object ref = type_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); type_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * 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 Builder setType( String value) { if (value == null) { throw new NullPointerException(); } type_ = value; onChanged(); return this; } /** *
     * 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 Builder clearType() { type_ = getDefaultInstance().getType(); onChanged(); return this; } /** *
     * 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 Builder setTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); type_ = value; onChanged(); return this; } private Object displayName_ = ""; /** *
     * 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 String getDisplayName() { Object ref = displayName_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); displayName_ = s; return s; } else { return (String) ref; } } /** *
     * 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 com.google.protobuf.ByteString getDisplayNameBytes() { Object ref = displayName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * 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 Builder setDisplayName( String value) { if (value == null) { throw new NullPointerException(); } displayName_ = value; onChanged(); return this; } /** *
     * 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 Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); onChanged(); return this; } /** *
     * 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 Builder setDisplayNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); displayName_ = value; onChanged(); return this; } private Object description_ = ""; /** *
     * Optional. A detailed description of the monitored resource type that might
     * be used in documentation.
     * 
* * string description = 3; */ public String getDescription() { Object ref = description_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); description_ = s; return s; } else { return (String) ref; } } /** *
     * Optional. A detailed description of the monitored resource type that might
     * be used in documentation.
     * 
* * string description = 3; */ public com.google.protobuf.ByteString getDescriptionBytes() { Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Optional. A detailed description of the monitored resource type that might
     * be used in documentation.
     * 
* * string description = 3; */ public Builder setDescription( String value) { if (value == null) { throw new NullPointerException(); } description_ = value; onChanged(); return this; } /** *
     * Optional. A detailed description of the monitored resource type that might
     * be used in documentation.
     * 
* * string description = 3; */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** *
     * Optional. A detailed description of the monitored resource type that might
     * be used in documentation.
     * 
* * string description = 3; */ public Builder setDescriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; onChanged(); return this; } private java.util.List labels_ = java.util.Collections.emptyList(); private void ensureLabelsIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { labels_ = new java.util.ArrayList(labels_); bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilderV3< LabelDescriptor, LabelDescriptor.Builder, LabelDescriptorOrBuilder> labelsBuilder_; /** *
     * 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 java.util.List getLabelsList() { if (labelsBuilder_ == null) { return java.util.Collections.unmodifiableList(labels_); } else { return labelsBuilder_.getMessageList(); } } /** *
     * 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 int getLabelsCount() { if (labelsBuilder_ == null) { return labels_.size(); } else { return labelsBuilder_.getCount(); } } /** *
     * 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 LabelDescriptor getLabels(int index) { if (labelsBuilder_ == null) { return labels_.get(index); } else { return labelsBuilder_.getMessage(index); } } /** *
     * 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 Builder setLabels( int index, LabelDescriptor value) { if (labelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLabelsIsMutable(); labels_.set(index, value); onChanged(); } else { labelsBuilder_.setMessage(index, value); } return this; } /** *
     * 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 Builder setLabels( int index, LabelDescriptor.Builder builderForValue) { if (labelsBuilder_ == null) { ensureLabelsIsMutable(); labels_.set(index, builderForValue.build()); onChanged(); } else { labelsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * 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 Builder addLabels(LabelDescriptor value) { if (labelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLabelsIsMutable(); labels_.add(value); onChanged(); } else { labelsBuilder_.addMessage(value); } return this; } /** *
     * 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 Builder addLabels( int index, LabelDescriptor value) { if (labelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLabelsIsMutable(); labels_.add(index, value); onChanged(); } else { labelsBuilder_.addMessage(index, value); } return this; } /** *
     * 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 Builder addLabels( LabelDescriptor.Builder builderForValue) { if (labelsBuilder_ == null) { ensureLabelsIsMutable(); labels_.add(builderForValue.build()); onChanged(); } else { labelsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * 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 Builder addLabels( int index, LabelDescriptor.Builder builderForValue) { if (labelsBuilder_ == null) { ensureLabelsIsMutable(); labels_.add(index, builderForValue.build()); onChanged(); } else { labelsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * 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 Builder addAllLabels( Iterable values) { if (labelsBuilder_ == null) { ensureLabelsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, labels_); onChanged(); } else { labelsBuilder_.addAllMessages(values); } return this; } /** *
     * 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 Builder clearLabels() { if (labelsBuilder_ == null) { labels_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { labelsBuilder_.clear(); } return this; } /** *
     * 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 Builder removeLabels(int index) { if (labelsBuilder_ == null) { ensureLabelsIsMutable(); labels_.remove(index); onChanged(); } else { labelsBuilder_.remove(index); } return this; } /** *
     * 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 LabelDescriptor.Builder getLabelsBuilder( int index) { return getLabelsFieldBuilder().getBuilder(index); } /** *
     * 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 LabelDescriptorOrBuilder getLabelsOrBuilder( int index) { if (labelsBuilder_ == null) { return labels_.get(index); } else { return labelsBuilder_.getMessageOrBuilder(index); } } /** *
     * 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 java.util.List getLabelsOrBuilderList() { if (labelsBuilder_ != null) { return labelsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(labels_); } } /** *
     * 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 LabelDescriptor.Builder addLabelsBuilder() { return getLabelsFieldBuilder().addBuilder( LabelDescriptor.getDefaultInstance()); } /** *
     * 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 LabelDescriptor.Builder addLabelsBuilder( int index) { return getLabelsFieldBuilder().addBuilder( index, LabelDescriptor.getDefaultInstance()); } /** *
     * 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 java.util.List getLabelsBuilderList() { return getLabelsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< LabelDescriptor, LabelDescriptor.Builder, LabelDescriptorOrBuilder> getLabelsFieldBuilder() { if (labelsBuilder_ == null) { labelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< LabelDescriptor, LabelDescriptor.Builder, LabelDescriptorOrBuilder>( labels_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); labels_ = null; } return labelsBuilder_; } private int launchStage_ = 0; /** *
     * Optional. The launch stage of the monitored resource definition.
     * 
* * .google.api.LaunchStage launch_stage = 7; */ public int getLaunchStageValue() { return launchStage_; } /** *
     * Optional. The launch stage of the monitored resource definition.
     * 
* * .google.api.LaunchStage launch_stage = 7; */ public Builder setLaunchStageValue(int value) { launchStage_ = value; onChanged(); return this; } /** *
     * Optional. The launch stage of the monitored resource definition.
     * 
* * .google.api.LaunchStage launch_stage = 7; */ public LaunchStage getLaunchStage() { @SuppressWarnings("deprecation") LaunchStage result = LaunchStage.valueOf(launchStage_); return result == null ? LaunchStage.UNRECOGNIZED : result; } /** *
     * Optional. The launch stage of the monitored resource definition.
     * 
* * .google.api.LaunchStage launch_stage = 7; */ public Builder setLaunchStage(LaunchStage value) { if (value == null) { throw new NullPointerException(); } launchStage_ = value.getNumber(); onChanged(); return this; } /** *
     * Optional. The launch stage of the monitored resource definition.
     * 
* * .google.api.LaunchStage launch_stage = 7; */ public Builder clearLaunchStage() { launchStage_ = 0; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.api.MonitoredResourceDescriptor) } // @@protoc_insertion_point(class_scope:google.api.MonitoredResourceDescriptor) private static final MonitoredResourceDescriptor DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new MonitoredResourceDescriptor(); } public static MonitoredResourceDescriptor getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @Override public MonitoredResourceDescriptor parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MonitoredResourceDescriptor(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @Override public MonitoredResourceDescriptor getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy