// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.ai.openai.models;

import com.azure.core.annotation.Generated;
import com.azure.core.annotation.Immutable;
import com.azure.core.models.ResponseError;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The image url if successful, and an error otherwise. */
@Immutable
public final class ImageLocation {

    /*
     * The URL that provides temporary access to download the generated image.
     */
    @Generated
    @JsonProperty(value = "url")
    private String url;

    /*
     * The error if the operation failed.
     */
    @Generated
    @JsonProperty(value = "error")
    private ResponseError error;

    /** Creates an instance of ImageLocation class. */
    @Generated
    private ImageLocation() {}

    /**
     * Get the url property: The URL that provides temporary access to download the generated image.
     *
     * @return the url value.
     */
    @Generated
    public String getUrl() {
        return this.url;
    }

    /**
     * Get the error property: The error if the operation failed.
     *
     * @return the error value.
     */
    @Generated
    public ResponseError getError() {
        return this.error;
    }
}
