Package com.google.monitoring.v3
Class Group.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
- com.google.monitoring.v3.Group.Builder
-
- All Implemented Interfaces:
GroupOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- Group
public static final class Group.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Group.Builder> implements GroupOrBuilder
The description of a dynamic collection of monitored resources. Each group has a filter that is matched against monitored resources and their associated metadata. If a group's filter matches an available monitored resource, then that resource is a member of that group. Groups can contain any number of monitored resources, and each monitored resource can be a member of any number of groups. Groups can be nested in parent-child hierarchies. The `parentName` field identifies an optional parent for each group. If a group has a parent, then the only monitored resources available to be matched by the group's filter are the resources contained in the parent group. In other words, a group contains the monitored resources that match its filter and the filters of all the group's ancestors. A group without a parent can contain any monitored resource. For example, consider an infrastructure running a set of instances with two user-defined tags: `"environment"` and `"role"`. A parent group has a filter, `environment="production"`. A child of that parent group has a filter, `role="transcoder"`. The parent group contains all instances in the production environment, regardless of their roles. The child group contains instances that have the transcoder role *and* are in the production environment. The monitored resources contained in a group can change at any moment, depending on what resources exist and what filters are associated with the group and its ancestors.
Protobuf typegoogle.monitoring.v3.Group
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Group.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Group
build()
Group
buildPartial()
Group.Builder
clear()
Group.Builder
clearDisplayName()
A user-assigned name for this group, used only for display purposes.Group.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Group.Builder
clearFilter()
The filter used to determine which monitored resources belong to this group.Group.Builder
clearIsCluster()
If true, the members of this group are considered to be a cluster.Group.Builder
clearName()
Output only.Group.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Group.Builder
clearParentName()
The name of the group's parent, if it has one.Group.Builder
clone()
Group
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getDisplayName()
A user-assigned name for this group, used only for display purposes.com.google.protobuf.ByteString
getDisplayNameBytes()
A user-assigned name for this group, used only for display purposes.String
getFilter()
The filter used to determine which monitored resources belong to this group.com.google.protobuf.ByteString
getFilterBytes()
The filter used to determine which monitored resources belong to this group.boolean
getIsCluster()
If true, the members of this group are considered to be a cluster.String
getName()
Output only.com.google.protobuf.ByteString
getNameBytes()
Output only.String
getParentName()
The name of the group's parent, if it has one.com.google.protobuf.ByteString
getParentNameBytes()
The name of the group's parent, if it has one.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
Group.Builder
mergeFrom(Group other)
Group.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Group.Builder
mergeFrom(com.google.protobuf.Message other)
Group.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Group.Builder
setDisplayName(String value)
A user-assigned name for this group, used only for display purposes.Group.Builder
setDisplayNameBytes(com.google.protobuf.ByteString value)
A user-assigned name for this group, used only for display purposes.Group.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Group.Builder
setFilter(String value)
The filter used to determine which monitored resources belong to this group.Group.Builder
setFilterBytes(com.google.protobuf.ByteString value)
The filter used to determine which monitored resources belong to this group.Group.Builder
setIsCluster(boolean value)
If true, the members of this group are considered to be a cluster.Group.Builder
setName(String value)
Output only.Group.Builder
setNameBytes(com.google.protobuf.ByteString value)
Output only.Group.Builder
setParentName(String value)
The name of the group's parent, if it has one.Group.Builder
setParentNameBytes(com.google.protobuf.ByteString value)
The name of the group's parent, if it has one.Group.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
Group.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, 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.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
clear
public Group.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
getDefaultInstanceForType
public Group getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Group build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Group buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Group.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
setField
public Group.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
clearField
public Group.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
clearOneof
public Group.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
setRepeatedField
public Group.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
addRepeatedField
public Group.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
mergeFrom
public Group.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Group.Builder>
-
mergeFrom
public Group.Builder mergeFrom(Group other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
mergeFrom
public Group.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Group.Builder>
- Throws:
IOException
-
getName
public String getName()
Output only. The name of this group. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to `CreateGroup` and a unique `[GROUP_ID]` that is generated automatically.
string name = 1;
- Specified by:
getName
in interfaceGroupOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
Output only. The name of this group. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to `CreateGroup` and a unique `[GROUP_ID]` that is generated automatically.
string name = 1;
- Specified by:
getNameBytes
in interfaceGroupOrBuilder
- Returns:
- The bytes for name.
-
setName
public Group.Builder setName(String value)
Output only. The name of this group. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to `CreateGroup` and a unique `[GROUP_ID]` that is generated automatically.
string name = 1;
- Parameters:
value
- The name to set.- Returns:
- This builder for chaining.
-
clearName
public Group.Builder clearName()
Output only. The name of this group. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to `CreateGroup` and a unique `[GROUP_ID]` that is generated automatically.
string name = 1;
- Returns:
- This builder for chaining.
-
setNameBytes
public Group.Builder setNameBytes(com.google.protobuf.ByteString value)
Output only. The name of this group. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to `CreateGroup` and a unique `[GROUP_ID]` that is generated automatically.
string name = 1;
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
getDisplayName
public String getDisplayName()
A user-assigned name for this group, used only for display purposes.
string display_name = 2;
- Specified by:
getDisplayName
in interfaceGroupOrBuilder
- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()
A user-assigned name for this group, used only for display purposes.
string display_name = 2;
- Specified by:
getDisplayNameBytes
in interfaceGroupOrBuilder
- Returns:
- The bytes for displayName.
-
setDisplayName
public Group.Builder setDisplayName(String value)
A user-assigned name for this group, used only for display purposes.
string display_name = 2;
- Parameters:
value
- The displayName to set.- Returns:
- This builder for chaining.
-
clearDisplayName
public Group.Builder clearDisplayName()
A user-assigned name for this group, used only for display purposes.
string display_name = 2;
- Returns:
- This builder for chaining.
-
setDisplayNameBytes
public Group.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
A user-assigned name for this group, used only for display purposes.
string display_name = 2;
- Parameters:
value
- The bytes for displayName to set.- Returns:
- This builder for chaining.
-
getParentName
public String getParentName()
The name of the group's parent, if it has one. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] For groups with no parent, `parent_name` is the empty string, `""`.
string parent_name = 3;
- Specified by:
getParentName
in interfaceGroupOrBuilder
- Returns:
- The parentName.
-
getParentNameBytes
public com.google.protobuf.ByteString getParentNameBytes()
The name of the group's parent, if it has one. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] For groups with no parent, `parent_name` is the empty string, `""`.
string parent_name = 3;
- Specified by:
getParentNameBytes
in interfaceGroupOrBuilder
- Returns:
- The bytes for parentName.
-
setParentName
public Group.Builder setParentName(String value)
The name of the group's parent, if it has one. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] For groups with no parent, `parent_name` is the empty string, `""`.
string parent_name = 3;
- Parameters:
value
- The parentName to set.- Returns:
- This builder for chaining.
-
clearParentName
public Group.Builder clearParentName()
The name of the group's parent, if it has one. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] For groups with no parent, `parent_name` is the empty string, `""`.
string parent_name = 3;
- Returns:
- This builder for chaining.
-
setParentNameBytes
public Group.Builder setParentNameBytes(com.google.protobuf.ByteString value)
The name of the group's parent, if it has one. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] For groups with no parent, `parent_name` is the empty string, `""`.
string parent_name = 3;
- Parameters:
value
- The bytes for parentName to set.- Returns:
- This builder for chaining.
-
getFilter
public String getFilter()
The filter used to determine which monitored resources belong to this group.
string filter = 5;
- Specified by:
getFilter
in interfaceGroupOrBuilder
- Returns:
- The filter.
-
getFilterBytes
public com.google.protobuf.ByteString getFilterBytes()
The filter used to determine which monitored resources belong to this group.
string filter = 5;
- Specified by:
getFilterBytes
in interfaceGroupOrBuilder
- Returns:
- The bytes for filter.
-
setFilter
public Group.Builder setFilter(String value)
The filter used to determine which monitored resources belong to this group.
string filter = 5;
- Parameters:
value
- The filter to set.- Returns:
- This builder for chaining.
-
clearFilter
public Group.Builder clearFilter()
The filter used to determine which monitored resources belong to this group.
string filter = 5;
- Returns:
- This builder for chaining.
-
setFilterBytes
public Group.Builder setFilterBytes(com.google.protobuf.ByteString value)
The filter used to determine which monitored resources belong to this group.
string filter = 5;
- Parameters:
value
- The bytes for filter to set.- Returns:
- This builder for chaining.
-
getIsCluster
public boolean getIsCluster()
If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters.
bool is_cluster = 6;
- Specified by:
getIsCluster
in interfaceGroupOrBuilder
- Returns:
- The isCluster.
-
setIsCluster
public Group.Builder setIsCluster(boolean value)
If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters.
bool is_cluster = 6;
- Parameters:
value
- The isCluster to set.- Returns:
- This builder for chaining.
-
clearIsCluster
public Group.Builder clearIsCluster()
If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters.
bool is_cluster = 6;
- Returns:
- This builder for chaining.
-
setUnknownFields
public final Group.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
mergeUnknownFields
public final Group.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Group.Builder>
-
-