All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.costmanagement.fluent.models.OperationStatusInner Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for CostManagement Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions. Package tag package-2022-10.

There is a newer version: 1.0.0-beta.6
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

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

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.costmanagement.models.Status;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** The status of the long running operation. */
@Fluent
public final class OperationStatusInner {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusInner.class);

    /*
     * The status of the long running operation.
     */
    @JsonProperty(value = "status")
    private Status status;

    /*
     * The properties of the resource generated.
     */
    @JsonProperty(value = "properties")
    private ReportUrl innerProperties;

    /**
     * Get the status property: The status of the long running operation.
     *
     * @return the status value.
     */
    public Status status() {
        return this.status;
    }

    /**
     * Set the status property: The status of the long running operation.
     *
     * @param status the status value to set.
     * @return the OperationStatusInner object itself.
     */
    public OperationStatusInner withStatus(Status status) {
        this.status = status;
        return this;
    }

    /**
     * Get the innerProperties property: The properties of the resource generated.
     *
     * @return the innerProperties value.
     */
    private ReportUrl innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the reportUrl property: The URL to download the generated report.
     *
     * @return the reportUrl value.
     */
    public String reportUrl() {
        return this.innerProperties() == null ? null : this.innerProperties().reportUrl();
    }

    /**
     * Set the reportUrl property: The URL to download the generated report.
     *
     * @param reportUrl the reportUrl value to set.
     * @return the OperationStatusInner object itself.
     */
    public OperationStatusInner withReportUrl(String reportUrl) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ReportUrl();
        }
        this.innerProperties().withReportUrl(reportUrl);
        return this;
    }

    /**
     * Get the validUntil property: The time at which report URL becomes invalid.
     *
     * @return the validUntil value.
     */
    public OffsetDateTime validUntil() {
        return this.innerProperties() == null ? null : this.innerProperties().validUntil();
    }

    /**
     * Set the validUntil property: The time at which report URL becomes invalid.
     *
     * @param validUntil the validUntil value to set.
     * @return the OperationStatusInner object itself.
     */
    public OperationStatusInner withValidUntil(OffsetDateTime validUntil) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ReportUrl();
        }
        this.innerProperties().withValidUntil(validUntil);
        return this;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy