// 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.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** The updatable properties of the MonitorResource. */
@Fluent
public final class MonitorResourceUpdate {
    /*
     * Resource tags.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

    /*
     * 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;

    /**
     * Get the tags property: Resource tags.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: Resource tags.
     *
     * @param tags the tags value to set.
     * @return the MonitorResourceUpdate object itself.
     */
    public MonitorResourceUpdate withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * 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 MonitorResourceUpdate object itself.
     */
    public MonitorResourceUpdate 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 MonitorResourceUpdate object itself.
     */
    public MonitorResourceUpdate 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 MonitorResourceUpdate object itself.
     */
    public MonitorResourceUpdate 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 MonitorResourceUpdate object itself.
     */
    public MonitorResourceUpdate 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 MonitorResourceUpdate object itself.
     */
    public MonitorResourceUpdate withPlanData(PlanData planData) {
        this.planData = planData;
        return this;
    }

    /**
     * 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();
        }
    }
}
