public final class ServiceLevelObjective extends GeneratedMessageV3 implements ServiceLevelObjectiveOrBuilder
A Service-Level Objective (SLO) describes a level of desired good service. It
consists of a service-level indicator (SLI), a performance goal, and a period
over which the objective is to be evaluated against that goal. The SLO can
use SLIs defined in a number of different manners. Typical SLOs might include
"99% of requests in each rolling week have latency below 200 milliseconds" or
"99.5% of requests in each calendar month return successfully."
Protobuf type google.monitoring.v3.ServiceLevelObjective
Static Fields
CALENDAR_PERIOD_FIELD_NUMBER
public static final int CALENDAR_PERIOD_FIELD_NUMBER
Field Value
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
GOAL_FIELD_NUMBER
public static final int GOAL_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
ROLLING_PERIOD_FIELD_NUMBER
public static final int ROLLING_PERIOD_FIELD_NUMBER
Field Value
SERVICE_LEVEL_INDICATOR_FIELD_NUMBER
public static final int SERVICE_LEVEL_INDICATOR_FIELD_NUMBER
Field Value
USER_LABELS_FIELD_NUMBER
public static final int USER_LABELS_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static ServiceLevelObjective getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static ServiceLevelObjective.Builder newBuilder()
Returns
newBuilder(ServiceLevelObjective prototype)
public static ServiceLevelObjective.Builder newBuilder(ServiceLevelObjective prototype)
Parameter
Returns
public static ServiceLevelObjective parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static ServiceLevelObjective parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static ServiceLevelObjective parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ServiceLevelObjective parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static ServiceLevelObjective parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ServiceLevelObjective parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static ServiceLevelObjective parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static ServiceLevelObjective parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static ServiceLevelObjective parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static ServiceLevelObjective parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static ServiceLevelObjective parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ServiceLevelObjective parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<ServiceLevelObjective> parser()
Returns
Methods
containsUserLabels(String key)
public boolean containsUserLabels(String key)
Labels which have been used to annotate the service-level objective. Label
keys must start with a letter. Label keys and values may contain lowercase
letters, numbers, underscores, and dashes. Label keys and values have a
maximum length of 63 characters, and must be less than 128 bytes in size.
Up to 64 label entries may be stored. For labels which do not have a
semantic value, the empty string may be supplied for the label value.
map<string, string> user_labels = 12;
Parameter
Returns
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getCalendarPeriod()
public CalendarPeriod getCalendarPeriod()
A calendar period, semantically "since the start of the current
<calendar_period>
". At this time, only DAY
, WEEK
, FORTNIGHT
, and
MONTH
are supported.
.google.type.CalendarPeriod calendar_period = 6;
Returns
Type | Description |
com.google.type.CalendarPeriod | The calendarPeriod.
|
getCalendarPeriodValue()
public int getCalendarPeriodValue()
A calendar period, semantically "since the start of the current
<calendar_period>
". At this time, only DAY
, WEEK
, FORTNIGHT
, and
MONTH
are supported.
.google.type.CalendarPeriod calendar_period = 6;
Returns
Type | Description |
int | The enum numeric value on the wire for calendarPeriod.
|
getDefaultInstanceForType()
public ServiceLevelObjective getDefaultInstanceForType()
Returns
getDisplayName()
public String getDisplayName()
Name used for UI elements listing this SLO.
string display_name = 11;
Returns
Type | Description |
String | The displayName.
|
getDisplayNameBytes()
public ByteString getDisplayNameBytes()
Name used for UI elements listing this SLO.
string display_name = 11;
Returns
Type | Description |
ByteString | The bytes for displayName.
|
getGoal()
The fraction of service that must be good in order for this objective to be
met. 0 < goal <= 0.999
.
double goal = 4;
Returns
Type | Description |
double | The goal.
|
getName()
Resource name for this ServiceLevelObjective
. The format is:
projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
string name = 1;
Returns
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
Resource name for this ServiceLevelObjective
. The format is:
projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
string name = 1;
Returns
getParserForType()
public Parser<ServiceLevelObjective> getParserForType()
Returns
Overrides
getPeriodCase()
public ServiceLevelObjective.PeriodCase getPeriodCase()
Returns
getRollingPeriod()
public Duration getRollingPeriod()
A rolling time period, semantically "in the past <rolling_period>
".
Must be an integer multiple of 1 day no larger than 30 days.
.google.protobuf.Duration rolling_period = 5;
Returns
Type | Description |
Duration | The rollingPeriod.
|
getRollingPeriodOrBuilder()
public DurationOrBuilder getRollingPeriodOrBuilder()
A rolling time period, semantically "in the past <rolling_period>
".
Must be an integer multiple of 1 day no larger than 30 days.
.google.protobuf.Duration rolling_period = 5;
Returns
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getServiceLevelIndicator()
public ServiceLevelIndicator getServiceLevelIndicator()
The definition of good service, used to measure and calculate the quality
of the Service
's performance with respect to a single aspect of service
quality.
.google.monitoring.v3.ServiceLevelIndicator service_level_indicator = 3;
Returns
getServiceLevelIndicatorOrBuilder()
public ServiceLevelIndicatorOrBuilder getServiceLevelIndicatorOrBuilder()
The definition of good service, used to measure and calculate the quality
of the Service
's performance with respect to a single aspect of service
quality.
.google.monitoring.v3.ServiceLevelIndicator service_level_indicator = 3;
Returns
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
getUserLabels()
public Map<String,String> getUserLabels()
Returns
getUserLabelsCount()
public int getUserLabelsCount()
Labels which have been used to annotate the service-level objective. Label
keys must start with a letter. Label keys and values may contain lowercase
letters, numbers, underscores, and dashes. Label keys and values have a
maximum length of 63 characters, and must be less than 128 bytes in size.
Up to 64 label entries may be stored. For labels which do not have a
semantic value, the empty string may be supplied for the label value.
map<string, string> user_labels = 12;
Returns
getUserLabelsMap()
public Map<String,String> getUserLabelsMap()
Labels which have been used to annotate the service-level objective. Label
keys must start with a letter. Label keys and values may contain lowercase
letters, numbers, underscores, and dashes. Label keys and values have a
maximum length of 63 characters, and must be less than 128 bytes in size.
Up to 64 label entries may be stored. For labels which do not have a
semantic value, the empty string may be supplied for the label value.
map<string, string> user_labels = 12;
Returns
getUserLabelsOrDefault(String key, String defaultValue)
public String getUserLabelsOrDefault(String key, String defaultValue)
Labels which have been used to annotate the service-level objective. Label
keys must start with a letter. Label keys and values may contain lowercase
letters, numbers, underscores, and dashes. Label keys and values have a
maximum length of 63 characters, and must be less than 128 bytes in size.
Up to 64 label entries may be stored. For labels which do not have a
semantic value, the empty string may be supplied for the label value.
map<string, string> user_labels = 12;
Parameters
Returns
getUserLabelsOrThrow(String key)
public String getUserLabelsOrThrow(String key)
Labels which have been used to annotate the service-level objective. Label
keys must start with a letter. Label keys and values may contain lowercase
letters, numbers, underscores, and dashes. Label keys and values have a
maximum length of 63 characters, and must be less than 128 bytes in size.
Up to 64 label entries may be stored. For labels which do not have a
semantic value, the empty string may be supplied for the label value.
map<string, string> user_labels = 12;
Parameter
Returns
hasCalendarPeriod()
public boolean hasCalendarPeriod()
A calendar period, semantically "since the start of the current
<calendar_period>
". At this time, only DAY
, WEEK
, FORTNIGHT
, and
MONTH
are supported.
.google.type.CalendarPeriod calendar_period = 6;
Returns
Type | Description |
boolean | Whether the calendarPeriod field is set.
|
hasRollingPeriod()
public boolean hasRollingPeriod()
A rolling time period, semantically "in the past <rolling_period>
".
Must be an integer multiple of 1 day no larger than 30 days.
.google.protobuf.Duration rolling_period = 5;
Returns
Type | Description |
boolean | Whether the rollingPeriod field is set.
|
hasServiceLevelIndicator()
public boolean hasServiceLevelIndicator()
The definition of good service, used to measure and calculate the quality
of the Service
's performance with respect to a single aspect of service
quality.
.google.monitoring.v3.ServiceLevelIndicator service_level_indicator = 3;
Returns
Type | Description |
boolean | Whether the serviceLevelIndicator field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public ServiceLevelObjective.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ServiceLevelObjective.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public ServiceLevelObjective.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions