com.azure.resourcemanager.standbypool.implementation.StandbyContainerGroupPoolRuntimeViewsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-standbypool Show documentation
Show all versions of azure-resourcemanager-standbypool Show documentation
This package contains Microsoft Azure SDK for Standby Pool Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-preview-2023-12.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.standbypool.implementation;
import com.azure.core.http.rest.PagedIterable;
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.standbypool.fluent.StandbyContainerGroupPoolRuntimeViewsClient;
import com.azure.resourcemanager.standbypool.fluent.models.StandbyContainerGroupPoolRuntimeViewResourceInner;
import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolRuntimeViewResource;
import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolRuntimeViews;
public final class StandbyContainerGroupPoolRuntimeViewsImpl implements StandbyContainerGroupPoolRuntimeViews {
private static final ClientLogger LOGGER = new ClientLogger(StandbyContainerGroupPoolRuntimeViewsImpl.class);
private final StandbyContainerGroupPoolRuntimeViewsClient innerClient;
private final com.azure.resourcemanager.standbypool.StandbyPoolManager serviceManager;
public StandbyContainerGroupPoolRuntimeViewsImpl(StandbyContainerGroupPoolRuntimeViewsClient innerClient,
com.azure.resourcemanager.standbypool.StandbyPoolManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public Response getWithResponse(String resourceGroupName,
String standbyContainerGroupPoolName, String runtimeView, Context context) {
Response inner = this.serviceClient()
.getWithResponse(resourceGroupName, standbyContainerGroupPoolName, runtimeView, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new StandbyContainerGroupPoolRuntimeViewResourceImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public StandbyContainerGroupPoolRuntimeViewResource get(String resourceGroupName,
String standbyContainerGroupPoolName, String runtimeView) {
StandbyContainerGroupPoolRuntimeViewResourceInner inner
= this.serviceClient().get(resourceGroupName, standbyContainerGroupPoolName, runtimeView);
if (inner != null) {
return new StandbyContainerGroupPoolRuntimeViewResourceImpl(inner, this.manager());
} else {
return null;
}
}
public PagedIterable listByStandbyPool(String resourceGroupName,
String standbyContainerGroupPoolName) {
PagedIterable inner
= this.serviceClient().listByStandbyPool(resourceGroupName, standbyContainerGroupPoolName);
return ResourceManagerUtils.mapPage(inner,
inner1 -> new StandbyContainerGroupPoolRuntimeViewResourceImpl(inner1, this.manager()));
}
public PagedIterable listByStandbyPool(String resourceGroupName,
String standbyContainerGroupPoolName, Context context) {
PagedIterable inner
= this.serviceClient().listByStandbyPool(resourceGroupName, standbyContainerGroupPoolName, context);
return ResourceManagerUtils.mapPage(inner,
inner1 -> new StandbyContainerGroupPoolRuntimeViewResourceImpl(inner1, this.manager()));
}
private StandbyContainerGroupPoolRuntimeViewsClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.standbypool.StandbyPoolManager manager() {
return this.serviceManager;
}
}