Package com.google.api
Class MonitoredResourceDescriptor.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.Builder<MonitoredResourceDescriptor.Builder>
-
- com.google.api.MonitoredResourceDescriptor.Builder
-
- All Implemented Interfaces:
MonitoredResourceDescriptorOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.lang.Cloneable
- Enclosing class:
- MonitoredResourceDescriptor
public static final class MonitoredResourceDescriptor.Builder extends com.google.protobuf.GeneratedMessage.Builder<MonitoredResourceDescriptor.Builder> implements MonitoredResourceDescriptorOrBuilder
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 typegoogle.api.MonitoredResourceDescriptor
-
-
Method Summary
-
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<MonitoredResourceDescriptor.Builder>
-
clear
public MonitoredResourceDescriptor.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<MonitoredResourceDescriptor.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<MonitoredResourceDescriptor.Builder>
-
getDefaultInstanceForType
public MonitoredResourceDescriptor getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public MonitoredResourceDescriptor build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public MonitoredResourceDescriptor buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
public MonitoredResourceDescriptor.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MonitoredResourceDescriptor.Builder>
-
mergeFrom
public MonitoredResourceDescriptor.Builder mergeFrom(MonitoredResourceDescriptor other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<MonitoredResourceDescriptor.Builder>
-
mergeFrom
public MonitoredResourceDescriptor.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MonitoredResourceDescriptor.Builder>- Throws:
java.io.IOException
-
getName
public java.lang.String getName()
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;- Specified by:
getNamein interfaceMonitoredResourceDescriptorOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
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;- Specified by:
getNameBytesin interfaceMonitoredResourceDescriptorOrBuilder- Returns:
- The bytes for name.
-
setName
public MonitoredResourceDescriptor.Builder setName(java.lang.String 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;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
public MonitoredResourceDescriptor.Builder clearName()
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;- Returns:
- This builder for chaining.
-
setNameBytes
public MonitoredResourceDescriptor.Builder setNameBytes(com.google.protobuf.ByteString 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;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getType
public java.lang.String getType()
Required. The monitored resource type. For example, the type `"cloudsql_database"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).
string type = 1;- Specified by:
getTypein interfaceMonitoredResourceDescriptorOrBuilder- Returns:
- The type.
-
getTypeBytes
public com.google.protobuf.ByteString getTypeBytes()
Required. The monitored resource type. For example, the type `"cloudsql_database"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).
string type = 1;- Specified by:
getTypeBytesin interfaceMonitoredResourceDescriptorOrBuilder- Returns:
- The bytes for type.
-
setType
public MonitoredResourceDescriptor.Builder setType(java.lang.String value)
Required. The monitored resource type. For example, the type `"cloudsql_database"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).
string type = 1;- Parameters:
value- The type to set.- Returns:
- This builder for chaining.
-
clearType
public MonitoredResourceDescriptor.Builder clearType()
Required. The monitored resource type. For example, the type `"cloudsql_database"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).
string type = 1;- Returns:
- This builder for chaining.
-
setTypeBytes
public MonitoredResourceDescriptor.Builder setTypeBytes(com.google.protobuf.ByteString value)
Required. The monitored resource type. For example, the type `"cloudsql_database"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).
string type = 1;- Parameters:
value- The bytes for type to set.- Returns:
- This builder for chaining.
-
getDisplayName
public java.lang.String getDisplayName()
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;- Specified by:
getDisplayNamein interfaceMonitoredResourceDescriptorOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()
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;- Specified by:
getDisplayNameBytesin interfaceMonitoredResourceDescriptorOrBuilder- Returns:
- The bytes for displayName.
-
setDisplayName
public MonitoredResourceDescriptor.Builder setDisplayName(java.lang.String 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;- Parameters:
value- The displayName to set.- Returns:
- This builder for chaining.
-
clearDisplayName
public MonitoredResourceDescriptor.Builder clearDisplayName()
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;- Returns:
- This builder for chaining.
-
setDisplayNameBytes
public MonitoredResourceDescriptor.Builder setDisplayNameBytes(com.google.protobuf.ByteString 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;- Parameters:
value- The bytes for displayName to set.- Returns:
- This builder for chaining.
-
getDescription
public java.lang.String getDescription()
Optional. A detailed description of the monitored resource type that might be used in documentation.
string description = 3;- Specified by:
getDescriptionin interfaceMonitoredResourceDescriptorOrBuilder- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()
Optional. A detailed description of the monitored resource type that might be used in documentation.
string description = 3;- Specified by:
getDescriptionBytesin interfaceMonitoredResourceDescriptorOrBuilder- Returns:
- The bytes for description.
-
setDescription
public MonitoredResourceDescriptor.Builder setDescription(java.lang.String value)
Optional. A detailed description of the monitored resource type that might be used in documentation.
string description = 3;- Parameters:
value- The description to set.- Returns:
- This builder for chaining.
-
clearDescription
public MonitoredResourceDescriptor.Builder clearDescription()
Optional. A detailed description of the monitored resource type that might be used in documentation.
string description = 3;- Returns:
- This builder for chaining.
-
setDescriptionBytes
public MonitoredResourceDescriptor.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
Optional. A detailed description of the monitored resource type that might be used in documentation.
string description = 3;- Parameters:
value- The bytes for description to set.- Returns:
- This builder for chaining.
-
getLabelsList
public java.util.List<LabelDescriptor> 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;- Specified by:
getLabelsListin interfaceMonitoredResourceDescriptorOrBuilder
-
getLabelsCount
public int getLabelsCount()
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;- Specified by:
getLabelsCountin interfaceMonitoredResourceDescriptorOrBuilder
-
getLabels
public LabelDescriptor getLabels(int 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;- Specified by:
getLabelsin interfaceMonitoredResourceDescriptorOrBuilder
-
setLabels
public MonitoredResourceDescriptor.Builder setLabels(int index, LabelDescriptor 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;
-
setLabels
public MonitoredResourceDescriptor.Builder setLabels(int index, LabelDescriptor.Builder builderForValue)
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;
-
addLabels
public MonitoredResourceDescriptor.Builder addLabels(LabelDescriptor 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;
-
addLabels
public MonitoredResourceDescriptor.Builder addLabels(int index, LabelDescriptor 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;
-
addLabels
public MonitoredResourceDescriptor.Builder addLabels(LabelDescriptor.Builder builderForValue)
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;
-
addLabels
public MonitoredResourceDescriptor.Builder addLabels(int index, LabelDescriptor.Builder builderForValue)
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;
-
addAllLabels
public MonitoredResourceDescriptor.Builder addAllLabels(java.lang.Iterable<? extends LabelDescriptor> 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;
-
clearLabels
public MonitoredResourceDescriptor.Builder clearLabels()
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;
-
removeLabels
public MonitoredResourceDescriptor.Builder removeLabels(int 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;
-
getLabelsBuilder
public LabelDescriptor.Builder getLabelsBuilder(int 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;
-
getLabelsOrBuilder
public LabelDescriptorOrBuilder getLabelsOrBuilder(int 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;- Specified by:
getLabelsOrBuilderin interfaceMonitoredResourceDescriptorOrBuilder
-
getLabelsOrBuilderList
public java.util.List<? extends LabelDescriptorOrBuilder> getLabelsOrBuilderList()
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;- Specified by:
getLabelsOrBuilderListin interfaceMonitoredResourceDescriptorOrBuilder
-
addLabelsBuilder
public LabelDescriptor.Builder addLabelsBuilder()
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;
-
addLabelsBuilder
public LabelDescriptor.Builder addLabelsBuilder(int 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;
-
getLabelsBuilderList
public java.util.List<LabelDescriptor.Builder> getLabelsBuilderList()
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;
-
getLaunchStageValue
public int getLaunchStageValue()
Optional. The launch stage of the monitored resource definition.
.google.api.LaunchStage launch_stage = 7;- Specified by:
getLaunchStageValuein interfaceMonitoredResourceDescriptorOrBuilder- Returns:
- The enum numeric value on the wire for launchStage.
-
setLaunchStageValue
public MonitoredResourceDescriptor.Builder setLaunchStageValue(int value)
Optional. The launch stage of the monitored resource definition.
.google.api.LaunchStage launch_stage = 7;- Parameters:
value- The enum numeric value on the wire for launchStage to set.- Returns:
- This builder for chaining.
-
getLaunchStage
public LaunchStage getLaunchStage()
Optional. The launch stage of the monitored resource definition.
.google.api.LaunchStage launch_stage = 7;- Specified by:
getLaunchStagein interfaceMonitoredResourceDescriptorOrBuilder- Returns:
- The launchStage.
-
setLaunchStage
public MonitoredResourceDescriptor.Builder setLaunchStage(LaunchStage value)
Optional. The launch stage of the monitored resource definition.
.google.api.LaunchStage launch_stage = 7;- Parameters:
value- The launchStage to set.- Returns:
- This builder for chaining.
-
clearLaunchStage
public MonitoredResourceDescriptor.Builder clearLaunchStage()
Optional. The launch stage of the monitored resource definition.
.google.api.LaunchStage launch_stage = 7;- Returns:
- This builder for chaining.
-
-