# Batch v1 API - Class JobNotification.Types.Message (2.15.0)

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

- [2.15.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.14.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.13.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.12.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.11.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.10.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.9.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.8.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.7.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.6.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.5.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.4.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.3.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.2.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.1.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.0.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/1.3.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/1.2.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/1.1.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/1.0.0/Google.Cloud.Batch.V1.JobNotification.Types.Message)

    public sealed class JobNotification.Types.Message : IMessage<JobNotification.Types.Message>, IEquatable<JobNotification.Types.Message>, IDeepCloneable<JobNotification.Types.Message>, IBufferMessage, IMessage

Reference documentation and code samples for the Batch v1 API class JobNotification.Types.Message.

Message details.
Describe the conditions under which messages will be sent.
If no attribute is defined, no message will be sent by default.
One message should specify either the job or the task level attributes,
but not both. For example,
job level: JOB_STATE_CHANGED and/or a specified new_job_state;
task level: TASK_STATE_CHANGED and/or a specified new_task_state.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.Batch.V1.dll

## Constructors

### Message()

    public Message()

### Message(Message)

    public Message(JobNotification.Types.Message other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.JobNotificationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.JobNotification.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.JobNotification.Types.Message` |

## Properties

### NewJobState

    public JobStatus.Types.State NewJobState { get; set; }

The new job state.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.JobStatushttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.JobStatus.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.JobStatus.Types.State` |   |

### NewTaskState

    public TaskStatus.Types.State NewTaskState { get; set; }

The new task state.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.TaskStatushttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.TaskStatus.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.TaskStatus.Types.State` |   |

### Type

    public JobNotification.Types.Type Type { get; set; }

The message type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.JobNotificationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.JobNotification.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.JobNotification.Types.Type` |   |