
com.azure.resourcemanager.billing.implementation.BillingRoleDefinitionsImpl 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.BillingRoleDefinitionsClient;
import com.azure.resourcemanager.billing.fluent.models.BillingRoleDefinitionInner;
import com.azure.resourcemanager.billing.models.BillingRoleDefinition;
import com.azure.resourcemanager.billing.models.BillingRoleDefinitions;
public final class BillingRoleDefinitionsImpl implements BillingRoleDefinitions {
private static final ClientLogger LOGGER = new ClientLogger(BillingRoleDefinitionsImpl.class);
private final BillingRoleDefinitionsClient innerClient;
private final com.azure.resourcemanager.billing.BillingManager serviceManager;
public BillingRoleDefinitionsImpl(BillingRoleDefinitionsClient innerClient,
com.azure.resourcemanager.billing.BillingManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public Response getByBillingProfileWithResponse(String billingAccountName,
String billingProfileName, String roleDefinitionName, Context context) {
Response inner = this.serviceClient()
.getByBillingProfileWithResponse(billingAccountName, billingProfileName, roleDefinitionName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new BillingRoleDefinitionImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public BillingRoleDefinition getByBillingProfile(String billingAccountName, String billingProfileName,
String roleDefinitionName) {
BillingRoleDefinitionInner inner
= this.serviceClient().getByBillingProfile(billingAccountName, billingProfileName, roleDefinitionName);
if (inner != null) {
return new BillingRoleDefinitionImpl(inner, this.manager());
} else {
return null;
}
}
public PagedIterable listByBillingProfile(String billingAccountName,
String billingProfileName) {
PagedIterable inner
= this.serviceClient().listByBillingProfile(billingAccountName, billingProfileName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager()));
}
public PagedIterable listByBillingProfile(String billingAccountName,
String billingProfileName, Context context) {
PagedIterable inner
= this.serviceClient().listByBillingProfile(billingAccountName, billingProfileName, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager()));
}
public Response getByCustomerWithResponse(String billingAccountName,
String billingProfileName, String customerName, String roleDefinitionName, Context context) {
Response inner = this.serviceClient()
.getByCustomerWithResponse(billingAccountName, billingProfileName, customerName, roleDefinitionName,
context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new BillingRoleDefinitionImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public BillingRoleDefinition getByCustomer(String billingAccountName, String billingProfileName,
String customerName, String roleDefinitionName) {
BillingRoleDefinitionInner inner = this.serviceClient()
.getByCustomer(billingAccountName, billingProfileName, customerName, roleDefinitionName);
if (inner != null) {
return new BillingRoleDefinitionImpl(inner, this.manager());
} else {
return null;
}
}
public PagedIterable listByCustomer(String billingAccountName, String billingProfileName,
String customerName) {
PagedIterable inner
= this.serviceClient().listByCustomer(billingAccountName, billingProfileName, customerName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager()));
}
public PagedIterable listByCustomer(String billingAccountName, String billingProfileName,
String customerName, Context context) {
PagedIterable inner
= this.serviceClient().listByCustomer(billingAccountName, billingProfileName, customerName, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager()));
}
public Response getByInvoiceSectionWithResponse(String billingAccountName,
String billingProfileName, String invoiceSectionName, String roleDefinitionName, Context context) {
Response inner = this.serviceClient()
.getByInvoiceSectionWithResponse(billingAccountName, billingProfileName, invoiceSectionName,
roleDefinitionName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new BillingRoleDefinitionImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public BillingRoleDefinition getByInvoiceSection(String billingAccountName, String billingProfileName,
String invoiceSectionName, String roleDefinitionName) {
BillingRoleDefinitionInner inner = this.serviceClient()
.getByInvoiceSection(billingAccountName, billingProfileName, invoiceSectionName, roleDefinitionName);
if (inner != null) {
return new BillingRoleDefinitionImpl(inner, this.manager());
} else {
return null;
}
}
public PagedIterable listByInvoiceSection(String billingAccountName,
String billingProfileName, String invoiceSectionName) {
PagedIterable inner
= this.serviceClient().listByInvoiceSection(billingAccountName, billingProfileName, invoiceSectionName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager()));
}
public PagedIterable listByInvoiceSection(String billingAccountName,
String billingProfileName, String invoiceSectionName, Context context) {
PagedIterable inner = this.serviceClient()
.listByInvoiceSection(billingAccountName, billingProfileName, invoiceSectionName, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager()));
}
public Response getByBillingAccountWithResponse(String billingAccountName,
String roleDefinitionName, Context context) {
Response inner
= this.serviceClient().getByBillingAccountWithResponse(billingAccountName, roleDefinitionName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new BillingRoleDefinitionImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public BillingRoleDefinition getByBillingAccount(String billingAccountName, String roleDefinitionName) {
BillingRoleDefinitionInner inner
= this.serviceClient().getByBillingAccount(billingAccountName, roleDefinitionName);
if (inner != null) {
return new BillingRoleDefinitionImpl(inner, this.manager());
} else {
return null;
}
}
public PagedIterable listByBillingAccount(String billingAccountName) {
PagedIterable inner = this.serviceClient().listByBillingAccount(billingAccountName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager()));
}
public PagedIterable listByBillingAccount(String billingAccountName, Context context) {
PagedIterable inner
= this.serviceClient().listByBillingAccount(billingAccountName, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager()));
}
public Response getByDepartmentWithResponse(String billingAccountName, String departmentName,
String roleDefinitionName, Context context) {
Response inner = this.serviceClient()
.getByDepartmentWithResponse(billingAccountName, departmentName, roleDefinitionName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new BillingRoleDefinitionImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public BillingRoleDefinition getByDepartment(String billingAccountName, String departmentName,
String roleDefinitionName) {
BillingRoleDefinitionInner inner
= this.serviceClient().getByDepartment(billingAccountName, departmentName, roleDefinitionName);
if (inner != null) {
return new BillingRoleDefinitionImpl(inner, this.manager());
} else {
return null;
}
}
public PagedIterable listByDepartment(String billingAccountName, String departmentName) {
PagedIterable inner
= this.serviceClient().listByDepartment(billingAccountName, departmentName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager()));
}
public PagedIterable listByDepartment(String billingAccountName, String departmentName,
Context context) {
PagedIterable inner
= this.serviceClient().listByDepartment(billingAccountName, departmentName, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager()));
}
public Response getByEnrollmentAccountWithResponse(String billingAccountName,
String enrollmentAccountName, String roleDefinitionName, Context context) {
Response inner = this.serviceClient()
.getByEnrollmentAccountWithResponse(billingAccountName, enrollmentAccountName, roleDefinitionName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new BillingRoleDefinitionImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public BillingRoleDefinition getByEnrollmentAccount(String billingAccountName, String enrollmentAccountName,
String roleDefinitionName) {
BillingRoleDefinitionInner inner = this.serviceClient()
.getByEnrollmentAccount(billingAccountName, enrollmentAccountName, roleDefinitionName);
if (inner != null) {
return new BillingRoleDefinitionImpl(inner, this.manager());
} else {
return null;
}
}
public PagedIterable listByEnrollmentAccount(String billingAccountName,
String enrollmentAccountName) {
PagedIterable inner
= this.serviceClient().listByEnrollmentAccount(billingAccountName, enrollmentAccountName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager()));
}
public PagedIterable listByEnrollmentAccount(String billingAccountName,
String enrollmentAccountName, Context context) {
PagedIterable inner
= this.serviceClient().listByEnrollmentAccount(billingAccountName, enrollmentAccountName, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingRoleDefinitionImpl(inner1, this.manager()));
}
private BillingRoleDefinitionsClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.billing.BillingManager manager() {
return this.serviceManager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy