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

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

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

/** The trusted identity provider properties to use when creating a new trusted identity provider. */
@Fluent
public final class CreateOrUpdateTrustedIdProviderProperties {
    /*
     * The URL of this trusted identity provider.
     */
    @JsonProperty(value = "idProvider", required = true)
    private String idProvider;

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

    /**
     * Get the idProvider property: The URL of this trusted identity provider.
     *
     * @return the idProvider value.
     */
    public String idProvider() {
        return this.idProvider;
    }

    /**
     * Set the idProvider property: The URL of this trusted identity provider.
     *
     * @param idProvider the idProvider value to set.
     * @return the CreateOrUpdateTrustedIdProviderProperties object itself.
     */
    public CreateOrUpdateTrustedIdProviderProperties withIdProvider(String idProvider) {
        this.idProvider = idProvider;
        return this;
    }

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

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