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

com.azure.resourcemanager.eventgrid.models.CustomJwtAuthenticationManagedIdentity 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.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * The identity information for retrieving the certificate for custom JWT authentication.
 */
@Fluent
public final class CustomJwtAuthenticationManagedIdentity {
    /*
     * The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'.
     */
    @JsonProperty(value = "type", required = true)
    private CustomJwtAuthenticationManagedIdentityType type;

    /*
     * The user identity associated with the resource.
     */
    @JsonProperty(value = "userAssignedIdentity")
    private String userAssignedIdentity;

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

    /**
     * Get the type property: The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'.
     * 
     * @return the type value.
     */
    public CustomJwtAuthenticationManagedIdentityType type() {
        return this.type;
    }

    /**
     * Set the type property: The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'.
     * 
     * @param type the type value to set.
     * @return the CustomJwtAuthenticationManagedIdentity object itself.
     */
    public CustomJwtAuthenticationManagedIdentity withType(CustomJwtAuthenticationManagedIdentityType type) {
        this.type = type;
        return this;
    }

    /**
     * Get the userAssignedIdentity property: The user identity associated with the resource.
     * 
     * @return the userAssignedIdentity value.
     */
    public String userAssignedIdentity() {
        return this.userAssignedIdentity;
    }

    /**
     * Set the userAssignedIdentity property: The user identity associated with the resource.
     * 
     * @param userAssignedIdentity the userAssignedIdentity value to set.
     * @return the CustomJwtAuthenticationManagedIdentity object itself.
     */
    public CustomJwtAuthenticationManagedIdentity withUserAssignedIdentity(String userAssignedIdentity) {
        this.userAssignedIdentity = userAssignedIdentity;
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (type() == null) {
            throw LOGGER.atError()
                .log(new IllegalArgumentException(
                    "Missing required property type in model CustomJwtAuthenticationManagedIdentity"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(CustomJwtAuthenticationManagedIdentity.class);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy