// 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;
import java.time.OffsetDateTime;
import java.util.Map;

/** The view resource format. */
@Fluent
public final class ViewResourceFormatInner extends ProxyResource {
    /*
     * The view in Customer 360 web application.
     */
    @JsonProperty(value = "properties")
    private View innerProperties;

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

    /**
     * Get the innerProperties property: The view in Customer 360 web application.
     *
     * @return the innerProperties value.
     */
    private View innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the viewName property: Name of the view.
     *
     * @return the viewName value.
     */
    public String viewName() {
        return this.innerProperties() == null ? null : this.innerProperties().viewName();
    }

    /**
     * Get the userId property: the user ID.
     *
     * @return the userId value.
     */
    public String userId() {
        return this.innerProperties() == null ? null : this.innerProperties().userId();
    }

    /**
     * Set the userId property: the user ID.
     *
     * @param userId the userId value to set.
     * @return the ViewResourceFormatInner object itself.
     */
    public ViewResourceFormatInner withUserId(String userId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new View();
        }
        this.innerProperties().withUserId(userId);
        return this;
    }

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

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

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

    /**
     * Get the definition property: View definition.
     *
     * @return the definition value.
     */
    public String definition() {
        return this.innerProperties() == null ? null : this.innerProperties().definition();
    }

    /**
     * Set the definition property: View definition.
     *
     * @param definition the definition value to set.
     * @return the ViewResourceFormatInner object itself.
     */
    public ViewResourceFormatInner withDefinition(String definition) {
        if (this.innerProperties() == null) {
            this.innerProperties = new View();
        }
        this.innerProperties().withDefinition(definition);
        return this;
    }

    /**
     * Get the changed property: Date time when view was last modified.
     *
     * @return the changed value.
     */
    public OffsetDateTime changed() {
        return this.innerProperties() == null ? null : this.innerProperties().changed();
    }

    /**
     * Get the created property: Date time when view was created.
     *
     * @return the created value.
     */
    public OffsetDateTime created() {
        return this.innerProperties() == null ? null : this.innerProperties().created();
    }

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