Class Group.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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 type google.monitoring.v3.Group
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    A user-assigned name for this group, used only for display purposes.
    The filter used to determine which monitored resources belong to this group.
    If true, the members of this group are considered to be a cluster.
    Output only.
    The name of the group's parent, if it has one.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    A user-assigned name for this group, used only for display purposes.
    com.google.protobuf.ByteString
    A user-assigned name for this group, used only for display purposes.
    The filter used to determine which monitored resources belong to this group.
    com.google.protobuf.ByteString
    The filter used to determine which monitored resources belong to this group.
    boolean
    If true, the members of this group are considered to be a cluster.
    Output only.
    com.google.protobuf.ByteString
    Output only.
    The name of the group's parent, if it has one.
    com.google.protobuf.ByteString
    The name of the group's parent, if it has one.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    A user-assigned name for this group, used only for display purposes.
    setDisplayNameBytes(com.google.protobuf.ByteString value)
    A user-assigned name for this group, used only for display purposes.
    The filter used to determine which monitored resources belong to this group.
    setFilterBytes(com.google.protobuf.ByteString value)
    The filter used to determine which monitored resources belong to this group.
    setIsCluster(boolean value)
    If true, the members of this group are considered to be a cluster.
    setName(String value)
    Output only.
    setNameBytes(com.google.protobuf.ByteString value)
    Output only.
    The name of the group's parent, if it has one.
    setParentNameBytes(com.google.protobuf.ByteString value)
    The name of the group's parent, if it has one.

    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

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Group.Builder>
    • clear

      public Group.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Group.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Group.Builder>
    • getDefaultInstanceForType

      public Group getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Group build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Group buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Group.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Group.Builder>
    • mergeFrom

      public Group.Builder mergeFrom(Group other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Group.Builder>
    • mergeFrom

      public Group.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.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 interface GroupOrBuilder
      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 interface GroupOrBuilder
      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 interface GroupOrBuilder
      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 interface GroupOrBuilder
      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 interface GroupOrBuilder
      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 interface GroupOrBuilder
      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 interface GroupOrBuilder
      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 interface GroupOrBuilder
      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 interface GroupOrBuilder
      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.