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()
Returns
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>
|
Returns
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
Returns
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;
Parameter
Returns
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;
Parameters
Returns
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;
Parameters
Returns
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;
Returns
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
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CohortSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public CohortSpec build()
Returns
buildPartial()
public CohortSpec buildPartial()
Returns
clear()
public CohortSpec.Builder clear()
Returns
Overrides
clearCohortReportSettings()
public CohortSpec.Builder clearCohortReportSettings()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
Returns
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;
Returns
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;
Returns
clearField(Descriptors.FieldDescriptor field)
public CohortSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public CohortSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public CohortSpec.Builder clone()
Returns
Overrides
getCohortReportSettings()
public CohortReportSettings getCohortReportSettings()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
Returns
getCohortReportSettingsBuilder()
public CohortReportSettings.Builder getCohortReportSettingsBuilder()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
Returns
getCohortReportSettingsOrBuilder()
public CohortReportSettingsOrBuilder getCohortReportSettingsOrBuilder()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
Returns
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
Returns
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
Returns
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;
Returns
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
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;
Returns
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
Returns
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;
Returns
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;
Returns
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;
Returns
getDefaultInstanceForType()
public CohortSpec getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
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()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
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;
Parameter
Returns
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;
Parameter
Returns
mergeFrom(CohortSpec other)
public CohortSpec.Builder mergeFrom(CohortSpec other)
Parameter
Returns
public CohortSpec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public CohortSpec.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CohortSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
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
Returns
setCohortReportSettings(CohortReportSettings value)
public CohortSpec.Builder setCohortReportSettings(CohortReportSettings value)
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
Parameter
Returns
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;
Parameter
Returns
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;
Parameters
Returns
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;
Parameters
Returns
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;
Parameter
Returns
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;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public CohortSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CohortSpec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final CohortSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides