public enum CalendarPeriod extends java.lang.Enum<CalendarPeriod> implements ProtocolMessageEnum
A `CalendarPeriod` represents the abstract concept of a time period that has a canonical start. Grammatically, "the start of the current `CalendarPeriod`." All calendar times begin at midnight UTC.Protobuf enum
google.type.CalendarPeriod
Enum Constant and Description |
---|
CALENDAR_PERIOD_UNSPECIFIED
Undefined period, raises an error.
|
DAY
A day.
|
FORTNIGHT
A fortnight.
|
HALF
A half-year.
|
MONTH
A month.
|
QUARTER
A quarter.
|
UNRECOGNIZED |
WEEK
A week.
|
YEAR
A year.
|
Modifier and Type | Field and Description |
---|---|
static int |
CALENDAR_PERIOD_UNSPECIFIED_VALUE
Undefined period, raises an error.
|
static int |
DAY_VALUE
A day.
|
static int |
FORTNIGHT_VALUE
A fortnight.
|
static int |
HALF_VALUE
A half-year.
|
static int |
MONTH_VALUE
A month.
|
static int |
QUARTER_VALUE
A quarter.
|
static int |
WEEK_VALUE
A week.
|
static int |
YEAR_VALUE
A year.
|
Modifier and Type | Method and Description |
---|---|
static CalendarPeriod |
forNumber(int value) |
static Descriptors.EnumDescriptor |
getDescriptor() |
Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static Internal.EnumLiteMap<CalendarPeriod> |
internalGetValueMap() |
static CalendarPeriod |
valueOf(Descriptors.EnumValueDescriptor desc) |
static CalendarPeriod |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static CalendarPeriod |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CalendarPeriod[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CalendarPeriod CALENDAR_PERIOD_UNSPECIFIED
Undefined period, raises an error.
CALENDAR_PERIOD_UNSPECIFIED = 0;
public static final CalendarPeriod DAY
A day.
DAY = 1;
public static final CalendarPeriod WEEK
A week. Weeks begin on Monday, following [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
WEEK = 2;
public static final CalendarPeriod FORTNIGHT
A fortnight. The first calendar fortnight of the year begins at the start of week 1 according to [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
FORTNIGHT = 3;
public static final CalendarPeriod MONTH
A month.
MONTH = 4;
public static final CalendarPeriod QUARTER
A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each year.
QUARTER = 5;
public static final CalendarPeriod HALF
A half-year. Half-years start on dates 1-Jan and 1-Jul.
HALF = 6;
public static final CalendarPeriod YEAR
A year.
YEAR = 7;
public static final CalendarPeriod UNRECOGNIZED
public static final int CALENDAR_PERIOD_UNSPECIFIED_VALUE
Undefined period, raises an error.
CALENDAR_PERIOD_UNSPECIFIED = 0;
public static final int DAY_VALUE
A day.
DAY = 1;
public static final int WEEK_VALUE
A week. Weeks begin on Monday, following [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
WEEK = 2;
public static final int FORTNIGHT_VALUE
A fortnight. The first calendar fortnight of the year begins at the start of week 1 according to [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
FORTNIGHT = 3;
public static final int MONTH_VALUE
A month.
MONTH = 4;
public static final int QUARTER_VALUE
A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each year.
QUARTER = 5;
public static final int HALF_VALUE
A half-year. Half-years start on dates 1-Jan and 1-Jul.
HALF = 6;
public static final int YEAR_VALUE
A year.
YEAR = 7;
public static CalendarPeriod[] values()
for (CalendarPeriod c : CalendarPeriod.values()) System.out.println(c);
public static CalendarPeriod valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic final int getNumber()
getNumber
in interface Internal.EnumLite
getNumber
in interface ProtocolMessageEnum
@Deprecated public static CalendarPeriod valueOf(int value)
forNumber(int)
instead.public static CalendarPeriod forNumber(int value)
public static Internal.EnumLiteMap<CalendarPeriod> internalGetValueMap()
public final Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor
in interface ProtocolMessageEnum
public final Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType
in interface ProtocolMessageEnum
public static final Descriptors.EnumDescriptor getDescriptor()
public static CalendarPeriod valueOf(Descriptors.EnumValueDescriptor desc)