
com.azure.resourcemanager.billing.implementation.PartnerTransfersImpl 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.billing.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.billing.fluent.PartnerTransfersClient;
import com.azure.resourcemanager.billing.fluent.models.PartnerTransferDetailsInner;
import com.azure.resourcemanager.billing.models.PartnerInitiateTransferRequest;
import com.azure.resourcemanager.billing.models.PartnerTransferDetails;
import com.azure.resourcemanager.billing.models.PartnerTransfers;
public final class PartnerTransfersImpl implements PartnerTransfers {
private static final ClientLogger LOGGER = new ClientLogger(PartnerTransfersImpl.class);
private final PartnerTransfersClient innerClient;
private final com.azure.resourcemanager.billing.BillingManager serviceManager;
public PartnerTransfersImpl(PartnerTransfersClient innerClient,
com.azure.resourcemanager.billing.BillingManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public Response getWithResponse(String billingAccountName, String billingProfileName,
String customerName, String transferName, Context context) {
Response inner = this.serviceClient()
.getWithResponse(billingAccountName, billingProfileName, customerName, transferName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new PartnerTransferDetailsImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public PartnerTransferDetails get(String billingAccountName, String billingProfileName, String customerName,
String transferName) {
PartnerTransferDetailsInner inner
= this.serviceClient().get(billingAccountName, billingProfileName, customerName, transferName);
if (inner != null) {
return new PartnerTransferDetailsImpl(inner, this.manager());
} else {
return null;
}
}
public Response initiateWithResponse(String billingAccountName, String billingProfileName,
String customerName, String transferName, PartnerInitiateTransferRequest parameters, Context context) {
Response inner = this.serviceClient()
.initiateWithResponse(billingAccountName, billingProfileName, customerName, transferName, parameters,
context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new PartnerTransferDetailsImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public PartnerTransferDetails initiate(String billingAccountName, String billingProfileName, String customerName,
String transferName, PartnerInitiateTransferRequest parameters) {
PartnerTransferDetailsInner inner = this.serviceClient()
.initiate(billingAccountName, billingProfileName, customerName, transferName, parameters);
if (inner != null) {
return new PartnerTransferDetailsImpl(inner, this.manager());
} else {
return null;
}
}
public Response cancelWithResponse(String billingAccountName, String billingProfileName,
String customerName, String transferName, Context context) {
Response inner = this.serviceClient()
.cancelWithResponse(billingAccountName, billingProfileName, customerName, transferName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new PartnerTransferDetailsImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public PartnerTransferDetails cancel(String billingAccountName, String billingProfileName, String customerName,
String transferName) {
PartnerTransferDetailsInner inner
= this.serviceClient().cancel(billingAccountName, billingProfileName, customerName, transferName);
if (inner != null) {
return new PartnerTransferDetailsImpl(inner, this.manager());
} else {
return null;
}
}
public PagedIterable list(String billingAccountName, String billingProfileName,
String customerName) {
PagedIterable inner
= this.serviceClient().list(billingAccountName, billingProfileName, customerName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerTransferDetailsImpl(inner1, this.manager()));
}
public PagedIterable list(String billingAccountName, String billingProfileName,
String customerName, Context context) {
PagedIterable inner
= this.serviceClient().list(billingAccountName, billingProfileName, customerName, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new PartnerTransferDetailsImpl(inner1, this.manager()));
}
private PartnerTransfersClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.billing.BillingManager manager() {
return this.serviceManager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy