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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.datadog.models.DatadogHostMetadata;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The DatadogHost model. */
@Fluent
public final class DatadogHostInner {
    /*
     * The name of the host.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * The aliases for the host.
     */
    @JsonProperty(value = "aliases")
    private List<String> aliases;

    /*
     * The Datadog integrations reporting metrics for the host.
     */
    @JsonProperty(value = "apps")
    private List<String> apps;

    /*
     * The meta property.
     */
    @JsonProperty(value = "meta")
    private DatadogHostMetadata meta;

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

    /**
     * Get the name property: The name of the host.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: The name of the host.
     *
     * @param name the name value to set.
     * @return the DatadogHostInner object itself.
     */
    public DatadogHostInner withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the aliases property: The aliases for the host.
     *
     * @return the aliases value.
     */
    public List<String> aliases() {
        return this.aliases;
    }

    /**
     * Set the aliases property: The aliases for the host.
     *
     * @param aliases the aliases value to set.
     * @return the DatadogHostInner object itself.
     */
    public DatadogHostInner withAliases(List<String> aliases) {
        this.aliases = aliases;
        return this;
    }

    /**
     * Get the apps property: The Datadog integrations reporting metrics for the host.
     *
     * @return the apps value.
     */
    public List<String> apps() {
        return this.apps;
    }

    /**
     * Set the apps property: The Datadog integrations reporting metrics for the host.
     *
     * @param apps the apps value to set.
     * @return the DatadogHostInner object itself.
     */
    public DatadogHostInner withApps(List<String> apps) {
        this.apps = apps;
        return this;
    }

    /**
     * Get the meta property: The meta property.
     *
     * @return the meta value.
     */
    public DatadogHostMetadata meta() {
        return this.meta;
    }

    /**
     * Set the meta property: The meta property.
     *
     * @param meta the meta value to set.
     * @return the DatadogHostInner object itself.
     */
    public DatadogHostInner withMeta(DatadogHostMetadata meta) {
        this.meta = meta;
        return this;
    }

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