public static final class CohortSpec.Builder extends GeneratedMessageV3.Builder<CohortSpec.Builder> implements CohortSpecOrBuilder
The specification of cohorts for a cohort report.
Cohort reports create a time series of user retention for the cohort. For
example, you could select the cohort of users that were acquired in the first
week of September and follow that cohort for the next six weeks. Selecting
the users acquired in the first week of September cohort is specified in the
cohort
object. Following that cohort for the next six weeks is specified in
the cohortsRange
object.
For examples, see Cohort Report
Examples.
The report response could show a weekly time series where say your app has
retained 60% of this cohort after three weeks and 25% of this cohort after
six weeks. These two percentages can be calculated by the metric
cohortActiveUsers/cohortTotalUsers
and will be separate rows in the report.
Protobuf type google.analytics.data.v1beta.CohortSpec
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
addAllCohorts(Iterable<? extends Cohort> values)
public CohortSpec.Builder addAllCohorts(Iterable<? extends Cohort> values)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Parameter |
---|
Name | Description |
values | Iterable<? extends com.google.analytics.data.v1beta.Cohort>
|
addCohorts(Cohort value)
public CohortSpec.Builder addCohorts(Cohort value)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Parameter |
---|
Name | Description |
value | Cohort
|
addCohorts(Cohort.Builder builderForValue)
public CohortSpec.Builder addCohorts(Cohort.Builder builderForValue)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
addCohorts(int index, Cohort value)
public CohortSpec.Builder addCohorts(int index, Cohort value)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
addCohorts(int index, Cohort.Builder builderForValue)
public CohortSpec.Builder addCohorts(int index, Cohort.Builder builderForValue)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
addCohortsBuilder()
public Cohort.Builder addCohortsBuilder()
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
addCohortsBuilder(int index)
public Cohort.Builder addCohortsBuilder(int index)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Parameter |
---|
Name | Description |
index | int
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CohortSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public CohortSpec build()
buildPartial()
public CohortSpec buildPartial()
clear()
public CohortSpec.Builder clear()
Overrides
clearCohortReportSettings()
public CohortSpec.Builder clearCohortReportSettings()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
clearCohorts()
public CohortSpec.Builder clearCohorts()
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
clearCohortsRange()
public CohortSpec.Builder clearCohortsRange()
Cohort reports follow cohorts over an extended reporting date range. This
range specifies an offset duration to follow the cohorts over.
.google.analytics.data.v1beta.CohortsRange cohorts_range = 2;
clearField(Descriptors.FieldDescriptor field)
public CohortSpec.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public CohortSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public CohortSpec.Builder clone()
Overrides
getCohortReportSettings()
public CohortReportSettings getCohortReportSettings()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
getCohortReportSettingsBuilder()
public CohortReportSettings.Builder getCohortReportSettingsBuilder()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
getCohortReportSettingsOrBuilder()
public CohortReportSettingsOrBuilder getCohortReportSettingsOrBuilder()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
getCohorts(int index)
public Cohort getCohorts(int index)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Parameter |
---|
Name | Description |
index | int
|
getCohortsBuilder(int index)
public Cohort.Builder getCohortsBuilder(int index)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Parameter |
---|
Name | Description |
index | int
|
getCohortsBuilderList()
public List<Cohort.Builder> getCohortsBuilderList()
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
getCohortsCount()
public int getCohortsCount()
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Returns |
---|
Type | Description |
int | |
getCohortsList()
public List<Cohort> getCohortsList()
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
getCohortsOrBuilder(int index)
public CohortOrBuilder getCohortsOrBuilder(int index)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Parameter |
---|
Name | Description |
index | int
|
getCohortsOrBuilderList()
public List<? extends CohortOrBuilder> getCohortsOrBuilderList()
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Returns |
---|
Type | Description |
List<? extends com.google.analytics.data.v1beta.CohortOrBuilder> | |
getCohortsRange()
public CohortsRange getCohortsRange()
Cohort reports follow cohorts over an extended reporting date range. This
range specifies an offset duration to follow the cohorts over.
.google.analytics.data.v1beta.CohortsRange cohorts_range = 2;
getCohortsRangeBuilder()
public CohortsRange.Builder getCohortsRangeBuilder()
Cohort reports follow cohorts over an extended reporting date range. This
range specifies an offset duration to follow the cohorts over.
.google.analytics.data.v1beta.CohortsRange cohorts_range = 2;
getCohortsRangeOrBuilder()
public CohortsRangeOrBuilder getCohortsRangeOrBuilder()
Cohort reports follow cohorts over an extended reporting date range. This
range specifies an offset duration to follow the cohorts over.
.google.analytics.data.v1beta.CohortsRange cohorts_range = 2;
getDefaultInstanceForType()
public CohortSpec getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
hasCohortReportSettings()
public boolean hasCohortReportSettings()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
Returns |
---|
Type | Description |
boolean | Whether the cohortReportSettings field is set.
|
hasCohortsRange()
public boolean hasCohortsRange()
Cohort reports follow cohorts over an extended reporting date range. This
range specifies an offset duration to follow the cohorts over.
.google.analytics.data.v1beta.CohortsRange cohorts_range = 2;
Returns |
---|
Type | Description |
boolean | Whether the cohortsRange field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeCohortReportSettings(CohortReportSettings value)
public CohortSpec.Builder mergeCohortReportSettings(CohortReportSettings value)
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
mergeCohortsRange(CohortsRange value)
public CohortSpec.Builder mergeCohortsRange(CohortsRange value)
Cohort reports follow cohorts over an extended reporting date range. This
range specifies an offset duration to follow the cohorts over.
.google.analytics.data.v1beta.CohortsRange cohorts_range = 2;
mergeFrom(CohortSpec other)
public CohortSpec.Builder mergeFrom(CohortSpec other)
public CohortSpec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public CohortSpec.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CohortSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
removeCohorts(int index)
public CohortSpec.Builder removeCohorts(int index)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Parameter |
---|
Name | Description |
index | int
|
setCohortReportSettings(CohortReportSettings value)
public CohortSpec.Builder setCohortReportSettings(CohortReportSettings value)
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
setCohortReportSettings(CohortReportSettings.Builder builderForValue)
public CohortSpec.Builder setCohortReportSettings(CohortReportSettings.Builder builderForValue)
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
setCohorts(int index, Cohort value)
public CohortSpec.Builder setCohorts(int index, Cohort value)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
setCohorts(int index, Cohort.Builder builderForValue)
public CohortSpec.Builder setCohorts(int index, Cohort.Builder builderForValue)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
setCohortsRange(CohortsRange value)
public CohortSpec.Builder setCohortsRange(CohortsRange value)
Cohort reports follow cohorts over an extended reporting date range. This
range specifies an offset duration to follow the cohorts over.
.google.analytics.data.v1beta.CohortsRange cohorts_range = 2;
setCohortsRange(CohortsRange.Builder builderForValue)
public CohortSpec.Builder setCohortsRange(CohortsRange.Builder builderForValue)
Cohort reports follow cohorts over an extended reporting date range. This
range specifies an offset duration to follow the cohorts over.
.google.analytics.data.v1beta.CohortsRange cohorts_range = 2;
setField(Descriptors.FieldDescriptor field, Object value)
public CohortSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CohortSpec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final CohortSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides