public final class Cohort extends GeneratedMessage 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
Inherited Members
com.google.protobuf.GeneratedMessage.<ContainingT,T>newFileScopedGeneratedExtension(java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ContainingT,T>newMessageScopedGeneratedExtension(com.google.protobuf.Message,int,java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessage.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessage.<V>serializeBooleanMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Boolean,V>,com.google.protobuf.MapEntry<java.lang.Boolean,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeIntegerMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Integer,V>,com.google.protobuf.MapEntry<java.lang.Integer,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeLongMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Long,V>,com.google.protobuf.MapEntry<java.lang.Long,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeStringMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.String,V>,com.google.protobuf.MapEntry<java.lang.String,V>,int)
com.google.protobuf.GeneratedMessage.canUseUnsafe()
com.google.protobuf.GeneratedMessage.emptyBooleanList()
com.google.protobuf.GeneratedMessage.emptyDoubleList()
com.google.protobuf.GeneratedMessage.emptyFloatList()
com.google.protobuf.GeneratedMessage.emptyIntList()
com.google.protobuf.GeneratedMessage.emptyLongList()
com.google.protobuf.GeneratedMessage.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.isStringEmpty(java.lang.Object)
com.google.protobuf.GeneratedMessage.mergeFromAndMakeImmutableInternal(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite)
com.google.protobuf.GeneratedMessage.newInstance(com.google.protobuf.GeneratedMessage.UnusedPrivateParameter)
com.google.protobuf.GeneratedMessage.parseUnknownFieldProto3(com.google.protobuf.CodedInputStream,com.google.protobuf.UnknownFieldSet.Builder,com.google.protobuf.ExtensionRegistryLite,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.v1beta.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.v1beta.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.v1beta.DateRange date_range = 3;
| Returns |
| Type |
Description |
boolean |
Whether the dateRange field is set.
|
hashCode()
| Returns |
| Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Cohort.Builder newBuilderForType()
newBuilderForType(AbstractMessage.BuilderParent parent)
protected Cohort.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Overrides
toBuilder()
public Cohort.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides