// 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.resourcemanager.devspaces.fluent.models.ControllerUpdateParametersProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Parameters for updating an Azure Dev Spaces Controller. */
@Fluent
public final class ControllerUpdateParameters {
    /*
     * Tags for the Azure Dev Spaces Controller.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

    /*
     * The properties property.
     */
    @JsonProperty(value = "properties")
    private ControllerUpdateParametersProperties innerProperties;

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

    /**
     * Get the tags property: Tags for the Azure Dev Spaces Controller.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: Tags for the Azure Dev Spaces Controller.
     *
     * @param tags the tags value to set.
     * @return the ControllerUpdateParameters object itself.
     */
    public ControllerUpdateParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the innerProperties property: The properties property.
     *
     * @return the innerProperties value.
     */
    private ControllerUpdateParametersProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the targetContainerHostCredentialsBase64 property: Credentials of the target container host (base64).
     *
     * @return the targetContainerHostCredentialsBase64 value.
     */
    public String targetContainerHostCredentialsBase64() {
        return this.innerProperties() == null ? null : this.innerProperties().targetContainerHostCredentialsBase64();
    }

    /**
     * Set the targetContainerHostCredentialsBase64 property: Credentials of the target container host (base64).
     *
     * @param targetContainerHostCredentialsBase64 the targetContainerHostCredentialsBase64 value to set.
     * @return the ControllerUpdateParameters object itself.
     */
    public ControllerUpdateParameters withTargetContainerHostCredentialsBase64(
        String targetContainerHostCredentialsBase64) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ControllerUpdateParametersProperties();
        }
        this.innerProperties().withTargetContainerHostCredentialsBase64(targetContainerHostCredentialsBase64);
        return this;
    }

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