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

package com.azure.resourcemanager.healthcareapis.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Azure container registry configuration information. */
@Fluent
public final class ServiceAcrConfigurationInfo {
    /*
     * The list of the ACR login servers.
     */
    @JsonProperty(value = "loginServers")
    private List<String> loginServers;

    /*
     * The list of Open Container Initiative (OCI) artifacts.
     */
    @JsonProperty(value = "ociArtifacts")
    private List<ServiceOciArtifactEntry> ociArtifacts;

    /**
     * Get the loginServers property: The list of the ACR login servers.
     *
     * @return the loginServers value.
     */
    public List<String> loginServers() {
        return this.loginServers;
    }

    /**
     * Set the loginServers property: The list of the ACR login servers.
     *
     * @param loginServers the loginServers value to set.
     * @return the ServiceAcrConfigurationInfo object itself.
     */
    public ServiceAcrConfigurationInfo withLoginServers(List<String> loginServers) {
        this.loginServers = loginServers;
        return this;
    }

    /**
     * Get the ociArtifacts property: The list of Open Container Initiative (OCI) artifacts.
     *
     * @return the ociArtifacts value.
     */
    public List<ServiceOciArtifactEntry> ociArtifacts() {
        return this.ociArtifacts;
    }

    /**
     * Set the ociArtifacts property: The list of Open Container Initiative (OCI) artifacts.
     *
     * @param ociArtifacts the ociArtifacts value to set.
     * @return the ServiceAcrConfigurationInfo object itself.
     */
    public ServiceAcrConfigurationInfo withOciArtifacts(List<ServiceOciArtifactEntry> ociArtifacts) {
        this.ociArtifacts = ociArtifacts;
        return this;
    }

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