com.azure.resourcemanager.hybridcompute.implementation.SettingsOperationsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-hybridcompute Show documentation
Show all versions of azure-resourcemanager-hybridcompute Show documentation
This package contains Microsoft Azure SDK for HybridCompute Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Hybrid Compute Management Client. Package tag package-preview-2024-07.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.hybridcompute.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.hybridcompute.fluent.SettingsOperationsClient;
import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner;
import com.azure.resourcemanager.hybridcompute.models.Settings;
import com.azure.resourcemanager.hybridcompute.models.SettingsOperations;
public final class SettingsOperationsImpl implements SettingsOperations {
private static final ClientLogger LOGGER = new ClientLogger(SettingsOperationsImpl.class);
private final SettingsOperationsClient innerClient;
private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager;
public SettingsOperationsImpl(SettingsOperationsClient innerClient,
com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public Response getWithResponse(String resourceGroupName, String baseProvider, String baseResourceType,
String baseResourceName, String settingsResourceName, Context context) {
Response inner = this.serviceClient()
.getWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName,
context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new SettingsImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public Settings get(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName,
String settingsResourceName) {
SettingsInner inner = this.serviceClient()
.get(resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName);
if (inner != null) {
return new SettingsImpl(inner, this.manager());
} else {
return null;
}
}
public Response updateWithResponse(String resourceGroupName, String baseProvider, String baseResourceType,
String baseResourceName, String settingsResourceName, SettingsInner parameters, Context context) {
Response inner = this.serviceClient()
.updateWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName,
settingsResourceName, parameters, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new SettingsImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public Settings update(String resourceGroupName, String baseProvider, String baseResourceType,
String baseResourceName, String settingsResourceName, SettingsInner parameters) {
SettingsInner inner = this.serviceClient()
.update(resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName,
parameters);
if (inner != null) {
return new SettingsImpl(inner, this.manager());
} else {
return null;
}
}
public Response patchWithResponse(String resourceGroupName, String baseProvider, String baseResourceType,
String baseResourceName, String settingsResourceName, SettingsInner parameters, Context context) {
Response inner = this.serviceClient()
.patchWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName,
settingsResourceName, parameters, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new SettingsImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public Settings patch(String resourceGroupName, String baseProvider, String baseResourceType,
String baseResourceName, String settingsResourceName, SettingsInner parameters) {
SettingsInner inner = this.serviceClient()
.patch(resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName,
parameters);
if (inner != null) {
return new SettingsImpl(inner, this.manager());
} else {
return null;
}
}
private SettingsOperationsClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() {
return this.serviceManager;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy