public final class Cohort extends GeneratedMessageV3 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.v1beta.Cohort
Static Fields
DATE_RANGE_FIELD_NUMBER
public static final int DATE_RANGE_FIELD_NUMBER
Field Value
DIMENSION_FIELD_NUMBER
public static final int DIMENSION_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Cohort getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static Cohort.Builder newBuilder()
Returns
newBuilder(Cohort prototype)
public static Cohort.Builder newBuilder(Cohort prototype)
Parameter
Name | Description |
prototype | Cohort
|
Returns
public static Cohort parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Cohort parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Cohort parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Cohort parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Cohort parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Cohort parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Cohort parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Cohort parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Cohort parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Cohort parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Cohort parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Cohort parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Cohort> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
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.v1beta.DateRange date_range = 3;
Returns
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.v1beta.DateRange date_range = 3;
Returns
getDefaultInstanceForType()
public Cohort getDefaultInstanceForType()
Returns
getDimension()
public String getDimension()
Dimension used by the cohort. Required and only supports
firstSessionDate
.
string dimension = 2;
Returns
Type | Description |
String | The dimension.
|
getDimensionBytes()
public ByteString getDimensionBytes()
Dimension used by the cohort. Required and only supports
firstSessionDate
.
string dimension = 2;
Returns
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;
Returns
Type | Description |
String | The name.
|
getNameBytes()
public 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;
Returns
getParserForType()
public Parser<Cohort> getParserForType()
Returns
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
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.v1beta.DateRange date_range = 3;
Returns
Type | Description |
boolean | Whether the dateRange field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public Cohort.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Cohort.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public Cohort.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions