// 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 WidgetTypeResourceFormat. */
@Fluent
public final class WidgetTypeResourceFormatInner extends ProxyResource {
    /*
     * Definition of WidgetType.
     */
    @JsonProperty(value = "properties")
    private WidgetType innerProperties;

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

    /**
     * Get the innerProperties property: Definition of WidgetType.
     *
     * @return the innerProperties value.
     */
    private WidgetType innerProperties() {
        return this.innerProperties;
    }

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

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

    /**
     * Set the definition property: Definition for widget type.
     *
     * @param definition the definition value to set.
     * @return the WidgetTypeResourceFormatInner object itself.
     */
    public WidgetTypeResourceFormatInner withDefinition(String definition) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WidgetType();
        }
        this.innerProperties().withDefinition(definition);
        return this;
    }

    /**
     * Get the description property: Description for widget type.
     *
     * @return the description value.
     */
    public String description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Set the description property: Description for widget type.
     *
     * @param description the description value to set.
     * @return the WidgetTypeResourceFormatInner object itself.
     */
    public WidgetTypeResourceFormatInner withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WidgetType();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the displayName property: Localized display name for the widget type.
     *
     * @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 widget type.
     *
     * @param displayName the displayName value to set.
     * @return the WidgetTypeResourceFormatInner object itself.
     */
    public WidgetTypeResourceFormatInner withDisplayName(Map<String, String> displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WidgetType();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

    /**
     * Get the imageUrl property: The image URL.
     *
     * @return the imageUrl value.
     */
    public String imageUrl() {
        return this.innerProperties() == null ? null : this.innerProperties().imageUrl();
    }

    /**
     * Set the imageUrl property: The image URL.
     *
     * @param imageUrl the imageUrl value to set.
     * @return the WidgetTypeResourceFormatInner object itself.
     */
    public WidgetTypeResourceFormatInner withImageUrl(String imageUrl) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WidgetType();
        }
        this.innerProperties().withImageUrl(imageUrl);
        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 widgetVersion property: The widget version.
     *
     * @return the widgetVersion value.
     */
    public String widgetVersion() {
        return this.innerProperties() == null ? null : this.innerProperties().widgetVersion();
    }

    /**
     * Set the widgetVersion property: The widget version.
     *
     * @param widgetVersion the widgetVersion value to set.
     * @return the WidgetTypeResourceFormatInner object itself.
     */
    public WidgetTypeResourceFormatInner withWidgetVersion(String widgetVersion) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WidgetType();
        }
        this.innerProperties().withWidgetVersion(widgetVersion);
        return this;
    }

    /**
     * Get the changed property: Date time when widget type 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 widget type 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();
        }
    }
}
