com.azure.resourcemanager.dataprotection.implementation.RestorableTimeRangesImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-dataprotection Show documentation
Show all versions of azure-resourcemanager-dataprotection Show documentation
This package contains Microsoft Azure SDK for DataProtection 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 Data Protection service. Package tag package-2024-04.
The 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.dataprotection.implementation;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.dataprotection.fluent.RestorableTimeRangesClient;
import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner;
import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest;
import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponseResource;
import com.azure.resourcemanager.dataprotection.models.RestorableTimeRanges;
public final class RestorableTimeRangesImpl implements RestorableTimeRanges {
private static final ClientLogger LOGGER = new ClientLogger(RestorableTimeRangesImpl.class);
private final RestorableTimeRangesClient innerClient;
private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
public RestorableTimeRangesImpl(RestorableTimeRangesClient innerClient,
com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public Response findWithResponse(String resourceGroupName,
String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters,
Context context) {
Response inner = this.serviceClient()
.findWithResponse(resourceGroupName, vaultName, backupInstanceName, parameters, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new AzureBackupFindRestorableTimeRangesResponseResourceImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public AzureBackupFindRestorableTimeRangesResponseResource find(String resourceGroupName, String vaultName,
String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters) {
AzureBackupFindRestorableTimeRangesResponseResourceInner inner
= this.serviceClient().find(resourceGroupName, vaultName, backupInstanceName, parameters);
if (inner != null) {
return new AzureBackupFindRestorableTimeRangesResponseResourceImpl(inner, this.manager());
} else {
return null;
}
}
private RestorableTimeRangesClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() {
return this.serviceManager;
}
}