Package com.google.type
Enum CalendarPeriod
- java.lang.Object
-
- java.lang.Enum<CalendarPeriod>
-
- com.google.type.CalendarPeriod
-
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite
,com.google.protobuf.ProtocolMessageEnum
,java.io.Serializable
,java.lang.Comparable<CalendarPeriod>
public enum CalendarPeriod extends java.lang.Enum<CalendarPeriod> implements com.google.protobuf.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 enumgoogle.type.CalendarPeriod
-
-
Enum Constant Summary
Enum Constants Enum Constant 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.
-
Field Summary
Fields Modifier and Type Field 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CalendarPeriod
forNumber(int value)
static com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor()
com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType()
int
getNumber()
com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap<CalendarPeriod>
internalGetValueMap()
static CalendarPeriod
valueOf(int value)
Deprecated.static CalendarPeriod
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Returns the enum constant of this type with the specified name.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.
-
-
-
Enum Constant Detail
-
CALENDAR_PERIOD_UNSPECIFIED
public static final CalendarPeriod CALENDAR_PERIOD_UNSPECIFIED
Undefined period, raises an error.
CALENDAR_PERIOD_UNSPECIFIED = 0;
-
DAY
public static final CalendarPeriod DAY
A day.
DAY = 1;
-
WEEK
public static final CalendarPeriod WEEK
A week. Weeks begin on Monday, following [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
WEEK = 2;
-
FORTNIGHT
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;
-
MONTH
public static final CalendarPeriod MONTH
A month.
MONTH = 4;
-
QUARTER
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;
-
HALF
public static final CalendarPeriod HALF
A half-year. Half-years start on dates 1-Jan and 1-Jul.
HALF = 6;
-
YEAR
public static final CalendarPeriod YEAR
A year.
YEAR = 7;
-
UNRECOGNIZED
public static final CalendarPeriod UNRECOGNIZED
-
-
Field Detail
-
CALENDAR_PERIOD_UNSPECIFIED_VALUE
public static final int CALENDAR_PERIOD_UNSPECIFIED_VALUE
Undefined period, raises an error.
CALENDAR_PERIOD_UNSPECIFIED = 0;
- See Also:
- Constant Field Values
-
DAY_VALUE
public static final int DAY_VALUE
A day.
DAY = 1;
- See Also:
- Constant Field Values
-
WEEK_VALUE
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;
- See Also:
- Constant Field Values
-
FORTNIGHT_VALUE
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;
- See Also:
- Constant Field Values
-
MONTH_VALUE
public static final int MONTH_VALUE
A month.
MONTH = 4;
- See Also:
- Constant Field Values
-
QUARTER_VALUE
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;
- See Also:
- Constant Field Values
-
HALF_VALUE
public static final int HALF_VALUE
A half-year. Half-years start on dates 1-Jan and 1-Jul.
HALF = 6;
- See Also:
- Constant Field Values
-
YEAR_VALUE
public static final int YEAR_VALUE
A year.
YEAR = 7;
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static CalendarPeriod[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CalendarPeriod c : CalendarPeriod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CalendarPeriod valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getNumber
public final int getNumber()
- Specified by:
getNumber
in interfacecom.google.protobuf.Internal.EnumLite
- Specified by:
getNumber
in interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
@Deprecated public static CalendarPeriod valueOf(int value)
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
value
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
forNumber
public static CalendarPeriod forNumber(int value)
- Parameters:
value
- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<CalendarPeriod> internalGetValueMap()
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
- Specified by:
getValueDescriptor
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
-
valueOf
public static CalendarPeriod valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
desc
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-