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

package com.azure.resourcemanager.communication.models;

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

/** Input parameter for verification APIs. */
@Fluent
public final class VerificationParameter {
    /*
     * Type of verification.
     */
    @JsonProperty(value = "verificationType", required = true)
    private VerificationType verificationType;

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

    /**
     * Get the verificationType property: Type of verification.
     *
     * @return the verificationType value.
     */
    public VerificationType verificationType() {
        return this.verificationType;
    }

    /**
     * Set the verificationType property: Type of verification.
     *
     * @param verificationType the verificationType value to set.
     * @return the VerificationParameter object itself.
     */
    public VerificationParameter withVerificationType(VerificationType verificationType) {
        this.verificationType = verificationType;
        return this;
    }

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

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