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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.customerinsights.models.AssignmentPrincipal;
import com.azure.resourcemanager.customerinsights.models.ProvisioningStates;
import com.azure.resourcemanager.customerinsights.models.ResourceSetDescription;
import com.azure.resourcemanager.customerinsights.models.RoleTypes;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** The Role Assignment resource format. */
@Fluent
public final class RoleAssignmentResourceFormatInner extends ProxyResource {
    /*
     * The Role Assignment definition.
     */
    @JsonProperty(value = "properties")
    private RoleAssignment innerProperties;

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

    /**
     * Get the innerProperties property: The Role Assignment definition.
     *
     * @return the innerProperties value.
     */
    private RoleAssignment innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the tenantId property: The hub name.
     *
     * @return the tenantId value.
     */
    public String tenantId() {
        return this.innerProperties() == null ? null : this.innerProperties().tenantId();
    }

    /**
     * Get the assignmentName property: The name of the metadata object.
     *
     * @return the assignmentName value.
     */
    public String assignmentName() {
        return this.innerProperties() == null ? null : this.innerProperties().assignmentName();
    }

    /**
     * Get the displayName property: Localized display names for the metadata.
     *
     * @return the displayName value.
     */
    public Map<String, String> displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Set the displayName property: Localized display names for the metadata.
     *
     * @param displayName the displayName value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withDisplayName(Map<String, String> displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

    /**
     * Get the description property: Localized description for the metadata.
     *
     * @return the description value.
     */
    public Map<String, String> description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Set the description property: Localized description for the metadata.
     *
     * @param description the description value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withDescription(Map<String, String> description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the provisioningState property: Provisioning state.
     *
     * @return the provisioningState value.
     */
    public ProvisioningStates provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the role property: Type of roles.
     *
     * @return the role value.
     */
    public RoleTypes role() {
        return this.innerProperties() == null ? null : this.innerProperties().role();
    }

    /**
     * Set the role property: Type of roles.
     *
     * @param role the role value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withRole(RoleTypes role) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withRole(role);
        return this;
    }

    /**
     * Get the principals property: The principals being assigned to.
     *
     * @return the principals value.
     */
    public List<AssignmentPrincipal> principals() {
        return this.innerProperties() == null ? null : this.innerProperties().principals();
    }

    /**
     * Set the principals property: The principals being assigned to.
     *
     * @param principals the principals value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withPrincipals(List<AssignmentPrincipal> principals) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withPrincipals(principals);
        return this;
    }

    /**
     * Get the profiles property: Profiles set for the assignment.
     *
     * @return the profiles value.
     */
    public ResourceSetDescription profiles() {
        return this.innerProperties() == null ? null : this.innerProperties().profiles();
    }

    /**
     * Set the profiles property: Profiles set for the assignment.
     *
     * @param profiles the profiles value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withProfiles(ResourceSetDescription profiles) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withProfiles(profiles);
        return this;
    }

    /**
     * Get the interactions property: Interactions set for the assignment.
     *
     * @return the interactions value.
     */
    public ResourceSetDescription interactions() {
        return this.innerProperties() == null ? null : this.innerProperties().interactions();
    }

    /**
     * Set the interactions property: Interactions set for the assignment.
     *
     * @param interactions the interactions value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withInteractions(ResourceSetDescription interactions) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withInteractions(interactions);
        return this;
    }

    /**
     * Get the links property: Links set for the assignment.
     *
     * @return the links value.
     */
    public ResourceSetDescription links() {
        return this.innerProperties() == null ? null : this.innerProperties().links();
    }

    /**
     * Set the links property: Links set for the assignment.
     *
     * @param links the links value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withLinks(ResourceSetDescription links) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withLinks(links);
        return this;
    }

    /**
     * Get the kpis property: Kpis set for the assignment.
     *
     * @return the kpis value.
     */
    public ResourceSetDescription kpis() {
        return this.innerProperties() == null ? null : this.innerProperties().kpis();
    }

    /**
     * Set the kpis property: Kpis set for the assignment.
     *
     * @param kpis the kpis value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withKpis(ResourceSetDescription kpis) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withKpis(kpis);
        return this;
    }

    /**
     * Get the sasPolicies property: Sas Policies set for the assignment.
     *
     * @return the sasPolicies value.
     */
    public ResourceSetDescription sasPolicies() {
        return this.innerProperties() == null ? null : this.innerProperties().sasPolicies();
    }

    /**
     * Set the sasPolicies property: Sas Policies set for the assignment.
     *
     * @param sasPolicies the sasPolicies value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withSasPolicies(ResourceSetDescription sasPolicies) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withSasPolicies(sasPolicies);
        return this;
    }

    /**
     * Get the connectors property: Connectors set for the assignment.
     *
     * @return the connectors value.
     */
    public ResourceSetDescription connectors() {
        return this.innerProperties() == null ? null : this.innerProperties().connectors();
    }

    /**
     * Set the connectors property: Connectors set for the assignment.
     *
     * @param connectors the connectors value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withConnectors(ResourceSetDescription connectors) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withConnectors(connectors);
        return this;
    }

    /**
     * Get the views property: Views set for the assignment.
     *
     * @return the views value.
     */
    public ResourceSetDescription views() {
        return this.innerProperties() == null ? null : this.innerProperties().views();
    }

    /**
     * Set the views property: Views set for the assignment.
     *
     * @param views the views value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withViews(ResourceSetDescription views) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withViews(views);
        return this;
    }

    /**
     * Get the relationshipLinks property: The Role assignments set for the relationship links.
     *
     * @return the relationshipLinks value.
     */
    public ResourceSetDescription relationshipLinks() {
        return this.innerProperties() == null ? null : this.innerProperties().relationshipLinks();
    }

    /**
     * Set the relationshipLinks property: The Role assignments set for the relationship links.
     *
     * @param relationshipLinks the relationshipLinks value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withRelationshipLinks(ResourceSetDescription relationshipLinks) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withRelationshipLinks(relationshipLinks);
        return this;
    }

    /**
     * Get the relationships property: The Role assignments set for the relationships.
     *
     * @return the relationships value.
     */
    public ResourceSetDescription relationships() {
        return this.innerProperties() == null ? null : this.innerProperties().relationships();
    }

    /**
     * Set the relationships property: The Role assignments set for the relationships.
     *
     * @param relationships the relationships value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withRelationships(ResourceSetDescription relationships) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withRelationships(relationships);
        return this;
    }

    /**
     * Get the widgetTypes property: Widget types set for the assignment.
     *
     * @return the widgetTypes value.
     */
    public ResourceSetDescription widgetTypes() {
        return this.innerProperties() == null ? null : this.innerProperties().widgetTypes();
    }

    /**
     * Set the widgetTypes property: Widget types set for the assignment.
     *
     * @param widgetTypes the widgetTypes value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withWidgetTypes(ResourceSetDescription widgetTypes) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withWidgetTypes(widgetTypes);
        return this;
    }

    /**
     * Get the roleAssignments property: The Role assignments set for the assignment.
     *
     * @return the roleAssignments value.
     */
    public ResourceSetDescription roleAssignments() {
        return this.innerProperties() == null ? null : this.innerProperties().roleAssignments();
    }

    /**
     * Set the roleAssignments property: The Role assignments set for the assignment.
     *
     * @param roleAssignments the roleAssignments value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withRoleAssignments(ResourceSetDescription roleAssignments) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withRoleAssignments(roleAssignments);
        return this;
    }

    /**
     * Get the conflationPolicies property: Widget types set for the assignment.
     *
     * @return the conflationPolicies value.
     */
    public ResourceSetDescription conflationPolicies() {
        return this.innerProperties() == null ? null : this.innerProperties().conflationPolicies();
    }

    /**
     * Set the conflationPolicies property: Widget types set for the assignment.
     *
     * @param conflationPolicies the conflationPolicies value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withConflationPolicies(ResourceSetDescription conflationPolicies) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withConflationPolicies(conflationPolicies);
        return this;
    }

    /**
     * Get the segments property: The Role assignments set for the assignment.
     *
     * @return the segments value.
     */
    public ResourceSetDescription segments() {
        return this.innerProperties() == null ? null : this.innerProperties().segments();
    }

    /**
     * Set the segments property: The Role assignments set for the assignment.
     *
     * @param segments the segments value to set.
     * @return the RoleAssignmentResourceFormatInner object itself.
     */
    public RoleAssignmentResourceFormatInner withSegments(ResourceSetDescription segments) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RoleAssignment();
        }
        this.innerProperties().withSegments(segments);
        return this;
    }

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