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

package com.azure.resourcemanager.devcenter.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.devcenter.models.GitCatalog;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Properties of a catalog. These properties can be updated after the resource has been created. */
@Fluent
public class CatalogUpdateProperties {
    /*
     * Properties for a GitHub catalog type.
     */
    @JsonProperty(value = "gitHub")
    private GitCatalog gitHub;

    /*
     * Properties for an Azure DevOps catalog type.
     */
    @JsonProperty(value = "adoGit")
    private GitCatalog adoGit;

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

    /**
     * Get the gitHub property: Properties for a GitHub catalog type.
     *
     * @return the gitHub value.
     */
    public GitCatalog gitHub() {
        return this.gitHub;
    }

    /**
     * Set the gitHub property: Properties for a GitHub catalog type.
     *
     * @param gitHub the gitHub value to set.
     * @return the CatalogUpdateProperties object itself.
     */
    public CatalogUpdateProperties withGitHub(GitCatalog gitHub) {
        this.gitHub = gitHub;
        return this;
    }

    /**
     * Get the adoGit property: Properties for an Azure DevOps catalog type.
     *
     * @return the adoGit value.
     */
    public GitCatalog adoGit() {
        return this.adoGit;
    }

    /**
     * Set the adoGit property: Properties for an Azure DevOps catalog type.
     *
     * @param adoGit the adoGit value to set.
     * @return the CatalogUpdateProperties object itself.
     */
    public CatalogUpdateProperties withAdoGit(GitCatalog adoGit) {
        this.adoGit = adoGit;
        return this;
    }

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