Class Cohort.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Cohort.Builder>
com.google.analytics.data.v1alpha.Cohort.Builder
All Implemented Interfaces:
CohortOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Cohort

public static final class Cohort.Builder extends com.google.protobuf.GeneratedMessage.Builder<Cohort.Builder> implements CohortOrBuilder
 Defines a cohort selection criteria. A cohort is a group of users who share
 a common characteristic. For example, users with the same `firstSessionDate`
 belong to the same cohort.
 
Protobuf type google.analytics.data.v1alpha.Cohort
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    The cohort selects users whose first touch date is between start date and end date defined in the `dateRange`.
    Dimension used by the cohort.
    Assigns a name to this cohort.
    The cohort selects users whose first touch date is between start date and end date defined in the `dateRange`.
    The cohort selects users whose first touch date is between start date and end date defined in the `dateRange`.
    The cohort selects users whose first touch date is between start date and end date defined in the `dateRange`.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    Dimension used by the cohort.
    com.google.protobuf.ByteString
    Dimension used by the cohort.
    Assigns a name to this cohort.
    com.google.protobuf.ByteString
    Assigns a name to this cohort.
    boolean
    The cohort selects users whose first touch date is between start date and end date defined in the `dateRange`.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    The cohort selects users whose first touch date is between start date and end date defined in the `dateRange`.
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    The cohort selects users whose first touch date is between start date and end date defined in the `dateRange`.
    The cohort selects users whose first touch date is between start date and end date defined in the `dateRange`.
    Dimension used by the cohort.
    setDimensionBytes(com.google.protobuf.ByteString value)
    Dimension used by the cohort.
    setName(String value)
    Assigns a name to this cohort.
    setNameBytes(com.google.protobuf.ByteString value)
    Assigns a name to this cohort.

    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<Cohort.Builder>
    • clear

      public Cohort.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<Cohort.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<Cohort.Builder>
    • getDefaultInstanceForType

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

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

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

      public Cohort.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<Cohort.Builder>
    • mergeFrom

      public Cohort.Builder mergeFrom(Cohort other)
    • isInitialized

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

      public Cohort.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<Cohort.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Assigns a name to this cohort. The dimension `cohort` is valued to this
       name in a report response. If set, cannot begin with `cohort_` or
       `RESERVED_`. If not set, cohorts are named by their zero based index
       `cohort_0`, `cohort_1`, etc.
       
      string name = 1;
      Specified by:
      getName in interface CohortOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Assigns a name to this cohort. The dimension `cohort` is valued to this
       name in a report response. If set, cannot begin with `cohort_` or
       `RESERVED_`. If not set, cohorts are named by their zero based index
       `cohort_0`, `cohort_1`, etc.
       
      string name = 1;
      Specified by:
      getNameBytes in interface CohortOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Cohort.Builder setName(String value)
       Assigns a name to this cohort. The dimension `cohort` is valued to this
       name in a report response. If set, cannot begin with `cohort_` or
       `RESERVED_`. If not set, cohorts are named by their zero based index
       `cohort_0`, `cohort_1`, etc.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Cohort.Builder clearName()
       Assigns a name to this cohort. The dimension `cohort` is valued to this
       name in a report response. If set, cannot begin with `cohort_` or
       `RESERVED_`. If not set, cohorts are named by their zero based index
       `cohort_0`, `cohort_1`, etc.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Cohort.Builder setNameBytes(com.google.protobuf.ByteString value)
       Assigns a name to this cohort. The dimension `cohort` is valued to this
       name in a report response. If set, cannot begin with `cohort_` or
       `RESERVED_`. If not set, cohorts are named by their zero based index
       `cohort_0`, `cohort_1`, etc.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDimension

      public String getDimension()
       Dimension used by the cohort. Required and only supports
       `firstSessionDate`.
       
      string dimension = 2;
      Specified by:
      getDimension in interface CohortOrBuilder
      Returns:
      The dimension.
    • getDimensionBytes

      public com.google.protobuf.ByteString getDimensionBytes()
       Dimension used by the cohort. Required and only supports
       `firstSessionDate`.
       
      string dimension = 2;
      Specified by:
      getDimensionBytes in interface CohortOrBuilder
      Returns:
      The bytes for dimension.
    • setDimension

      public Cohort.Builder setDimension(String value)
       Dimension used by the cohort. Required and only supports
       `firstSessionDate`.
       
      string dimension = 2;
      Parameters:
      value - The dimension to set.
      Returns:
      This builder for chaining.
    • clearDimension

      public Cohort.Builder clearDimension()
       Dimension used by the cohort. Required and only supports
       `firstSessionDate`.
       
      string dimension = 2;
      Returns:
      This builder for chaining.
    • setDimensionBytes

      public Cohort.Builder setDimensionBytes(com.google.protobuf.ByteString value)
       Dimension used by the cohort. Required and only supports
       `firstSessionDate`.
       
      string dimension = 2;
      Parameters:
      value - The bytes for dimension to set.
      Returns:
      This builder for chaining.
    • hasDateRange

      public boolean hasDateRange()
       The cohort selects users whose first touch date is between start date and
       end date defined in the `dateRange`. This `dateRange` does not specify the
       full date range of event data that is present in a cohort report. In a
       cohort report, this `dateRange` is extended by the granularity and offset
       present in the `cohortsRange`; event data for the extended reporting date
       range is present in a cohort report.
      
       In a cohort request, this `dateRange` is required and the `dateRanges` in
       the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
      
       This `dateRange` should generally be aligned with the cohort's granularity.
       If `CohortsRange` uses daily granularity, this `dateRange` can be a single
       day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
       aligned to a week boundary, starting at Sunday and ending Saturday. If
       `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
       a month, starting at the first and ending on the last day of the month.
       
      .google.analytics.data.v1alpha.DateRange date_range = 3;
      Specified by:
      hasDateRange in interface CohortOrBuilder
      Returns:
      Whether the dateRange field is set.
    • getDateRange

      public DateRange getDateRange()
       The cohort selects users whose first touch date is between start date and
       end date defined in the `dateRange`. This `dateRange` does not specify the
       full date range of event data that is present in a cohort report. In a
       cohort report, this `dateRange` is extended by the granularity and offset
       present in the `cohortsRange`; event data for the extended reporting date
       range is present in a cohort report.
      
       In a cohort request, this `dateRange` is required and the `dateRanges` in
       the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
      
       This `dateRange` should generally be aligned with the cohort's granularity.
       If `CohortsRange` uses daily granularity, this `dateRange` can be a single
       day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
       aligned to a week boundary, starting at Sunday and ending Saturday. If
       `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
       a month, starting at the first and ending on the last day of the month.
       
      .google.analytics.data.v1alpha.DateRange date_range = 3;
      Specified by:
      getDateRange in interface CohortOrBuilder
      Returns:
      The dateRange.
    • setDateRange

      public Cohort.Builder setDateRange(DateRange value)
       The cohort selects users whose first touch date is between start date and
       end date defined in the `dateRange`. This `dateRange` does not specify the
       full date range of event data that is present in a cohort report. In a
       cohort report, this `dateRange` is extended by the granularity and offset
       present in the `cohortsRange`; event data for the extended reporting date
       range is present in a cohort report.
      
       In a cohort request, this `dateRange` is required and the `dateRanges` in
       the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
      
       This `dateRange` should generally be aligned with the cohort's granularity.
       If `CohortsRange` uses daily granularity, this `dateRange` can be a single
       day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
       aligned to a week boundary, starting at Sunday and ending Saturday. If
       `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
       a month, starting at the first and ending on the last day of the month.
       
      .google.analytics.data.v1alpha.DateRange date_range = 3;
    • setDateRange

      public Cohort.Builder setDateRange(DateRange.Builder builderForValue)
       The cohort selects users whose first touch date is between start date and
       end date defined in the `dateRange`. This `dateRange` does not specify the
       full date range of event data that is present in a cohort report. In a
       cohort report, this `dateRange` is extended by the granularity and offset
       present in the `cohortsRange`; event data for the extended reporting date
       range is present in a cohort report.
      
       In a cohort request, this `dateRange` is required and the `dateRanges` in
       the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
      
       This `dateRange` should generally be aligned with the cohort's granularity.
       If `CohortsRange` uses daily granularity, this `dateRange` can be a single
       day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
       aligned to a week boundary, starting at Sunday and ending Saturday. If
       `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
       a month, starting at the first and ending on the last day of the month.
       
      .google.analytics.data.v1alpha.DateRange date_range = 3;
    • mergeDateRange

      public Cohort.Builder mergeDateRange(DateRange value)
       The cohort selects users whose first touch date is between start date and
       end date defined in the `dateRange`. This `dateRange` does not specify the
       full date range of event data that is present in a cohort report. In a
       cohort report, this `dateRange` is extended by the granularity and offset
       present in the `cohortsRange`; event data for the extended reporting date
       range is present in a cohort report.
      
       In a cohort request, this `dateRange` is required and the `dateRanges` in
       the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
      
       This `dateRange` should generally be aligned with the cohort's granularity.
       If `CohortsRange` uses daily granularity, this `dateRange` can be a single
       day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
       aligned to a week boundary, starting at Sunday and ending Saturday. If
       `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
       a month, starting at the first and ending on the last day of the month.
       
      .google.analytics.data.v1alpha.DateRange date_range = 3;
    • clearDateRange

      public Cohort.Builder clearDateRange()
       The cohort selects users whose first touch date is between start date and
       end date defined in the `dateRange`. This `dateRange` does not specify the
       full date range of event data that is present in a cohort report. In a
       cohort report, this `dateRange` is extended by the granularity and offset
       present in the `cohortsRange`; event data for the extended reporting date
       range is present in a cohort report.
      
       In a cohort request, this `dateRange` is required and the `dateRanges` in
       the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
      
       This `dateRange` should generally be aligned with the cohort's granularity.
       If `CohortsRange` uses daily granularity, this `dateRange` can be a single
       day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
       aligned to a week boundary, starting at Sunday and ending Saturday. If
       `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
       a month, starting at the first and ending on the last day of the month.
       
      .google.analytics.data.v1alpha.DateRange date_range = 3;
    • getDateRangeBuilder

      public DateRange.Builder getDateRangeBuilder()
       The cohort selects users whose first touch date is between start date and
       end date defined in the `dateRange`. This `dateRange` does not specify the
       full date range of event data that is present in a cohort report. In a
       cohort report, this `dateRange` is extended by the granularity and offset
       present in the `cohortsRange`; event data for the extended reporting date
       range is present in a cohort report.
      
       In a cohort request, this `dateRange` is required and the `dateRanges` in
       the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
      
       This `dateRange` should generally be aligned with the cohort's granularity.
       If `CohortsRange` uses daily granularity, this `dateRange` can be a single
       day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
       aligned to a week boundary, starting at Sunday and ending Saturday. If
       `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
       a month, starting at the first and ending on the last day of the month.
       
      .google.analytics.data.v1alpha.DateRange date_range = 3;
    • getDateRangeOrBuilder

      public DateRangeOrBuilder getDateRangeOrBuilder()
       The cohort selects users whose first touch date is between start date and
       end date defined in the `dateRange`. This `dateRange` does not specify the
       full date range of event data that is present in a cohort report. In a
       cohort report, this `dateRange` is extended by the granularity and offset
       present in the `cohortsRange`; event data for the extended reporting date
       range is present in a cohort report.
      
       In a cohort request, this `dateRange` is required and the `dateRanges` in
       the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
      
       This `dateRange` should generally be aligned with the cohort's granularity.
       If `CohortsRange` uses daily granularity, this `dateRange` can be a single
       day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
       aligned to a week boundary, starting at Sunday and ending Saturday. If
       `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
       a month, starting at the first and ending on the last day of the month.
       
      .google.analytics.data.v1alpha.DateRange date_range = 3;
      Specified by:
      getDateRangeOrBuilder in interface CohortOrBuilder