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

com.azure.resourcemanager.eventgrid.models.StorageBlobDeadLetterDestination 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.StorageBlobDeadLetterDestinationProperties;
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 storage blob based dead letter destination.
 */
@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    property = "endpointType",
    defaultImpl = StorageBlobDeadLetterDestination.class,
    visible = true)
@JsonTypeName("StorageBlob")
@Fluent
public final class StorageBlobDeadLetterDestination extends DeadLetterDestination {
    /*
     * Type of the endpoint for the dead letter destination
     */
    @JsonTypeId
    @JsonProperty(value = "endpointType", required = true)
    private DeadLetterEndPointType endpointType = DeadLetterEndPointType.STORAGE_BLOB;

    /*
     * The properties of the Storage Blob based deadletter destination
     */
    @JsonProperty(value = "properties")
    private StorageBlobDeadLetterDestinationProperties innerProperties;

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

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

    /**
     * Get the innerProperties property: The properties of the Storage Blob based deadletter destination.
     * 
     * @return the innerProperties value.
     */
    private StorageBlobDeadLetterDestinationProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the resourceId property: The Azure Resource ID of the storage account that is the destination of the
     * deadletter events.
     * 
     * @return the resourceId value.
     */
    public String resourceId() {
        return this.innerProperties() == null ? null : this.innerProperties().resourceId();
    }

    /**
     * Set the resourceId property: The Azure Resource ID of the storage account that is the destination of the
     * deadletter events.
     * 
     * @param resourceId the resourceId value to set.
     * @return the StorageBlobDeadLetterDestination object itself.
     */
    public StorageBlobDeadLetterDestination withResourceId(String resourceId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new StorageBlobDeadLetterDestinationProperties();
        }
        this.innerProperties().withResourceId(resourceId);
        return this;
    }

    /**
     * Get the blobContainerName property: The name of the Storage blob container that is the destination of the
     * deadletter events.
     * 
     * @return the blobContainerName value.
     */
    public String blobContainerName() {
        return this.innerProperties() == null ? null : this.innerProperties().blobContainerName();
    }

    /**
     * Set the blobContainerName property: The name of the Storage blob container that is the destination of the
     * deadletter events.
     * 
     * @param blobContainerName the blobContainerName value to set.
     * @return the StorageBlobDeadLetterDestination object itself.
     */
    public StorageBlobDeadLetterDestination withBlobContainerName(String blobContainerName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new StorageBlobDeadLetterDestinationProperties();
        }
        this.innerProperties().withBlobContainerName(blobContainerName);
        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