public static final class Cohort.Builder extends GeneratedMessageV3.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.v1beta.Cohort
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Cohort.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
buildPartial()
public Cohort buildPartial()
clear()
public Cohort.Builder clear()
Overrides
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.v1beta.DateRange date_range = 3;
clearDimension()
public Cohort.Builder clearDimension()
Dimension used by the cohort. Required and only supports
firstSessionDate
.
string dimension = 2;
clearField(Descriptors.FieldDescriptor field)
public Cohort.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
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;
clearOneof(Descriptors.OneofDescriptor oneof)
public Cohort.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public Cohort.Builder clone()
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.
|
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.v1beta.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.v1beta.DateRange date_range = 3;
getDefaultInstanceForType()
public Cohort getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
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.
|
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.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeDateRange(DateRange value)
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.v1beta.DateRange date_range = 3;
mergeFrom(Cohort other)
public Cohort.Builder mergeFrom(Cohort other)
Parameter |
---|
Name | Description |
other | Cohort
|
public Cohort.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public Cohort.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Cohort.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setDateRange(DateRange value)
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.v1beta.DateRange date_range = 3;
setDateRange(DateRange.Builder builderForValue)
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.v1beta.DateRange date_range = 3;
setDimension(String value)
public Cohort.Builder setDimension(String value)
Dimension used by the cohort. Required and only supports
firstSessionDate
.
string dimension = 2;
Parameter |
---|
Name | Description |
value | String
The dimension to set.
|
setDimensionBytes(ByteString value)
public Cohort.Builder setDimensionBytes(ByteString value)
Dimension used by the cohort. Required and only supports
firstSessionDate
.
string dimension = 2;
Parameter |
---|
Name | Description |
value | ByteString
The bytes for dimension to set.
|
setField(Descriptors.FieldDescriptor field, Object value)
public Cohort.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setName(String value)
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;
Parameter |
---|
Name | Description |
value | String
The name to set.
|
setNameBytes(ByteString value)
public Cohort.Builder setNameBytes(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;
Parameter |
---|
Name | Description |
value | ByteString
The bytes for name to set.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Cohort.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Cohort.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides