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

package com.azure.resourcemanager.recoveryservicesbackup.models;

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

/** Encapsulates Managed Identity related information. */
@Fluent
public final class IdentityInfo {
    /*
     * To differentiate if the managed identity is system assigned or user assigned
     */
    @JsonProperty(value = "isSystemAssignedIdentity")
    private Boolean isSystemAssignedIdentity;

    /*
     * Managed Identity Resource Id
     * Optional: Might not be required in the case of system assigned managed identity
     */
    @JsonProperty(value = "managedIdentityResourceId")
    private String managedIdentityResourceId;

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

    /**
     * Get the isSystemAssignedIdentity property: To differentiate if the managed identity is system assigned or user
     * assigned.
     *
     * @return the isSystemAssignedIdentity value.
     */
    public Boolean isSystemAssignedIdentity() {
        return this.isSystemAssignedIdentity;
    }

    /**
     * Set the isSystemAssignedIdentity property: To differentiate if the managed identity is system assigned or user
     * assigned.
     *
     * @param isSystemAssignedIdentity the isSystemAssignedIdentity value to set.
     * @return the IdentityInfo object itself.
     */
    public IdentityInfo withIsSystemAssignedIdentity(Boolean isSystemAssignedIdentity) {
        this.isSystemAssignedIdentity = isSystemAssignedIdentity;
        return this;
    }

    /**
     * Get the managedIdentityResourceId property: Managed Identity Resource Id Optional: Might not be required in the
     * case of system assigned managed identity.
     *
     * @return the managedIdentityResourceId value.
     */
    public String managedIdentityResourceId() {
        return this.managedIdentityResourceId;
    }

    /**
     * Set the managedIdentityResourceId property: Managed Identity Resource Id Optional: Might not be required in the
     * case of system assigned managed identity.
     *
     * @param managedIdentityResourceId the managedIdentityResourceId value to set.
     * @return the IdentityInfo object itself.
     */
    public IdentityInfo withManagedIdentityResourceId(String managedIdentityResourceId) {
        this.managedIdentityResourceId = managedIdentityResourceId;
        return this;
    }

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