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

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

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

/** Workspace active directory administrator. */
@Fluent
public final class WorkspaceAadAdminInfoInner extends ProxyResource {
    /*
     * Workspace active directory administrator properties
     */
    @JsonProperty(value = "properties")
    private AadAdminProperties innerProperties;

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

    /**
     * Get the innerProperties property: Workspace active directory administrator properties.
     *
     * @return the innerProperties value.
     */
    private AadAdminProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the tenantId property: Tenant ID of the workspace active directory administrator.
     *
     * @return the tenantId value.
     */
    public String tenantId() {
        return this.innerProperties() == null ? null : this.innerProperties().tenantId();
    }

    /**
     * Set the tenantId property: Tenant ID of the workspace active directory administrator.
     *
     * @param tenantId the tenantId value to set.
     * @return the WorkspaceAadAdminInfoInner object itself.
     */
    public WorkspaceAadAdminInfoInner withTenantId(String tenantId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AadAdminProperties();
        }
        this.innerProperties().withTenantId(tenantId);
        return this;
    }

    /**
     * Get the login property: Login of the workspace active directory administrator.
     *
     * @return the login value.
     */
    public String login() {
        return this.innerProperties() == null ? null : this.innerProperties().login();
    }

    /**
     * Set the login property: Login of the workspace active directory administrator.
     *
     * @param login the login value to set.
     * @return the WorkspaceAadAdminInfoInner object itself.
     */
    public WorkspaceAadAdminInfoInner withLogin(String login) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AadAdminProperties();
        }
        this.innerProperties().withLogin(login);
        return this;
    }

    /**
     * Get the administratorType property: Workspace active directory administrator type.
     *
     * @return the administratorType value.
     */
    public String administratorType() {
        return this.innerProperties() == null ? null : this.innerProperties().administratorType();
    }

    /**
     * Set the administratorType property: Workspace active directory administrator type.
     *
     * @param administratorType the administratorType value to set.
     * @return the WorkspaceAadAdminInfoInner object itself.
     */
    public WorkspaceAadAdminInfoInner withAdministratorType(String administratorType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AadAdminProperties();
        }
        this.innerProperties().withAdministratorType(administratorType);
        return this;
    }

    /**
     * Get the sid property: Object ID of the workspace active directory administrator.
     *
     * @return the sid value.
     */
    public String sid() {
        return this.innerProperties() == null ? null : this.innerProperties().sid();
    }

    /**
     * Set the sid property: Object ID of the workspace active directory administrator.
     *
     * @param sid the sid value to set.
     * @return the WorkspaceAadAdminInfoInner object itself.
     */
    public WorkspaceAadAdminInfoInner withSid(String sid) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AadAdminProperties();
        }
        this.innerProperties().withSid(sid);
        return this;
    }

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