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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.billing.models.AddressDetails;
import com.azure.resourcemanager.billing.models.AddressValidationStatus;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Result of the address validation. */
@Fluent
public final class ValidateAddressResponseInner {
    /*
     * status of the address validation.
     */
    @JsonProperty(value = "status")
    private AddressValidationStatus status;

    /*
     * The list of suggested addresses.
     */
    @JsonProperty(value = "suggestedAddresses")
    private List<AddressDetails> suggestedAddresses;

    /*
     * Validation error message.
     */
    @JsonProperty(value = "validationMessage")
    private String validationMessage;

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

    /**
     * Get the status property: status of the address validation.
     *
     * @return the status value.
     */
    public AddressValidationStatus status() {
        return this.status;
    }

    /**
     * Set the status property: status of the address validation.
     *
     * @param status the status value to set.
     * @return the ValidateAddressResponseInner object itself.
     */
    public ValidateAddressResponseInner withStatus(AddressValidationStatus status) {
        this.status = status;
        return this;
    }

    /**
     * Get the suggestedAddresses property: The list of suggested addresses.
     *
     * @return the suggestedAddresses value.
     */
    public List<AddressDetails> suggestedAddresses() {
        return this.suggestedAddresses;
    }

    /**
     * Set the suggestedAddresses property: The list of suggested addresses.
     *
     * @param suggestedAddresses the suggestedAddresses value to set.
     * @return the ValidateAddressResponseInner object itself.
     */
    public ValidateAddressResponseInner withSuggestedAddresses(List<AddressDetails> suggestedAddresses) {
        this.suggestedAddresses = suggestedAddresses;
        return this;
    }

    /**
     * Get the validationMessage property: Validation error message.
     *
     * @return the validationMessage value.
     */
    public String validationMessage() {
        return this.validationMessage;
    }

    /**
     * Set the validationMessage property: Validation error message.
     *
     * @param validationMessage the validationMessage value to set.
     * @return the ValidateAddressResponseInner object itself.
     */
    public ValidateAddressResponseInner withValidationMessage(String validationMessage) {
        this.validationMessage = validationMessage;
        return this;
    }

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