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

package com.azure.resourcemanager.eventgrid.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.eventgrid.models.PartnerClientAuthentication;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Properties of a partner destination webhook. */
@Fluent
public final class WebhookPartnerDestinationProperties {
    /*
     * The URL that represents the endpoint of the partner destination.
     */
    @JsonProperty(value = "endpointUrl")
    private String endpointUrl;

    /*
     * The base URL that represents the endpoint of the partner destination.
     */
    @JsonProperty(value = "endpointBaseUrl")
    private String endpointBaseUrl;

    /*
     * Partner client authentication
     */
    @JsonProperty(value = "clientAuthentication")
    private PartnerClientAuthentication clientAuthentication;

    /** Creates an instance of WebhookPartnerDestinationProperties class. */
    public WebhookPartnerDestinationProperties() {
    }

    /**
     * Get the endpointUrl property: The URL that represents the endpoint of the partner destination.
     *
     * @return the endpointUrl value.
     */
    public String endpointUrl() {
        return this.endpointUrl;
    }

    /**
     * Set the endpointUrl property: The URL that represents the endpoint of the partner destination.
     *
     * @param endpointUrl the endpointUrl value to set.
     * @return the WebhookPartnerDestinationProperties object itself.
     */
    public WebhookPartnerDestinationProperties withEndpointUrl(String endpointUrl) {
        this.endpointUrl = endpointUrl;
        return this;
    }

    /**
     * Get the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination.
     *
     * @return the endpointBaseUrl value.
     */
    public String endpointBaseUrl() {
        return this.endpointBaseUrl;
    }

    /**
     * Set the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination.
     *
     * @param endpointBaseUrl the endpointBaseUrl value to set.
     * @return the WebhookPartnerDestinationProperties object itself.
     */
    public WebhookPartnerDestinationProperties withEndpointBaseUrl(String endpointBaseUrl) {
        this.endpointBaseUrl = endpointBaseUrl;
        return this;
    }

    /**
     * Get the clientAuthentication property: Partner client authentication.
     *
     * @return the clientAuthentication value.
     */
    public PartnerClientAuthentication clientAuthentication() {
        return this.clientAuthentication;
    }

    /**
     * Set the clientAuthentication property: Partner client authentication.
     *
     * @param clientAuthentication the clientAuthentication value to set.
     * @return the WebhookPartnerDestinationProperties object itself.
     */
    public WebhookPartnerDestinationProperties withClientAuthentication(
        PartnerClientAuthentication clientAuthentication) {
        this.clientAuthentication = clientAuthentication;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (clientAuthentication() != null) {
            clientAuthentication().validate();
        }
    }
}
