// 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.PlanData;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Response for getting all the linkable environments. */
@Fluent
public final class LinkableEnvironmentResponseInner {
    /*
     * environment id for which user is an admin
     */
    @JsonProperty(value = "environmentId")
    private String environmentId;

    /*
     * Name of the environment
     */
    @JsonProperty(value = "environmentName")
    private String environmentName;

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

    /**
     * Get the environmentId property: environment id for which user is an admin.
     *
     * @return the environmentId value.
     */
    public String environmentId() {
        return this.environmentId;
    }

    /**
     * Set the environmentId property: environment id for which user is an admin.
     *
     * @param environmentId the environmentId value to set.
     * @return the LinkableEnvironmentResponseInner object itself.
     */
    public LinkableEnvironmentResponseInner withEnvironmentId(String environmentId) {
        this.environmentId = environmentId;
        return this;
    }

    /**
     * Get the environmentName property: Name of the environment.
     *
     * @return the environmentName value.
     */
    public String environmentName() {
        return this.environmentName;
    }

    /**
     * Set the environmentName property: Name of the environment.
     *
     * @param environmentName the environmentName value to set.
     * @return the LinkableEnvironmentResponseInner object itself.
     */
    public LinkableEnvironmentResponseInner withEnvironmentName(String environmentName) {
        this.environmentName = environmentName;
        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 LinkableEnvironmentResponseInner object itself.
     */
    public LinkableEnvironmentResponseInner withPlanData(PlanData planData) {
        this.planData = planData;
        return this;
    }

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