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

package com.azure.resourcemanager.devspaces.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Parameters for listing connection details of an Azure Dev Spaces Controller. */
@Fluent
public final class ListConnectionDetailsParameters {
    /*
     * Resource ID of the target container host mapped to the Azure Dev Spaces Controller.
     */
    @JsonProperty(value = "targetContainerHostResourceId", required = true)
    private String targetContainerHostResourceId;

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

    /**
     * Get the targetContainerHostResourceId property: Resource ID of the target container host mapped to the Azure Dev
     * Spaces Controller.
     *
     * @return the targetContainerHostResourceId value.
     */
    public String targetContainerHostResourceId() {
        return this.targetContainerHostResourceId;
    }

    /**
     * Set the targetContainerHostResourceId property: Resource ID of the target container host mapped to the Azure Dev
     * Spaces Controller.
     *
     * @param targetContainerHostResourceId the targetContainerHostResourceId value to set.
     * @return the ListConnectionDetailsParameters object itself.
     */
    public ListConnectionDetailsParameters withTargetContainerHostResourceId(String targetContainerHostResourceId) {
        this.targetContainerHostResourceId = targetContainerHostResourceId;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (targetContainerHostResourceId() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property targetContainerHostResourceId in model"
                            + " ListConnectionDetailsParameters"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(ListConnectionDetailsParameters.class);
}
