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

com.azure.resourcemanager.eventgrid.models.WebhookUpdatePartnerDestinationInfo Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for EventGrid Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure EventGrid Management Client. Package tag package-2021-10-preview.

There is a newer version: 1.2.0-beta.7
Show newest version
// 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.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.eventgrid.fluent.models.WebhookPartnerDestinationProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeId;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * Information about the update of the WebHook of the partner destination.
 */
@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    property = "endpointType",
    defaultImpl = WebhookUpdatePartnerDestinationInfo.class,
    visible = true)
@JsonTypeName("WebHook")
@Fluent
public final class WebhookUpdatePartnerDestinationInfo extends PartnerUpdateDestinationInfo {
    /*
     * Type of the endpoint for the partner destination
     */
    @JsonTypeId
    @JsonProperty(value = "endpointType", required = true)
    private PartnerEndpointType endpointType = PartnerEndpointType.WEB_HOOK;

    /*
     * WebHook Properties of the partner destination.
     */
    @JsonProperty(value = "properties")
    private WebhookPartnerDestinationProperties innerProperties;

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

    /**
     * Get the endpointType property: Type of the endpoint for the partner destination.
     * 
     * @return the endpointType value.
     */
    @Override
    public PartnerEndpointType endpointType() {
        return this.endpointType;
    }

    /**
     * Get the innerProperties property: WebHook Properties of the partner destination.
     * 
     * @return the innerProperties value.
     */
    private WebhookPartnerDestinationProperties innerProperties() {
        return this.innerProperties;
    }

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

    /**
     * Set the endpointUrl property: The URL that represents the endpoint of the partner destination.
     * 
     * @param endpointUrl the endpointUrl value to set.
     * @return the WebhookUpdatePartnerDestinationInfo object itself.
     */
    public WebhookUpdatePartnerDestinationInfo withEndpointUrl(String endpointUrl) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WebhookPartnerDestinationProperties();
        }
        this.innerProperties().withEndpointUrl(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.innerProperties() == null ? null : this.innerProperties().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 WebhookUpdatePartnerDestinationInfo object itself.
     */
    public WebhookUpdatePartnerDestinationInfo withEndpointBaseUrl(String endpointBaseUrl) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WebhookPartnerDestinationProperties();
        }
        this.innerProperties().withEndpointBaseUrl(endpointBaseUrl);
        return this;
    }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy