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

package com.azure.communication.jobrouter.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** A rule providing a binding to an HTTP Triggered Azure Function. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind")
@JsonTypeName("azure-function-rule")
@Fluent
public final class FunctionRouterRule extends RouterRule {
    /*
     * URL for Azure Function
     */
    @JsonProperty(value = "functionUri", required = true)
    private String functionUri;

    /*
     * Credentials used to access Azure function rule
     */
    @JsonProperty(value = "credential")
    private FunctionRouterRuleCredential credential;

    /**
     * Get the functionUri property: URL for Azure Function.
     *
     * @return the functionUri value.
     */
    public String getFunctionUri() {
        return this.functionUri;
    }

    /**
     * Set the functionUri property: URL for Azure Function.
     *
     * @param functionUri the functionUri value to set.
     * @return the FunctionRule object itself.
     */
    public FunctionRouterRule setFunctionUri(String functionUri) {
        this.functionUri = functionUri;
        return this;
    }

    /**
     * Get the credential property: Credentials used to access Azure function rule.
     *
     * @return the credential value.
     */
    public FunctionRouterRuleCredential getCredential() {
        return this.credential;
    }

    /**
     * Set the credential property: Credentials used to access Azure function rule.
     *
     * @param credential the credential value to set.
     * @return the FunctionRule object itself.
     */
    public FunctionRouterRule setCredential(FunctionRouterRuleCredential credential) {
        this.credential = credential;
        return this;
    }
}
