/** * <pre> * Optional. A detailed description of the monitored resource type that might * be used in documentation. * </pre> * * <code>string description = 3;</code> */ public Builder setDescription( java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; onChanged(); return this; } /**
/** * <pre> * 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. * </pre> * * <code>string type = 1;</code> */ public Builder setType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } type_ = value; onChanged(); return this; } /**
/** * <pre> * Optional. A detailed description of the monitored resource type that might * be used in documentation. * </pre> * * <code>string description = 3;</code> */ public Builder setDescriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; onChanged(); return this; }
/** * <pre> * 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"`. * </pre> * * <code>repeated .google.api.LabelDescriptor labels = 4;</code> */ public Builder addLabels(com.google.api.LabelDescriptor value) { if (labelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLabelsIsMutable(); labels_.add(value); onChanged(); } else { labelsBuilder_.addMessage(value); } return this; } /**
/** * <pre> * 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"`. * </pre> * * <code>repeated .google.api.LabelDescriptor labels = 4;</code> */ public Builder addAllLabels( java.lang.Iterable<? extends com.google.api.LabelDescriptor> values) { if (labelsBuilder_ == null) { ensureLabelsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, labels_); onChanged(); } else { labelsBuilder_.addAllMessages(values); } return this; } /**
/** * <pre> * 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}"`. * </pre> * * <code>string name = 5;</code> */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /**
/** * <pre> * 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"`. * </pre> * * <code>repeated .google.api.LabelDescriptor labels = 4;</code> */ public Builder addLabels( int index, com.google.api.LabelDescriptor.Builder builderForValue) { if (labelsBuilder_ == null) { ensureLabelsIsMutable(); labels_.add(index, builderForValue.build()); onChanged(); } else { labelsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <pre> * 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"`. * </pre> * * <code>string display_name = 2;</code> */ public Builder setDisplayNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); displayName_ = value; onChanged(); return this; }
/** * <pre> * 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"`. * </pre> * * <code>repeated .google.api.LabelDescriptor labels = 4;</code> */ public Builder setLabels( int index, com.google.api.LabelDescriptor value) { if (labelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLabelsIsMutable(); labels_.set(index, value); onChanged(); } else { labelsBuilder_.setMessage(index, value); } return this; } /**
/** * <pre> * 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"`. * </pre> * * <code>repeated .google.api.LabelDescriptor labels = 4;</code> */ public Builder removeLabels(int index) { if (labelsBuilder_ == null) { ensureLabelsIsMutable(); labels_.remove(index); onChanged(); } else { labelsBuilder_.remove(index); } return this; } /**
/** * <pre> * 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}"`. * </pre> * * <code>string name = 5;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** * <pre> * 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}"`. * </pre> * * <code>string name = 5;</code> */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; }
/** * <pre> * 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"`. * </pre> * * <code>repeated .google.api.LabelDescriptor labels = 4;</code> */ public Builder addLabels( com.google.api.LabelDescriptor.Builder builderForValue) { if (labelsBuilder_ == null) { ensureLabelsIsMutable(); labels_.add(builderForValue.build()); onChanged(); } else { labelsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <pre> * 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. * </pre> * * <code>string type = 1;</code> */ public Builder setTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); type_ = value; onChanged(); return this; }
/** * <pre> * 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"`. * </pre> * * <code>repeated .google.api.LabelDescriptor labels = 4;</code> */ public Builder clearLabels() { if (labelsBuilder_ == null) { labels_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { labelsBuilder_.clear(); } return this; } /**
/** * <pre> * 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"`. * </pre> * * <code>string display_name = 2;</code> */ public Builder setDisplayName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } displayName_ = value; onChanged(); return this; } /**
/** * <pre> * 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"`. * </pre> * * <code>repeated .google.api.LabelDescriptor labels = 4;</code> */ public Builder setLabels( int index, com.google.api.LabelDescriptor.Builder builderForValue) { if (labelsBuilder_ == null) { ensureLabelsIsMutable(); labels_.set(index, builderForValue.build()); onChanged(); } else { labelsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <pre> * 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"`. * </pre> * * <code>string display_name = 2;</code> */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); onChanged(); return this; } /**
/** * <pre> * 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. * </pre> * * <code>string type = 1;</code> */ public Builder clearType() { type_ = getDefaultInstance().getType(); onChanged(); return this; } /**
/** * <pre> * Optional. A detailed description of the monitored resource type that might * be used in documentation. * </pre> * * <code>string description = 3;</code> */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /**