# Cloud Trace V2 API - Class Google::Cloud::Trace::V2::BatchWriteSpansRequest (v1.5.0)

1.5.0 (latest) 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.9.0 0.8.2 0.7.0 0.6.1 0.5.0 0.4.1 0.3.5 Reference documentation and code samples for the Cloud Trace V2 API class Google::Cloud::Trace::V2::BatchWriteSpansRequest.

The request message for the `BatchWriteSpans` method.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #name

    def name() -> ::String

**Returns**

- (::String) --- Required. The name of the project where the spans belong. The format is `projects/[PROJECT_ID]`.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The name of the project where the spans belong. The format is `projects/[PROJECT_ID]`.
**Returns**

- (::String) --- Required. The name of the project where the spans belong. The format is `projects/[PROJECT_ID]`.

### #spans

    def spans() -> ::Array<::Google::Cloud::Trace::V2::Span>

**Returns**

- (::Array\<[::Google::Cloud::Trace::V2::Span](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-trace-v2/latest/Google-Cloud-Trace-V2-Span)\>) --- Required. A list of new spans. The span names must not match existing spans, otherwise the results are undefined.

### #spans=

    def spans=(value) -> ::Array<::Google::Cloud::Trace::V2::Span>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Trace::V2::Span](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-trace-v2/latest/Google-Cloud-Trace-V2-Span)\>) --- Required. A list of new spans. The span names must not match existing spans, otherwise the results are undefined.
**Returns**

- (::Array\<[::Google::Cloud::Trace::V2::Span](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-trace-v2/latest/Google-Cloud-Trace-V2-Span)\>) --- Required. A list of new spans. The span names must not match existing spans, otherwise the results are undefined.