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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.dynatrace.models.DynatraceEnvironmentProperties;
import com.azure.resourcemanager.dynatrace.models.LiftrResourceCategories;
import com.azure.resourcemanager.dynatrace.models.MarketplaceSubscriptionStatus;
import com.azure.resourcemanager.dynatrace.models.MonitoringStatus;
import com.azure.resourcemanager.dynatrace.models.PlanData;
import com.azure.resourcemanager.dynatrace.models.ProvisioningState;
import com.azure.resourcemanager.dynatrace.models.UserInfo;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Properties specific to the monitor resource. */
@Fluent
public final class MonitorProperties {
    /*
     * Status of the monitor.
     */
    @JsonProperty(value = "monitoringStatus")
    private MonitoringStatus monitoringStatus;

    /*
     * Marketplace subscription status.
     */
    @JsonProperty(value = "marketplaceSubscriptionStatus")
    private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus;

    /*
     * Properties of the Dynatrace environment.
     */
    @JsonProperty(value = "dynatraceEnvironmentProperties")
    private DynatraceEnvironmentProperties dynatraceEnvironmentProperties;

    /*
     * User info.
     */
    @JsonProperty(value = "userInfo")
    private UserInfo userInfo;

    /*
     * Billing plan information.
     */
    @JsonProperty(value = "planData")
    private PlanData planData;

    /*
     * Liftr Resource category.
     */
    @JsonProperty(value = "liftrResourceCategory", access = JsonProperty.Access.WRITE_ONLY)
    private LiftrResourceCategories liftrResourceCategory;

    /*
     * The priority of the resource.
     */
    @JsonProperty(value = "liftrResourcePreference", access = JsonProperty.Access.WRITE_ONLY)
    private Integer liftrResourcePreference;

    /*
     * Provisioning state of the resource.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningState provisioningState;

    /**
     * Get the monitoringStatus property: Status of the monitor.
     *
     * @return the monitoringStatus value.
     */
    public MonitoringStatus monitoringStatus() {
        return this.monitoringStatus;
    }

    /**
     * Set the monitoringStatus property: Status of the monitor.
     *
     * @param monitoringStatus the monitoringStatus value to set.
     * @return the MonitorProperties object itself.
     */
    public MonitorProperties withMonitoringStatus(MonitoringStatus monitoringStatus) {
        this.monitoringStatus = monitoringStatus;
        return this;
    }

    /**
     * Get the marketplaceSubscriptionStatus property: Marketplace subscription status.
     *
     * @return the marketplaceSubscriptionStatus value.
     */
    public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() {
        return this.marketplaceSubscriptionStatus;
    }

    /**
     * Set the marketplaceSubscriptionStatus property: Marketplace subscription status.
     *
     * @param marketplaceSubscriptionStatus the marketplaceSubscriptionStatus value to set.
     * @return the MonitorProperties object itself.
     */
    public MonitorProperties withMarketplaceSubscriptionStatus(
        MarketplaceSubscriptionStatus marketplaceSubscriptionStatus) {
        this.marketplaceSubscriptionStatus = marketplaceSubscriptionStatus;
        return this;
    }

    /**
     * Get the dynatraceEnvironmentProperties property: Properties of the Dynatrace environment.
     *
     * @return the dynatraceEnvironmentProperties value.
     */
    public DynatraceEnvironmentProperties dynatraceEnvironmentProperties() {
        return this.dynatraceEnvironmentProperties;
    }

    /**
     * Set the dynatraceEnvironmentProperties property: Properties of the Dynatrace environment.
     *
     * @param dynatraceEnvironmentProperties the dynatraceEnvironmentProperties value to set.
     * @return the MonitorProperties object itself.
     */
    public MonitorProperties withDynatraceEnvironmentProperties(
        DynatraceEnvironmentProperties dynatraceEnvironmentProperties) {
        this.dynatraceEnvironmentProperties = dynatraceEnvironmentProperties;
        return this;
    }

    /**
     * Get the userInfo property: User info.
     *
     * @return the userInfo value.
     */
    public UserInfo userInfo() {
        return this.userInfo;
    }

    /**
     * Set the userInfo property: User info.
     *
     * @param userInfo the userInfo value to set.
     * @return the MonitorProperties object itself.
     */
    public MonitorProperties withUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
        return this;
    }

    /**
     * Get the planData property: Billing plan information.
     *
     * @return the planData value.
     */
    public PlanData planData() {
        return this.planData;
    }

    /**
     * Set the planData property: Billing plan information.
     *
     * @param planData the planData value to set.
     * @return the MonitorProperties object itself.
     */
    public MonitorProperties withPlanData(PlanData planData) {
        this.planData = planData;
        return this;
    }

    /**
     * Get the liftrResourceCategory property: Liftr Resource category.
     *
     * @return the liftrResourceCategory value.
     */
    public LiftrResourceCategories liftrResourceCategory() {
        return this.liftrResourceCategory;
    }

    /**
     * Get the liftrResourcePreference property: The priority of the resource.
     *
     * @return the liftrResourcePreference value.
     */
    public Integer liftrResourcePreference() {
        return this.liftrResourcePreference;
    }

    /**
     * Get the provisioningState property: Provisioning state of the resource.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.provisioningState;
    }

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