
com.azure.resourcemanager.maintenance.implementation.ApplyUpdatesImpl Maven / Gradle / Ivy
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.maintenance.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.maintenance.fluent.ApplyUpdatesClient;
import com.azure.resourcemanager.maintenance.fluent.models.ApplyUpdateInner;
import com.azure.resourcemanager.maintenance.models.ApplyUpdate;
import com.azure.resourcemanager.maintenance.models.ApplyUpdates;
public final class ApplyUpdatesImpl implements ApplyUpdates {
private static final ClientLogger LOGGER = new ClientLogger(ApplyUpdatesImpl.class);
private final ApplyUpdatesClient innerClient;
private final com.azure.resourcemanager.maintenance.MaintenanceManager serviceManager;
public ApplyUpdatesImpl(ApplyUpdatesClient innerClient,
com.azure.resourcemanager.maintenance.MaintenanceManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public Response getParentWithResponse(String resourceGroupName, String providerName,
String resourceParentType, String resourceParentName, String resourceType, String resourceName,
String applyUpdateName, Context context) {
Response inner = this.serviceClient()
.getParentWithResponse(resourceGroupName, providerName, resourceParentType, resourceParentName,
resourceType, resourceName, applyUpdateName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new ApplyUpdateImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public ApplyUpdate getParent(String resourceGroupName, String providerName, String resourceParentType,
String resourceParentName, String resourceType, String resourceName, String applyUpdateName) {
ApplyUpdateInner inner = this.serviceClient()
.getParent(resourceGroupName, providerName, resourceParentType, resourceParentName, resourceType,
resourceName, applyUpdateName);
if (inner != null) {
return new ApplyUpdateImpl(inner, this.manager());
} else {
return null;
}
}
public Response getWithResponse(String resourceGroupName, String providerName, String resourceType,
String resourceName, String applyUpdateName, Context context) {
Response inner = this.serviceClient()
.getWithResponse(resourceGroupName, providerName, resourceType, resourceName, applyUpdateName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new ApplyUpdateImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public ApplyUpdate get(String resourceGroupName, String providerName, String resourceType, String resourceName,
String applyUpdateName) {
ApplyUpdateInner inner
= this.serviceClient().get(resourceGroupName, providerName, resourceType, resourceName, applyUpdateName);
if (inner != null) {
return new ApplyUpdateImpl(inner, this.manager());
} else {
return null;
}
}
public Response createOrUpdateOrCancelWithResponse(String resourceGroupName, String providerName,
String resourceType, String resourceName, String applyUpdateName, ApplyUpdateInner applyUpdate,
Context context) {
Response inner = this.serviceClient()
.createOrUpdateOrCancelWithResponse(resourceGroupName, providerName, resourceType, resourceName,
applyUpdateName, applyUpdate, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new ApplyUpdateImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public ApplyUpdate createOrUpdateOrCancel(String resourceGroupName, String providerName, String resourceType,
String resourceName, String applyUpdateName, ApplyUpdateInner applyUpdate) {
ApplyUpdateInner inner = this.serviceClient()
.createOrUpdateOrCancel(resourceGroupName, providerName, resourceType, resourceName, applyUpdateName,
applyUpdate);
if (inner != null) {
return new ApplyUpdateImpl(inner, this.manager());
} else {
return null;
}
}
public Response createOrUpdateParentWithResponse(String resourceGroupName, String providerName,
String resourceParentType, String resourceParentName, String resourceType, String resourceName,
Context context) {
Response inner = this.serviceClient()
.createOrUpdateParentWithResponse(resourceGroupName, providerName, resourceParentType, resourceParentName,
resourceType, resourceName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new ApplyUpdateImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public ApplyUpdate createOrUpdateParent(String resourceGroupName, String providerName, String resourceParentType,
String resourceParentName, String resourceType, String resourceName) {
ApplyUpdateInner inner = this.serviceClient()
.createOrUpdateParent(resourceGroupName, providerName, resourceParentType, resourceParentName, resourceType,
resourceName);
if (inner != null) {
return new ApplyUpdateImpl(inner, this.manager());
} else {
return null;
}
}
public Response createOrUpdateWithResponse(String resourceGroupName, String providerName,
String resourceType, String resourceName, Context context) {
Response inner = this.serviceClient()
.createOrUpdateWithResponse(resourceGroupName, providerName, resourceType, resourceName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new ApplyUpdateImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public ApplyUpdate createOrUpdate(String resourceGroupName, String providerName, String resourceType,
String resourceName) {
ApplyUpdateInner inner
= this.serviceClient().createOrUpdate(resourceGroupName, providerName, resourceType, resourceName);
if (inner != null) {
return new ApplyUpdateImpl(inner, this.manager());
} else {
return null;
}
}
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplyUpdateImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplyUpdateImpl(inner1, this.manager()));
}
private ApplyUpdatesClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.maintenance.MaintenanceManager manager() {
return this.serviceManager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy