All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.deviceregistry.inputs.EventArgs Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show newest version
// *** 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.deviceregistry.inputs;

import com.pulumi.azurenative.deviceregistry.enums.EventsObservabilityMode;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Defines the event properties.
 * 
 */
public final class EventArgs extends com.pulumi.resources.ResourceArgs {

    public static final EventArgs Empty = new EventArgs();

    /**
     * The path to the type definition of the capability (e.g. DTMI, OPC UA information model node id, etc.), for example dtmi:com:example:Robot:_contents:__prop1;1.
     * 
     */
    @Import(name="capabilityId")
    private @Nullable Output capabilityId;

    /**
     * @return The path to the type definition of the capability (e.g. DTMI, OPC UA information model node id, etc.), for example dtmi:com:example:Robot:_contents:__prop1;1.
     * 
     */
    public Optional> capabilityId() {
        return Optional.ofNullable(this.capabilityId);
    }

    /**
     * Stringified JSON that contains connector-specific configuration for the event. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize.
     * 
     */
    @Import(name="eventConfiguration")
    private @Nullable Output eventConfiguration;

    /**
     * @return Stringified JSON that contains connector-specific configuration for the event. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize.
     * 
     */
    public Optional> eventConfiguration() {
        return Optional.ofNullable(this.eventConfiguration);
    }

    /**
     * The address of the notifier of the event in the asset (e.g. URL) so that a client can access the event on the asset.
     * 
     */
    @Import(name="eventNotifier", required=true)
    private Output eventNotifier;

    /**
     * @return The address of the notifier of the event in the asset (e.g. URL) so that a client can access the event on the asset.
     * 
     */
    public Output eventNotifier() {
        return this.eventNotifier;
    }

    /**
     * The name of the event.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the event.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * An indication of how the event should be mapped to OpenTelemetry.
     * 
     */
    @Import(name="observabilityMode")
    private @Nullable Output> observabilityMode;

    /**
     * @return An indication of how the event should be mapped to OpenTelemetry.
     * 
     */
    public Optional>> observabilityMode() {
        return Optional.ofNullable(this.observabilityMode);
    }

    private EventArgs() {}

    private EventArgs(EventArgs $) {
        this.capabilityId = $.capabilityId;
        this.eventConfiguration = $.eventConfiguration;
        this.eventNotifier = $.eventNotifier;
        this.name = $.name;
        this.observabilityMode = $.observabilityMode;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(EventArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private EventArgs $;

        public Builder() {
            $ = new EventArgs();
        }

        public Builder(EventArgs defaults) {
            $ = new EventArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param capabilityId The path to the type definition of the capability (e.g. DTMI, OPC UA information model node id, etc.), for example dtmi:com:example:Robot:_contents:__prop1;1.
         * 
         * @return builder
         * 
         */
        public Builder capabilityId(@Nullable Output capabilityId) {
            $.capabilityId = capabilityId;
            return this;
        }

        /**
         * @param capabilityId The path to the type definition of the capability (e.g. DTMI, OPC UA information model node id, etc.), for example dtmi:com:example:Robot:_contents:__prop1;1.
         * 
         * @return builder
         * 
         */
        public Builder capabilityId(String capabilityId) {
            return capabilityId(Output.of(capabilityId));
        }

        /**
         * @param eventConfiguration Stringified JSON that contains connector-specific configuration for the event. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize.
         * 
         * @return builder
         * 
         */
        public Builder eventConfiguration(@Nullable Output eventConfiguration) {
            $.eventConfiguration = eventConfiguration;
            return this;
        }

        /**
         * @param eventConfiguration Stringified JSON that contains connector-specific configuration for the event. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize.
         * 
         * @return builder
         * 
         */
        public Builder eventConfiguration(String eventConfiguration) {
            return eventConfiguration(Output.of(eventConfiguration));
        }

        /**
         * @param eventNotifier The address of the notifier of the event in the asset (e.g. URL) so that a client can access the event on the asset.
         * 
         * @return builder
         * 
         */
        public Builder eventNotifier(Output eventNotifier) {
            $.eventNotifier = eventNotifier;
            return this;
        }

        /**
         * @param eventNotifier The address of the notifier of the event in the asset (e.g. URL) so that a client can access the event on the asset.
         * 
         * @return builder
         * 
         */
        public Builder eventNotifier(String eventNotifier) {
            return eventNotifier(Output.of(eventNotifier));
        }

        /**
         * @param name The name of the event.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the event.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param observabilityMode An indication of how the event should be mapped to OpenTelemetry.
         * 
         * @return builder
         * 
         */
        public Builder observabilityMode(@Nullable Output> observabilityMode) {
            $.observabilityMode = observabilityMode;
            return this;
        }

        /**
         * @param observabilityMode An indication of how the event should be mapped to OpenTelemetry.
         * 
         * @return builder
         * 
         */
        public Builder observabilityMode(Either observabilityMode) {
            return observabilityMode(Output.of(observabilityMode));
        }

        /**
         * @param observabilityMode An indication of how the event should be mapped to OpenTelemetry.
         * 
         * @return builder
         * 
         */
        public Builder observabilityMode(String observabilityMode) {
            return observabilityMode(Either.ofLeft(observabilityMode));
        }

        /**
         * @param observabilityMode An indication of how the event should be mapped to OpenTelemetry.
         * 
         * @return builder
         * 
         */
        public Builder observabilityMode(EventsObservabilityMode observabilityMode) {
            return observabilityMode(Either.ofRight(observabilityMode));
        }

        public EventArgs build() {
            if ($.eventNotifier == null) {
                throw new MissingRequiredPropertyException("EventArgs", "eventNotifier");
            }
            $.observabilityMode = Codegen.stringProp("observabilityMode").left(EventsObservabilityMode.class).output().arg($.observabilityMode).def("none").getNullable();
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy