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

com.azure.resourcemanager.cosmos.models.RestorableSqlDatabasePropertiesResource Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure CosmosDB SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt

There is a newer version: 2.46.0
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.cosmos.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * The resource of an Azure Cosmos DB SQL database event.
 */
@Fluent
public final class RestorableSqlDatabasePropertiesResource {
    /*
     * A system generated property. A unique identifier.
     */
    @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY)
    private String rid;

    /*
     * The operation type of this database event.
     */
    @JsonProperty(value = "operationType", access = JsonProperty.Access.WRITE_ONLY)
    private OperationType operationType;

    /*
     * A state of this database to identify if this database is restorable in same account.
     */
    @JsonProperty(value = "canUndelete", access = JsonProperty.Access.WRITE_ONLY)
    private String canUndelete;

    /*
     * The reason why this database can not be restored in same account.
     */
    @JsonProperty(value = "canUndeleteReason", access = JsonProperty.Access.WRITE_ONLY)
    private String canUndeleteReason;

    /*
     * The time when this database event happened.
     */
    @JsonProperty(value = "eventTimestamp", access = JsonProperty.Access.WRITE_ONLY)
    private String eventTimestamp;

    /*
     * The name of the SQL database.
     */
    @JsonProperty(value = "ownerId", access = JsonProperty.Access.WRITE_ONLY)
    private String ownerId;

    /*
     * The resource ID of the SQL database.
     */
    @JsonProperty(value = "ownerResourceId", access = JsonProperty.Access.WRITE_ONLY)
    private String ownerResourceId;

    /*
     * Cosmos DB SQL database resource object
     */
    @JsonProperty(value = "database")
    private RestorableSqlDatabasePropertiesResourceDatabase database;

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

    /**
     * Get the rid property: A system generated property. A unique identifier.
     * 
     * @return the rid value.
     */
    public String rid() {
        return this.rid;
    }

    /**
     * Get the operationType property: The operation type of this database event.
     * 
     * @return the operationType value.
     */
    public OperationType operationType() {
        return this.operationType;
    }

    /**
     * Get the canUndelete property: A state of this database to identify if this database is restorable in same
     * account.
     * 
     * @return the canUndelete value.
     */
    public String canUndelete() {
        return this.canUndelete;
    }

    /**
     * Get the canUndeleteReason property: The reason why this database can not be restored in same account.
     * 
     * @return the canUndeleteReason value.
     */
    public String canUndeleteReason() {
        return this.canUndeleteReason;
    }

    /**
     * Get the eventTimestamp property: The time when this database event happened.
     * 
     * @return the eventTimestamp value.
     */
    public String eventTimestamp() {
        return this.eventTimestamp;
    }

    /**
     * Get the ownerId property: The name of the SQL database.
     * 
     * @return the ownerId value.
     */
    public String ownerId() {
        return this.ownerId;
    }

    /**
     * Get the ownerResourceId property: The resource ID of the SQL database.
     * 
     * @return the ownerResourceId value.
     */
    public String ownerResourceId() {
        return this.ownerResourceId;
    }

    /**
     * Get the database property: Cosmos DB SQL database resource object.
     * 
     * @return the database value.
     */
    public RestorableSqlDatabasePropertiesResourceDatabase database() {
        return this.database;
    }

    /**
     * Set the database property: Cosmos DB SQL database resource object.
     * 
     * @param database the database value to set.
     * @return the RestorableSqlDatabasePropertiesResource object itself.
     */
    public RestorableSqlDatabasePropertiesResource
        withDatabase(RestorableSqlDatabasePropertiesResourceDatabase database) {
        this.database = database;
        return this;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy