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

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The DatadogHostMetadata model. */
@Fluent
public final class DatadogHostMetadata {
    /*
     * The agent version.
     */
    @JsonProperty(value = "agentVersion")
    private String agentVersion;

    /*
     * The installMethod property.
     */
    @JsonProperty(value = "installMethod")
    private DatadogInstallMethod installMethod;

    /*
     * The logsAgent property.
     */
    @JsonProperty(value = "logsAgent")
    private DatadogLogsAgent logsAgent;

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

    /**
     * Get the agentVersion property: The agent version.
     *
     * @return the agentVersion value.
     */
    public String agentVersion() {
        return this.agentVersion;
    }

    /**
     * Set the agentVersion property: The agent version.
     *
     * @param agentVersion the agentVersion value to set.
     * @return the DatadogHostMetadata object itself.
     */
    public DatadogHostMetadata withAgentVersion(String agentVersion) {
        this.agentVersion = agentVersion;
        return this;
    }

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

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

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

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

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