com.azure.resourcemanager.servicefabricmanagedclusters.implementation.OperationStatusImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-servicefabricmanagedclusters Show documentation
Show all versions of azure-resourcemanager-servicefabricmanagedclusters Show documentation
This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Service Fabric Managed Clusters Management Client. 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.fluent.OperationStatusClient;
import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.LongRunningOperationResultInner;
import com.azure.resourcemanager.servicefabricmanagedclusters.models.LongRunningOperationResult;
import com.azure.resourcemanager.servicefabricmanagedclusters.models.OperationStatus;
public final class OperationStatusImpl implements OperationStatus {
private static final ClientLogger LOGGER = new ClientLogger(OperationStatusImpl.class);
private final OperationStatusClient innerClient;
private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager;
public OperationStatusImpl(OperationStatusClient innerClient,
com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public Response getWithResponse(String location, String operationId, Context context) {
Response inner
= this.serviceClient().getWithResponse(location, operationId, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new LongRunningOperationResultImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public LongRunningOperationResult get(String location, String operationId) {
LongRunningOperationResultInner inner = this.serviceClient().get(location, operationId);
if (inner != null) {
return new LongRunningOperationResultImpl(inner, this.manager());
} else {
return null;
}
}
private OperationStatusClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() {
return this.serviceManager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy