// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.media.videoanalyzer.edge.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;

/**
 * A processor that allows the pipeline topology to send video frames to a Cognitive Services Vision extension.
 * Inference results are relayed to downstream nodes.
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type")
@JsonTypeName("#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor")
@Fluent
public final class CognitiveServicesVisionProcessor extends ProcessorNodeBase {
    /*
     * Endpoint to which this processor should connect.
     */
    @JsonProperty(value = "endpoint", required = true)
    private EndpointBase endpoint;

    /*
     * Describes the parameters of the image that is sent as input to the
     * endpoint.
     */
    @JsonProperty(value = "image")
    private ImageProperties image;

    /*
     * Describes the sampling options to be applied when forwarding samples to
     * the extension.
     */
    @JsonProperty(value = "samplingOptions")
    private SamplingOptions samplingOptions;

    /*
     * Describes the Spatial Analysis operation to be used in the Cognitive
     * Services Vision processor.
     */
    @JsonProperty(value = "operation", required = true)
    private SpatialAnalysisOperationBase operation;

    /**
     * Creates an instance of CognitiveServicesVisionProcessor class.
     *
     * @param name the name value to set.
     * @param inputs the inputs value to set.
     * @param endpoint the endpoint value to set.
     * @param operation the operation value to set.
     */
    @JsonCreator
    public CognitiveServicesVisionProcessor(
            @JsonProperty(value = "name", required = true) String name,
            @JsonProperty(value = "inputs", required = true) List<NodeInput> inputs,
            @JsonProperty(value = "endpoint", required = true) EndpointBase endpoint,
            @JsonProperty(value = "operation", required = true) SpatialAnalysisOperationBase operation) {
        super(name, inputs);
        this.endpoint = endpoint;
        this.operation = operation;
    }

    /**
     * Get the endpoint property: Endpoint to which this processor should connect.
     *
     * @return the endpoint value.
     */
    public EndpointBase getEndpoint() {
        return this.endpoint;
    }

    /**
     * Get the image property: Describes the parameters of the image that is sent as input to the endpoint.
     *
     * @return the image value.
     */
    public ImageProperties getImage() {
        return this.image;
    }

    /**
     * Set the image property: Describes the parameters of the image that is sent as input to the endpoint.
     *
     * @param image the image value to set.
     * @return the CognitiveServicesVisionProcessor object itself.
     */
    public CognitiveServicesVisionProcessor setImage(ImageProperties image) {
        this.image = image;
        return this;
    }

    /**
     * Get the samplingOptions property: Describes the sampling options to be applied when forwarding samples to the
     * extension.
     *
     * @return the samplingOptions value.
     */
    public SamplingOptions getSamplingOptions() {
        return this.samplingOptions;
    }

    /**
     * Set the samplingOptions property: Describes the sampling options to be applied when forwarding samples to the
     * extension.
     *
     * @param samplingOptions the samplingOptions value to set.
     * @return the CognitiveServicesVisionProcessor object itself.
     */
    public CognitiveServicesVisionProcessor setSamplingOptions(SamplingOptions samplingOptions) {
        this.samplingOptions = samplingOptions;
        return this;
    }

    /**
     * Get the operation property: Describes the Spatial Analysis operation to be used in the Cognitive Services Vision
     * processor.
     *
     * @return the operation value.
     */
    public SpatialAnalysisOperationBase getOperation() {
        return this.operation;
    }
}
