
com.pulumi.azurenative.webpubsub.outputs.EventHandlerResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.webpubsub.outputs;
import com.pulumi.azurenative.webpubsub.outputs.UpstreamAuthSettingsResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class EventHandlerResponse {
/**
* @return Upstream auth settings. If not set, no auth is used for upstream messages.
*
*/
private @Nullable UpstreamAuthSettingsResponse auth;
/**
* @return Gets or sets the list of system events.
*
*/
private @Nullable List systemEvents;
/**
* @return Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the client request comes in.
* For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part can't contains parameters.
*
*/
private String urlTemplate;
/**
* @return Gets or sets the matching pattern for event names.
* There are 3 kinds of patterns supported:
* 1. "*", it matches any event name
* 2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2"
* 3. A single event name, for example, "event1", it matches "event1"
*
*/
private @Nullable String userEventPattern;
private EventHandlerResponse() {}
/**
* @return Upstream auth settings. If not set, no auth is used for upstream messages.
*
*/
public Optional auth() {
return Optional.ofNullable(this.auth);
}
/**
* @return Gets or sets the list of system events.
*
*/
public List systemEvents() {
return this.systemEvents == null ? List.of() : this.systemEvents;
}
/**
* @return Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the client request comes in.
* For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part can't contains parameters.
*
*/
public String urlTemplate() {
return this.urlTemplate;
}
/**
* @return Gets or sets the matching pattern for event names.
* There are 3 kinds of patterns supported:
* 1. "*", it matches any event name
* 2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2"
* 3. A single event name, for example, "event1", it matches "event1"
*
*/
public Optional userEventPattern() {
return Optional.ofNullable(this.userEventPattern);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(EventHandlerResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable UpstreamAuthSettingsResponse auth;
private @Nullable List systemEvents;
private String urlTemplate;
private @Nullable String userEventPattern;
public Builder() {}
public Builder(EventHandlerResponse defaults) {
Objects.requireNonNull(defaults);
this.auth = defaults.auth;
this.systemEvents = defaults.systemEvents;
this.urlTemplate = defaults.urlTemplate;
this.userEventPattern = defaults.userEventPattern;
}
@CustomType.Setter
public Builder auth(@Nullable UpstreamAuthSettingsResponse auth) {
this.auth = auth;
return this;
}
@CustomType.Setter
public Builder systemEvents(@Nullable List systemEvents) {
this.systemEvents = systemEvents;
return this;
}
public Builder systemEvents(String... systemEvents) {
return systemEvents(List.of(systemEvents));
}
@CustomType.Setter
public Builder urlTemplate(String urlTemplate) {
if (urlTemplate == null) {
throw new MissingRequiredPropertyException("EventHandlerResponse", "urlTemplate");
}
this.urlTemplate = urlTemplate;
return this;
}
@CustomType.Setter
public Builder userEventPattern(@Nullable String userEventPattern) {
this.userEventPattern = userEventPattern;
return this;
}
public EventHandlerResponse build() {
final var _resultValue = new EventHandlerResponse();
_resultValue.auth = auth;
_resultValue.systemEvents = systemEvents;
_resultValue.urlTemplate = urlTemplate;
_resultValue.userEventPattern = userEventPattern;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy