# PublishEventRequest (dapr-sdk-parent 1.10.0 API)

Package io.dapr.client.domain

## Class PublishEventRequest

- java.lang.Object
- - io.dapr.client.domain.PublishEventRequest

    public class PublishEventRequest
    extends Object

A request to publish an event.

### Constructor Summary

Constructors
`PublishEventRequest​(String pubsubName, String topic, Object data)` Constructor for PublishEventRequest.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getContentType()`
`Object` `getData()`
`Map<String,​String>` `getMetadata()`
`String` `getPubsubName()`
`String` `getTopic()`
`PublishEventRequest` `setContentType​(String contentType)`
`PublishEventRequest` `setMetadata​(Map<String,​String> metadata)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PublishEventRequest

    public PublishEventRequest​(String pubsubName,
                               String topic,
                               Object data)

Constructor for PublishEventRequest.

Parameters:
  `pubsubName` - name of the pubsub
  `topic` - name of the topic in the pubsub
  `data` - data to published

### Method Detail

#### getPubsubName

    public String getPubsubName()

#### getTopic

    public String getTopic()

#### getData

    public Object getData()

#### getContentType

    public String getContentType()

#### setContentType

    public PublishEventRequest setContentType​(String contentType)

#### getMetadata

    public Map<String,​String> getMetadata()

#### setMetadata

    public PublishEventRequest setMetadata​(Map<String,​String> metadata)