List event types.
List event types for a topic type.

@param topicTypeName Name of the topic type
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the List&lt;EventTypeInner&gt; object
489104
public Observable<ServiceResponse<List<EventTypeInner>>> listEventTypesWithServiceResponseAsync(String topicTypeName) {
        if (topicTypeName == null) {
            throw new IllegalArgumentException("Parameter topicTypeName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        return service.listEventTypes(topicTypeName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<EventTypeInner>>>>() {
                @Override
                public Observable<ServiceResponse<List<EventTypeInner>>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<PageImpl<EventTypeInner>> result = listEventTypesDelegate(response);
                        List<EventTypeInner> items = null;
                        if (result.body() != null) {
                            items = result.body().items();
                        }
                        ServiceResponse<List<EventTypeInner>> clientResponse = new ServiceResponse<List<EventTypeInner>>(items, result.response());
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
134225
def list_event_types(self, publisher_id):
        
        route_values = {}
        if publisher_id is not None:
            route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str')
        response = self._send(http_method='GET',
                              location_id='db4777cd-8e08-4a84-8ba3-c974ea033718',
                              version='5.0',
                              route_values=route_values)
        return self._deserialize('[EventTypeDescriptor]', self._unwrap_collection(response))
870751
private void initEventTypes(IoEventType... eventTypes) {
        if ((eventTypes == null) || (eventTypes.length == 0)) {
            eventTypes = DEFAULT_EVENT_SET;
        }

        // Copy the list of handled events in the event set
        this.eventTypes = EnumSet.of(eventTypes[0], eventTypes);
        
        // Check that we don't have the SESSION_CREATED event in the set
        if (this.eventTypes.contains( IoEventType.SESSION_CREATED )) {
            this.eventTypes = null;
            throw new IllegalArgumentException(IoEventType.SESSION_CREATED
                + " is not allowed.");
        }
    }
31219
public Optional<FieldTypes.Type> mapType(String typeName) {
        return Optional.ofNullable(TYPE_MAP.get(typeName));
    }
444250
public List<String> getEventTypes() {
        ArrayList<String> allEvents = new ArrayList<>();
        if (isDelivered()) {
            allEvents.add(MessageEvent.DELIVERED);
        }
        if (!isMessageEventRequest() && isCancelled()) {
            allEvents.add(MessageEvent.CANCELLED);
        }
        if (isComposing()) {
            allEvents.add(MessageEvent.COMPOSING);
        }
        if (isDisplayed()) {
            allEvents.add(MessageEvent.DISPLAYED);
        }
        if (isOffline()) {
            allEvents.add(MessageEvent.OFFLINE);
        }
        return allEvents;
    }
293157
public static EventType map(Event event) {
        EventType eventType = new EventType();
        eventType.setTimestamp(Converter.convertDate(event.getTimestamp()));
        eventType.setEventType(convertEventType(event.getEventType()));
        OriginatorType origType = mapOriginator(event.getOriginator());
        eventType.setOriginator(origType);
        MessageInfoType miType = mapMessageInfo(event.getMessageInfo());
        eventType.setMessageInfo(miType);
        eventType.setCustomInfo(convertCustomInfo(event.getCustomInfo()));
        eventType.setContentCut(event.isContentCut());
        if (event.getContent() != null) {
            DataHandler datHandler = getDataHandlerForString(event);
            eventType.setContent(datHandler);
        }
        return eventType;
    }
853463
private String getTopic(ServiceEvent serviceEvent) {
        StringBuilder topic = new StringBuilder(SERVICE_EVENT_TOPIC_PREFIX);

        switch (serviceEvent.getType()) {
            case ServiceEvent.REGISTERED:
                topic.append("REGISTERED");
                break;
            case ServiceEvent.MODIFIED:
                topic.append("MODIFIED");
                break;
            case ServiceEvent.UNREGISTERING:
                topic.append("UNREGISTERING");
                break;
            default:
                return null;
        }

        return topic.toString();
    }
24444
@Beta
    public EventGridEvent[] deserializeEventGridEvents(final String requestContent, final SerializerAdapter<ObjectMapper> serializerAdapter) throws IOException {
        EventGridEvent[] eventGridEvents = serializerAdapter.<EventGridEvent[]>deserialize(requestContent, EventGridEvent[].class);
        for (EventGridEvent receivedEvent : eventGridEvents) {
            if (receivedEvent.data() == null) {
                continue;
            } else {
                final String eventType = receivedEvent.eventType();
                final Type eventDataType;
                if (SystemEventTypeMappings.containsMappingFor(eventType)) {
                    eventDataType = SystemEventTypeMappings.getMapping(eventType);
                } else if (containsCustomEventMappingFor(eventType)) {
                    eventDataType = getCustomEventMapping(eventType);
                } else {
                    eventDataType = null;
                }
                if (eventDataType != null) {
                    final String eventDataAsString = serializerAdapter.serializeRaw(receivedEvent.data());
                    final Object eventData = serializerAdapter.<Object>deserialize(eventDataAsString, eventDataType);
                    setEventData(receivedEvent, eventData);
                }
            }
        }
        return eventGridEvents;
    }
1202290
def publish(topic_name: nil, event_name: nil, schema_name: nil, primary_key: nil, body:)
      defaults = self.class.get_publish_defaults
      published_messages << Maitredee.publish(
        topic_name: topic_name || defaults[:topic_name],
        event_name: event_name || defaults[:event_name],
        schema_name: schema_name || defaults[:schema_name],
        primary_key: primary_key,
        body: body
      )
    end
1057905
public synchronized Iterable<IGenericEvent<T>> getSubscribers(String eventName) {
        List<IGenericEvent<T>> subscribers = getSubscribers(eventName, false);
        return subscribers == null ? null : new ArrayList<>(subscribers);
    }
1231745
public Observable<Page<SnapshotInner>> listByResourceGroupAsync(final String resourceGroupName) {
        return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
            .map(new Func1<ServiceResponse<Page<SnapshotInner>>, Page<SnapshotInner>>() {
                @Override
                public Page<SnapshotInner> call(ServiceResponse<Page<SnapshotInner>> response) {
                    return response.body();
                }
            });
    }
725618
@Override
    public java.util.concurrent.Future<SubscribeResult> subscribeAsync(String topicArn, String protocol, String endpoint,
            com.amazonaws.handlers.AsyncHandler<SubscribeRequest, SubscribeResult> asyncHandler) {

        return subscribeAsync(new SubscribeRequest().withTopicArn(topicArn).withProtocol(protocol).withEndpoint(endpoint), asyncHandler);
    }
1043859
public Observable<ServiceResponse<ListLabsResponseInner>> listLabsWithServiceResponseAsync(String userName) {
        if (userName == null) {
            throw new IllegalArgumentException("Parameter userName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        return service.listLabs(userName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ListLabsResponseInner>>>() {
                @Override
                public Observable<ServiceResponse<ListLabsResponseInner>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<ListLabsResponseInner> clientResponse = listLabsDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
499210
public void checkEventTopicSyntax(String topic)
    throws InvalidTopicSyntaxException
  {
    checkTopicNotNull(topic);
		    
    if (topic.indexOf(MatchSpace.SUBTOPIC_MQSI_MATCHONE_CHAR) > -1 || 
      topic.indexOf(MatchSpace.SUBTOPIC_MQSI_MATCHMANY_CHAR) > -1)
      throw new InvalidTopicSyntaxException(
         NLS.format(
           "INVALID_TOPIC_ERROR_CWSIH0006",
           new Object[] { topic }));
  }
825955
public Observable<TopicTypeInfoInner> getAsync(String topicTypeName) {
        return getWithServiceResponseAsync(topicTypeName).map(new Func1<ServiceResponse<TopicTypeInfoInner>, TopicTypeInfoInner>() {
            @Override
            public TopicTypeInfoInner call(ServiceResponse<TopicTypeInfoInner> response) {
                return response.body();
            }
        });
    }
709091
public Topic getTopic(String topicId) throws Exception {
    // [START pubsub_get_topic]
    try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
      ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId);
      Topic topic = topicAdminClient.getTopic(topicName);
      return topic;
    }
    // [END pubsub_get_topic]
  }
144852
public Observable<Page<DomainInner>> listByResourceGroupAsync(String resourceGroupName) {
        return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1<ServiceResponse<List<DomainInner>>, Page<DomainInner>>() {
            @Override
            public Page<DomainInner> call(ServiceResponse<List<DomainInner>> response) {
                PageImpl<DomainInner> page = new PageImpl<>();
                page.setItems(response.body());
                return page;
            }
        });
    }