# Google Cloud Error Reporting v1beta1 API - Class ServiceContext (3.0.0-beta06)

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

- [3.0.0-beta06 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ServiceContext)
- [3.0.0-beta05](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/3.0.0-beta05/Google.Cloud.ErrorReporting.V1Beta1.ServiceContext)
- [2.0.0-beta05](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/2.0.0-beta05/Google.Cloud.ErrorReporting.V1Beta1.ServiceContext)

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

Reference documentation and code samples for the Google Cloud Error Reporting v1beta1 API class ServiceContext.

Describes a running service that sends errors.
Its version changes over time and multiple versions can run in parallel.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ServiceContext](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ServiceContext), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ServiceContext](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ServiceContext), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ServiceContext](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ServiceContext), [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.ErrorReporting.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1)

## Assembly

Google.Cloud.ErrorReporting.V1Beta1.dll

## Constructors

### ServiceContext()

    public ServiceContext()

### ServiceContext(ServiceContext)

    public ServiceContext(ServiceContext other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ServiceContext` |

## Properties

### ResourceType

    public string ResourceType { get; set; }

Type of the MonitoredResource. List of possible values:
<https://cloud.google.com/monitoring/api/resources>

Value is set automatically for incoming errors and must not be set when
reporting errors.

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

### Service

    public string Service { get; set; }

An identifier of the service, such as the name of the
executable, job, or Google App Engine service name. This field is expected
to have a low number of values that are relatively stable over time, as
opposed to `version`, which can be changed whenever new code is deployed.

Contains the service name for error reports extracted from Google
App Engine logs or `default` if the App Engine default service is used.

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

### Version

    public string Version { get; set; }

Represents the source code version that the developer provided,
which could represent a version label or a Git SHA-1 hash, for example.
For App Engine standard environment, the version is set to the version of
the app.

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