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

package com.azure.resourcemanager.machinelearningservices.models;

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

/** The ModelDockerSection model. */
@Fluent
public class ModelDockerSection {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelDockerSection.class);

    /*
     * Base image used for Docker-based runs. Mutually exclusive with
     * BaseDockerfile.
     */
    @JsonProperty(value = "baseImage")
    private String baseImage;

    /*
     * Base Dockerfile used for Docker-based runs. Mutually exclusive with
     * BaseImage.
     */
    @JsonProperty(value = "baseDockerfile")
    private String baseDockerfile;

    /*
     * Image registry that contains the base image.
     */
    @JsonProperty(value = "baseImageRegistry")
    private ModelDockerSectionBaseImageRegistry baseImageRegistry;

    /**
     * Get the baseImage property: Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile.
     *
     * @return the baseImage value.
     */
    public String baseImage() {
        return this.baseImage;
    }

    /**
     * Set the baseImage property: Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile.
     *
     * @param baseImage the baseImage value to set.
     * @return the ModelDockerSection object itself.
     */
    public ModelDockerSection withBaseImage(String baseImage) {
        this.baseImage = baseImage;
        return this;
    }

    /**
     * Get the baseDockerfile property: Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage.
     *
     * @return the baseDockerfile value.
     */
    public String baseDockerfile() {
        return this.baseDockerfile;
    }

    /**
     * Set the baseDockerfile property: Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage.
     *
     * @param baseDockerfile the baseDockerfile value to set.
     * @return the ModelDockerSection object itself.
     */
    public ModelDockerSection withBaseDockerfile(String baseDockerfile) {
        this.baseDockerfile = baseDockerfile;
        return this;
    }

    /**
     * Get the baseImageRegistry property: Image registry that contains the base image.
     *
     * @return the baseImageRegistry value.
     */
    public ModelDockerSectionBaseImageRegistry baseImageRegistry() {
        return this.baseImageRegistry;
    }

    /**
     * Set the baseImageRegistry property: Image registry that contains the base image.
     *
     * @param baseImageRegistry the baseImageRegistry value to set.
     * @return the ModelDockerSection object itself.
     */
    public ModelDockerSection withBaseImageRegistry(ModelDockerSectionBaseImageRegistry baseImageRegistry) {
        this.baseImageRegistry = baseImageRegistry;
        return this;
    }

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