// 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.fasterxml.jackson.annotation.JsonProperty;

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

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

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

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

    /**
     * Set the roleName property: The role name.
     *
     * @param roleName the roleName value to set.
     * @return the RoleResourceFormatInner object itself.
     */
    public RoleResourceFormatInner withRoleName(String roleName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new Role();
        }
        this.innerProperties().withRoleName(roleName);
        return this;
    }

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

    /**
     * Set the description property: The description of the role.
     *
     * @param description the description value to set.
     * @return the RoleResourceFormatInner object itself.
     */
    public RoleResourceFormatInner withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new Role();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

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