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()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Cohort.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public Cohort buildPartial()
Returns
clear()
public Cohort.Builder clear()
Returns
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;
Returns
clearDimension()
public Cohort.Builder clearDimension()
Dimension used by the cohort. Required and only supports
firstSessionDate
.
string dimension = 2;
Returns
clearField(Descriptors.FieldDescriptor field)
public Cohort.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
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;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public Cohort.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public Cohort.Builder clone()
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
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;
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
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
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
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
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()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
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;
Parameter
Returns
mergeFrom(Cohort other)
public Cohort.Builder mergeFrom(Cohort other)
Parameter
Returns
public Cohort.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Cohort.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Cohort.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
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;
Parameter
Returns
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;
Parameter
Returns
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.
|
Returns
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.
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public Cohort.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
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.
|
Returns
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.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Cohort.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Cohort.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides