Class ServiceLevelObjective (3.47.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
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

GOAL_FIELD_NUMBER

public static final int GOAL_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

ROLLING_PERIOD_FIELD_NUMBER

public static final int ROLLING_PERIOD_FIELD_NUMBER
Field Value
Type Description
int

SERVICE_LEVEL_INDICATOR_FIELD_NUMBER

public static final int SERVICE_LEVEL_INDICATOR_FIELD_NUMBER
Field Value
Type Description
int

USER_LABELS_FIELD_NUMBER

public static final int USER_LABELS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ServiceLevelObjective getDefaultInstance()
Returns
Type Description
ServiceLevelObjective

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static ServiceLevelObjective.Builder newBuilder()
Returns
Type Description
ServiceLevelObjective.Builder

newBuilder(ServiceLevelObjective prototype)

public static ServiceLevelObjective.Builder newBuilder(ServiceLevelObjective prototype)
Parameter
Name Description
prototype ServiceLevelObjective
Returns
Type Description
ServiceLevelObjective.Builder

parseDelimitedFrom(InputStream input)

public static ServiceLevelObjective parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ServiceLevelObjective
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ServiceLevelObjective parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ServiceLevelObjective
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ServiceLevelObjective parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ServiceLevelObjective
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ServiceLevelObjective parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ServiceLevelObjective
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ServiceLevelObjective parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ServiceLevelObjective
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ServiceLevelObjective parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ServiceLevelObjective
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ServiceLevelObjective parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ServiceLevelObjective
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ServiceLevelObjective parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ServiceLevelObjective
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ServiceLevelObjective parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ServiceLevelObjective
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ServiceLevelObjective parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ServiceLevelObjective
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ServiceLevelObjective parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ServiceLevelObjective
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ServiceLevelObjective parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ServiceLevelObjective
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ServiceLevelObjective> parser()
Returns
Type Description
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
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
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
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
Type Description
ServiceLevelObjective

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()

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
Type Description
double

The goal.

getName()

public String getName()

Identifier. Resource name for this ServiceLevelObjective. The format is:

 projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. Resource name for this ServiceLevelObjective. The format is:

 projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<ServiceLevelObjective> getParserForType()
Returns
Type Description
Parser<ServiceLevelObjective>
Overrides

getPeriodCase()

public ServiceLevelObjective.PeriodCase getPeriodCase()
Returns
Type Description
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
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
Type Description
DurationOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
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
Type Description
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
Type Description
ServiceLevelIndicatorOrBuilder

getUserLabels() (deprecated)

public Map<String,String> getUserLabels()

Use #getUserLabelsMap() instead.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
key String
defaultValue String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
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
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()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ServiceLevelObjective.Builder newBuilderForType()
Returns
Type Description
ServiceLevelObjective.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ServiceLevelObjective.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ServiceLevelObjective.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ServiceLevelObjective.Builder toBuilder()
Returns
Type Description
ServiceLevelObjective.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException