Class ServiceLevelObjective (3.14.0)

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
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

GOAL_FIELD_NUMBER

public static final int GOAL_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

ROLLING_PERIOD_FIELD_NUMBER

public static final int ROLLING_PERIOD_FIELD_NUMBER
Field Value
TypeDescription
int

SERVICE_LEVEL_INDICATOR_FIELD_NUMBER

public static final int SERVICE_LEVEL_INDICATOR_FIELD_NUMBER
Field Value
TypeDescription
int

USER_LABELS_FIELD_NUMBER

public static final int USER_LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ServiceLevelObjective getDefaultInstance()
Returns
TypeDescription
ServiceLevelObjective

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static ServiceLevelObjective.Builder newBuilder()
Returns
TypeDescription
ServiceLevelObjective.Builder

newBuilder(ServiceLevelObjective prototype)

public static ServiceLevelObjective.Builder newBuilder(ServiceLevelObjective prototype)
Parameter
NameDescription
prototypeServiceLevelObjective
Returns
TypeDescription
ServiceLevelObjective.Builder

parseDelimitedFrom(InputStream input)

public static ServiceLevelObjective parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ServiceLevelObjective
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ServiceLevelObjective parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServiceLevelObjective
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ServiceLevelObjective parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ServiceLevelObjective
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ServiceLevelObjective parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServiceLevelObjective
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ServiceLevelObjective parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ServiceLevelObjective
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ServiceLevelObjective parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServiceLevelObjective
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ServiceLevelObjective parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ServiceLevelObjective
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ServiceLevelObjective parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServiceLevelObjective
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ServiceLevelObjective parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ServiceLevelObjective
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ServiceLevelObjective parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServiceLevelObjective
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ServiceLevelObjective parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ServiceLevelObjective
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ServiceLevelObjective parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServiceLevelObjective
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ServiceLevelObjective> parser()
Returns
TypeDescription
Parser<ServiceLevelObjective>

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
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for calendarPeriod.

getDefaultInstanceForType()

public ServiceLevelObjective getDefaultInstanceForType()
Returns
TypeDescription
ServiceLevelObjective

getDisplayName()

public String getDisplayName()

Name used for UI elements listing this SLO.

string display_name = 11;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Name used for UI elements listing this SLO.

string display_name = 11;

Returns
TypeDescription
ByteString

The bytes for displayName.

getGoal()

public double 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
TypeDescription
double

The goal.

getName()

public String getName()

Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]

string name = 1;

Returns
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<ServiceLevelObjective> getParserForType()
Returns
TypeDescription
Parser<ServiceLevelObjective>
Overrides

getPeriodCase()

public ServiceLevelObjective.PeriodCase getPeriodCase()
Returns
TypeDescription
ServiceLevelObjective.PeriodCase

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
TypeDescription
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
TypeDescription
DurationOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
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
TypeDescription
ServiceLevelIndicator

The serviceLevelIndicator.

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
TypeDescription
ServiceLevelIndicatorOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getUserLabels()

public Map<String,String> getUserLabels()

Use #getUserLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

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
TypeDescription
int

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
TypeDescription
Map<String,String>

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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

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
NameDescription
keyString
Returns
TypeDescription
String

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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the serviceLevelIndicator field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ServiceLevelObjective.Builder newBuilderForType()
Returns
TypeDescription
ServiceLevelObjective.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ServiceLevelObjective.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ServiceLevelObjective.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ServiceLevelObjective.Builder toBuilder()
Returns
TypeDescription
ServiceLevelObjective.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException