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.v1alpha.Cohort
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
DATE_RANGE_FIELD_NUMBER
public static final int DATE_RANGE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
DIMENSION_FIELD_NUMBER
public static final int DIMENSION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Cohort getDefaultInstance()
Returns |
Type |
Description |
Cohort |
|
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Cohort.Builder newBuilder()
newBuilder(Cohort prototype)
public static Cohort.Builder newBuilder(Cohort prototype)
Parameter |
Name |
Description |
prototype |
Cohort
|
public static Cohort parseDelimitedFrom(InputStream input)
Returns |
Type |
Description |
Cohort |
|
public static Cohort parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Cohort |
|
parseFrom(byte[] data)
public static Cohort parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
Returns |
Type |
Description |
Cohort |
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Cohort parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Cohort |
|
parseFrom(ByteString data)
public static Cohort parseFrom(ByteString data)
Returns |
Type |
Description |
Cohort |
|
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Cohort parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Cohort |
|
public static Cohort parseFrom(CodedInputStream input)
Returns |
Type |
Description |
Cohort |
|
public static Cohort parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Cohort |
|
public static Cohort parseFrom(InputStream input)
Returns |
Type |
Description |
Cohort |
|
public static Cohort parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Cohort |
|
parseFrom(ByteBuffer data)
public static Cohort parseFrom(ByteBuffer data)
Returns |
Type |
Description |
Cohort |
|
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Cohort parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Cohort |
|
parser()
public static Parser<Cohort> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
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.v1alpha.DateRange date_range = 3;
Returns |
Type |
Description |
DateRange |
The dateRange.
|
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;
getDefaultInstanceForType()
public Cohort getDefaultInstanceForType()
Returns |
Type |
Description |
Cohort |
|
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 |
Type |
Description |
ByteString |
The bytes for dimension.
|
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 |
Type |
Description |
ByteString |
The bytes for name.
|
getParserForType()
public Parser<Cohort> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
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.v1alpha.DateRange date_range = 3;
Returns |
Type |
Description |
boolean |
Whether the dateRange field is set.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Cohort.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Cohort.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public Cohort.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides