com.azure.resourcemanager.security.implementation.PricingsImpl 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.security.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.security.fluent.PricingsClient;
import com.azure.resourcemanager.security.fluent.models.PricingInner;
import com.azure.resourcemanager.security.fluent.models.PricingListInner;
import com.azure.resourcemanager.security.models.Pricing;
import com.azure.resourcemanager.security.models.PricingList;
import com.azure.resourcemanager.security.models.Pricings;
public final class PricingsImpl implements Pricings {
private static final ClientLogger LOGGER = new ClientLogger(PricingsImpl.class);
private final PricingsClient innerClient;
private final com.azure.resourcemanager.security.SecurityManager serviceManager;
public PricingsImpl(PricingsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public Response getWithResponse(String scopeId, String pricingName, Context context) {
Response inner = this.serviceClient().getWithResponse(scopeId, pricingName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new PricingImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public Pricing get(String scopeId, String pricingName) {
PricingInner inner = this.serviceClient().get(scopeId, pricingName);
if (inner != null) {
return new PricingImpl(inner, this.manager());
} else {
return null;
}
}
public Response updateWithResponse(String scopeId, String pricingName, PricingInner pricing,
Context context) {
Response inner = this.serviceClient().updateWithResponse(scopeId, pricingName, pricing, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new PricingImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public Pricing update(String scopeId, String pricingName, PricingInner pricing) {
PricingInner inner = this.serviceClient().update(scopeId, pricingName, pricing);
if (inner != null) {
return new PricingImpl(inner, this.manager());
} else {
return null;
}
}
public Response deleteByResourceGroupWithResponse(String scopeId, String pricingName, Context context) {
return this.serviceClient().deleteWithResponse(scopeId, pricingName, context);
}
public void deleteByResourceGroup(String scopeId, String pricingName) {
this.serviceClient().delete(scopeId, pricingName);
}
public Response listWithResponse(String scopeId, String filter, Context context) {
Response inner = this.serviceClient().listWithResponse(scopeId, filter, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new PricingListImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public PricingList list(String scopeId) {
PricingListInner inner = this.serviceClient().list(scopeId);
if (inner != null) {
return new PricingListImpl(inner, this.manager());
} else {
return null;
}
}
private PricingsClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.security.SecurityManager manager() {
return this.serviceManager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy