com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageJob Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-recoveryservicesbackup Show documentation
Show all versions of azure-resourcemanager-recoveryservicesbackup Show documentation
This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2024-04.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.recoveryservicesbackup.models;
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.List;
/**
* Azure storage specific job.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType")
@JsonTypeName("AzureStorageJob")
@Fluent
public final class AzureStorageJob extends Job {
/*
* Time elapsed during the execution of this job.
*/
@JsonProperty(value = "duration")
private Duration duration;
/*
* Gets or sets the state/actions applicable on this job like cancel/retry.
*/
@JsonProperty(value = "actionsInfo")
private List actionsInfo;
/*
* Error details on execution of this job.
*/
@JsonProperty(value = "errorDetails")
private List errorDetails;
/*
* Specifies friendly name of the storage account.
*/
@JsonProperty(value = "storageAccountName")
private String storageAccountName;
/*
* Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account.
*/
@JsonProperty(value = "storageAccountVersion")
private String storageAccountVersion;
/*
* Additional information about the job.
*/
@JsonProperty(value = "extendedInfo")
private AzureStorageJobExtendedInfo extendedInfo;
/*
* Indicated that whether the job is adhoc(true) or scheduled(false)
*/
@JsonProperty(value = "isUserTriggered")
private Boolean isUserTriggered;
/**
* Creates an instance of AzureStorageJob class.
*/
public AzureStorageJob() {
}
/**
* Get the duration property: Time elapsed during the execution of this job.
*
* @return the duration value.
*/
public Duration duration() {
return this.duration;
}
/**
* Set the duration property: Time elapsed during the execution of this job.
*
* @param duration the duration value to set.
* @return the AzureStorageJob object itself.
*/
public AzureStorageJob withDuration(Duration duration) {
this.duration = duration;
return this;
}
/**
* Get the actionsInfo property: Gets or sets the state/actions applicable on this job like cancel/retry.
*
* @return the actionsInfo value.
*/
public List actionsInfo() {
return this.actionsInfo;
}
/**
* Set the actionsInfo property: Gets or sets the state/actions applicable on this job like cancel/retry.
*
* @param actionsInfo the actionsInfo value to set.
* @return the AzureStorageJob object itself.
*/
public AzureStorageJob withActionsInfo(List actionsInfo) {
this.actionsInfo = actionsInfo;
return this;
}
/**
* Get the errorDetails property: Error details on execution of this job.
*
* @return the errorDetails value.
*/
public List errorDetails() {
return this.errorDetails;
}
/**
* Set the errorDetails property: Error details on execution of this job.
*
* @param errorDetails the errorDetails value to set.
* @return the AzureStorageJob object itself.
*/
public AzureStorageJob withErrorDetails(List errorDetails) {
this.errorDetails = errorDetails;
return this;
}
/**
* Get the storageAccountName property: Specifies friendly name of the storage account.
*
* @return the storageAccountName value.
*/
public String storageAccountName() {
return this.storageAccountName;
}
/**
* Set the storageAccountName property: Specifies friendly name of the storage account.
*
* @param storageAccountName the storageAccountName value to set.
* @return the AzureStorageJob object itself.
*/
public AzureStorageJob withStorageAccountName(String storageAccountName) {
this.storageAccountName = storageAccountName;
return this;
}
/**
* Get the storageAccountVersion property: Specifies whether the Storage account is a Classic or an Azure Resource
* Manager Storage account.
*
* @return the storageAccountVersion value.
*/
public String storageAccountVersion() {
return this.storageAccountVersion;
}
/**
* Set the storageAccountVersion property: Specifies whether the Storage account is a Classic or an Azure Resource
* Manager Storage account.
*
* @param storageAccountVersion the storageAccountVersion value to set.
* @return the AzureStorageJob object itself.
*/
public AzureStorageJob withStorageAccountVersion(String storageAccountVersion) {
this.storageAccountVersion = storageAccountVersion;
return this;
}
/**
* Get the extendedInfo property: Additional information about the job.
*
* @return the extendedInfo value.
*/
public AzureStorageJobExtendedInfo extendedInfo() {
return this.extendedInfo;
}
/**
* Set the extendedInfo property: Additional information about the job.
*
* @param extendedInfo the extendedInfo value to set.
* @return the AzureStorageJob object itself.
*/
public AzureStorageJob withExtendedInfo(AzureStorageJobExtendedInfo extendedInfo) {
this.extendedInfo = extendedInfo;
return this;
}
/**
* Get the isUserTriggered property: Indicated that whether the job is adhoc(true) or scheduled(false).
*
* @return the isUserTriggered value.
*/
public Boolean isUserTriggered() {
return this.isUserTriggered;
}
/**
* Set the isUserTriggered property: Indicated that whether the job is adhoc(true) or scheduled(false).
*
* @param isUserTriggered the isUserTriggered value to set.
* @return the AzureStorageJob object itself.
*/
public AzureStorageJob withIsUserTriggered(Boolean isUserTriggered) {
this.isUserTriggered = isUserTriggered;
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureStorageJob withEntityFriendlyName(String entityFriendlyName) {
super.withEntityFriendlyName(entityFriendlyName);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureStorageJob withBackupManagementType(BackupManagementType backupManagementType) {
super.withBackupManagementType(backupManagementType);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureStorageJob withOperation(String operation) {
super.withOperation(operation);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureStorageJob withStatus(String status) {
super.withStatus(status);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureStorageJob withStartTime(OffsetDateTime startTime) {
super.withStartTime(startTime);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureStorageJob withEndTime(OffsetDateTime endTime) {
super.withEndTime(endTime);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureStorageJob withActivityId(String activityId) {
super.withActivityId(activityId);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
super.validate();
if (errorDetails() != null) {
errorDetails().forEach(e -> e.validate());
}
if (extendedInfo() != null) {
extendedInfo().validate();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy