# Google Cloud Monitoring v3 API - Class ServiceLevelObjective (3.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [3.16.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.15.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.15.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.14.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.13.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.12.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.11.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.10.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.9.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.8.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.7.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.6.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.5.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.4.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.3.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.2.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.1.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [3.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.0.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/2.6.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/2.5.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/2.4.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/2.3.0/Google.Cloud.Monitoring.V3.ServiceLevelObjective)

    public sealed class ServiceLevelObjective : IMessage<ServiceLevelObjective>, IEquatable<ServiceLevelObjective>, IDeepCloneable<ServiceLevelObjective>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Monitoring v3 API class ServiceLevelObjective.

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."

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ServiceLevelObjective

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ServiceLevelObjective](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.ServiceLevelObjective), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ServiceLevelObjective](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.ServiceLevelObjective), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ServiceLevelObjective](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.ServiceLevelObjective), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Monitoring.V3](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3)

## Assembly

Google.Cloud.Monitoring.V3.dll

## Constructors

### ServiceLevelObjective()

    public ServiceLevelObjective()

### ServiceLevelObjective(ServiceLevelObjective)

    public ServiceLevelObjective(ServiceLevelObjective other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.ServiceLevelObjective` |

## Properties

### CalendarPeriod

    public CalendarPeriod CalendarPeriod { get; set; }

A calendar period, semantically "since the start of the current
`<calendar_period>`". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and
`MONTH` are supported.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Type.CalendarPeriod.html` |   |

### DisplayName

    public string DisplayName { get; set; }

Name used for UI elements listing this SLO.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Goal

    public double Goal { get; set; }

The fraction of service that must be good in order for this objective to be
met. `0 < goal <= 0.9999`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.double` |   |

### HasCalendarPeriod

    public bool HasCalendarPeriod { get; }

Gets whether the "calendar_period" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Name

    public string Name { get; set; }

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

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### PeriodCase

    public ServiceLevelObjective.PeriodOneofCase PeriodCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.ServiceLevelObjectivehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.ServiceLevelObjective.PeriodOneofCase` |   |

### ResourceName

    public IResourceName ResourceName { get; set; }

[IResourceName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.ServiceLevelObjective#Google_Cloud_Monitoring_V3_ServiceLevelObjective_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html` |   |

### RollingPeriod

    public Duration RollingPeriod { get; set; }

A rolling time period, semantically "in the past `<rolling_period>`".
Must be an integer multiple of 1 day no larger than 30 days.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |

### ServiceLevelIndicator

    public ServiceLevelIndicator ServiceLevelIndicator { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.ServiceLevelIndicator` |   |

### ServiceLevelObjectiveName

    public ServiceLevelObjectiveName ServiceLevelObjectiveName { get; set; }

[ServiceLevelObjectiveName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.ServiceLevelObjectiveName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.ServiceLevelObjective#Google_Cloud_Monitoring_V3_ServiceLevelObjective_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.ServiceLevelObjectiveName` |   |

### UserLabels

    public MapField<string, string> UserLabels { get; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |