// 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.Resource;
import com.azure.resourcemanager.customerinsights.models.HubBillingInfoFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Hub resource. */
@Fluent
public final class HubInner extends Resource {
    /*
     * Properties of hub.
     */
    @JsonProperty(value = "properties")
    private HubPropertiesFormat innerProperties;

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

    /**
     * Get the innerProperties property: Properties of hub.
     *
     * @return the innerProperties value.
     */
    private HubPropertiesFormat innerProperties() {
        return this.innerProperties;
    }

    /** {@inheritDoc} */
    @Override
    public HubInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public HubInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * Get the apiEndpoint property: API endpoint URL of the hub.
     *
     * @return the apiEndpoint value.
     */
    public String apiEndpoint() {
        return this.innerProperties() == null ? null : this.innerProperties().apiEndpoint();
    }

    /**
     * Get the webEndpoint property: Web endpoint URL of the hub.
     *
     * @return the webEndpoint value.
     */
    public String webEndpoint() {
        return this.innerProperties() == null ? null : this.innerProperties().webEndpoint();
    }

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

    /**
     * Get the tenantFeatures property: The bit flags for enabled hub features. Bit 0 is set to 1 indicates graph is
     * enabled, or disabled if set to 0. Bit 1 is set to 1 indicates the hub is disabled, or enabled if set to 0.
     *
     * @return the tenantFeatures value.
     */
    public Integer tenantFeatures() {
        return this.innerProperties() == null ? null : this.innerProperties().tenantFeatures();
    }

    /**
     * Set the tenantFeatures property: The bit flags for enabled hub features. Bit 0 is set to 1 indicates graph is
     * enabled, or disabled if set to 0. Bit 1 is set to 1 indicates the hub is disabled, or enabled if set to 0.
     *
     * @param tenantFeatures the tenantFeatures value to set.
     * @return the HubInner object itself.
     */
    public HubInner withTenantFeatures(Integer tenantFeatures) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HubPropertiesFormat();
        }
        this.innerProperties().withTenantFeatures(tenantFeatures);
        return this;
    }

    /**
     * Get the hubBillingInfo property: Billing settings of the hub.
     *
     * @return the hubBillingInfo value.
     */
    public HubBillingInfoFormat hubBillingInfo() {
        return this.innerProperties() == null ? null : this.innerProperties().hubBillingInfo();
    }

    /**
     * Set the hubBillingInfo property: Billing settings of the hub.
     *
     * @param hubBillingInfo the hubBillingInfo value to set.
     * @return the HubInner object itself.
     */
    public HubInner withHubBillingInfo(HubBillingInfoFormat hubBillingInfo) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HubPropertiesFormat();
        }
        this.innerProperties().withHubBillingInfo(hubBillingInfo);
        return this;
    }

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