# Error Reporting V1beta1 API - Class Google::Cloud::ErrorReporting::V1beta1::ReportedErrorEvent (v0.17.0)

0.17.0 (latest) 0.16.0 0.15.1 0.14.0 0.13.1 0.12.0 0.11.1 0.10.0 0.9.2 0.8.0 0.7.0 0.6.0 0.5.1 0.4.5 Reference documentation and code samples for the Error Reporting V1beta1 API class Google::Cloud::ErrorReporting::V1beta1::ReportedErrorEvent.

An error event which is reported to the Error Reporting system.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #context

    def context() -> ::Google::Cloud::ErrorReporting::V1beta1::ErrorContext

**Returns**

- ([::Google::Cloud::ErrorReporting::V1beta1::ErrorContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-ErrorContext)) --- Optional. A description of the context in which the error occurred.

### #context=

    def context=(value) -> ::Google::Cloud::ErrorReporting::V1beta1::ErrorContext

**Parameter**

- **value** ([::Google::Cloud::ErrorReporting::V1beta1::ErrorContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-ErrorContext)) --- Optional. A description of the context in which the error occurred.
**Returns**

- ([::Google::Cloud::ErrorReporting::V1beta1::ErrorContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-ErrorContext)) --- Optional. A description of the context in which the error occurred.

### #event_time

    def event_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Protobuf-Timestamp)) --- Optional. Time when the event occurred. If not provided, the time when the event was received by the Error Reporting system is used. If provided, the time must not exceed the [logs retention
  period](https://cloud.google.com/logging/quotas#logs_retention_periods) in the past, or be more than 24 hours in the future. If an invalid time is provided, then an error is returned.

### #event_time=

    def event_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Protobuf-Timestamp)) --- Optional. Time when the event occurred. If not provided, the time when the event was received by the Error Reporting system is used. If provided, the time must not exceed the [logs retention
  period](https://cloud.google.com/logging/quotas#logs_retention_periods) in the past, or be more than 24 hours in the future. If an invalid time is provided, then an error is returned.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Protobuf-Timestamp)) --- Optional. Time when the event occurred. If not provided, the time when the event was received by the Error Reporting system is used. If provided, the time must not exceed the [logs retention
  period](https://cloud.google.com/logging/quotas#logs_retention_periods) in the past, or be more than 24 hours in the future. If an invalid time is provided, then an error is returned.

### #message

    def message() -> ::String

**Returns**

- (::String) --- Required. The error message.
  If no `context.reportLocation` is provided, the message must contain a
  header (typically consisting of the exception type name and an error
  message) and an exception stack trace in one of the supported programming
  languages and formats.
  Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go.
  Supported stack trace formats are:

  - **Java** : Must be the return value of [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29).
  - **Python** : Must be the return value of [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc).
  - **JavaScript** : Must be the value of [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned by V8.
  - **Ruby** : Must contain frames returned by [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace).
  - **C#** : Must be the return value of [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx).
  - **PHP** : Must be prefixed with `"PHP (Notice|Parse error|Fatal
    error|Warning): "` and contain the result of [`(string)$exception`](https://php.net/manual/en/exception.tostring.php).
  - **Go** : Must be the return value of [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack).

### #message=

    def message=(value) -> ::String

**Parameter**

- **value** (::String) ---

  Required. The error message.
  If no `context.reportLocation` is provided, the message must contain a
  header (typically consisting of the exception type name and an error
  message) and an exception stack trace in one of the supported programming
  languages and formats.
  Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go.
  Supported stack trace formats are:
  - **Java** : Must be the return value of [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29).
  - **Python** : Must be the return value of [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc).
  - **JavaScript** : Must be the value of [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned by V8.
  - **Ruby** : Must contain frames returned by [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace).
  - **C#** : Must be the return value of [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx).
  - **PHP** : Must be prefixed with `"PHP (Notice|Parse error|Fatal
    error|Warning): "` and contain the result of [`(string)$exception`](https://php.net/manual/en/exception.tostring.php).
  - **Go** : Must be the return value of [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack).
**Returns**

- (::String) --- Required. The error message.
  If no `context.reportLocation` is provided, the message must contain a
  header (typically consisting of the exception type name and an error
  message) and an exception stack trace in one of the supported programming
  languages and formats.
  Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go.
  Supported stack trace formats are:

  - **Java** : Must be the return value of [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29).
  - **Python** : Must be the return value of [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc).
  - **JavaScript** : Must be the value of [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned by V8.
  - **Ruby** : Must contain frames returned by [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace).
  - **C#** : Must be the return value of [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx).
  - **PHP** : Must be prefixed with `"PHP (Notice|Parse error|Fatal
    error|Warning): "` and contain the result of [`(string)$exception`](https://php.net/manual/en/exception.tostring.php).
  - **Go** : Must be the return value of [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack).

### #service_context

    def service_context() -> ::Google::Cloud::ErrorReporting::V1beta1::ServiceContext

**Returns**

- ([::Google::Cloud::ErrorReporting::V1beta1::ServiceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)) --- Required. The service context in which this error has occurred.

### #service_context=

    def service_context=(value) -> ::Google::Cloud::ErrorReporting::V1beta1::ServiceContext

**Parameter**

- **value** ([::Google::Cloud::ErrorReporting::V1beta1::ServiceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)) --- Required. The service context in which this error has occurred.
**Returns**

- ([::Google::Cloud::ErrorReporting::V1beta1::ServiceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-ServiceContext)) --- Required. The service context in which this error has occurred.