com.azure.resourcemanager.security.implementation.ApiCollectionsImpl 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.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.security.fluent.ApiCollectionsClient;
import com.azure.resourcemanager.security.fluent.models.ApiCollectionInner;
import com.azure.resourcemanager.security.models.ApiCollection;
import com.azure.resourcemanager.security.models.ApiCollections;
public final class ApiCollectionsImpl implements ApiCollections {
private static final ClientLogger LOGGER = new ClientLogger(ApiCollectionsImpl.class);
private final ApiCollectionsClient innerClient;
private final com.azure.resourcemanager.security.SecurityManager serviceManager;
public ApiCollectionsImpl(ApiCollectionsClient innerClient,
com.azure.resourcemanager.security.SecurityManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
return ResourceManagerUtils.mapPage(inner, inner1 -> new ApiCollectionImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new ApiCollectionImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new ApiCollectionImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new ApiCollectionImpl(inner1, this.manager()));
}
public PagedIterable listByAzureApiManagementService(String resourceGroupName, String serviceName) {
PagedIterable inner
= this.serviceClient().listByAzureApiManagementService(resourceGroupName, serviceName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new ApiCollectionImpl(inner1, this.manager()));
}
public PagedIterable listByAzureApiManagementService(String resourceGroupName, String serviceName,
Context context) {
PagedIterable inner
= this.serviceClient().listByAzureApiManagementService(resourceGroupName, serviceName, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new ApiCollectionImpl(inner1, this.manager()));
}
public Response getByAzureApiManagementServiceWithResponse(String resourceGroupName,
String serviceName, String apiId, Context context) {
Response inner = this.serviceClient()
.getByAzureApiManagementServiceWithResponse(resourceGroupName, serviceName, apiId, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new ApiCollectionImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public ApiCollection getByAzureApiManagementService(String resourceGroupName, String serviceName, String apiId) {
ApiCollectionInner inner
= this.serviceClient().getByAzureApiManagementService(resourceGroupName, serviceName, apiId);
if (inner != null) {
return new ApiCollectionImpl(inner, this.manager());
} else {
return null;
}
}
public ApiCollection onboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId) {
ApiCollectionInner inner
= this.serviceClient().onboardAzureApiManagementApi(resourceGroupName, serviceName, apiId);
if (inner != null) {
return new ApiCollectionImpl(inner, this.manager());
} else {
return null;
}
}
public ApiCollection onboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId,
Context context) {
ApiCollectionInner inner
= this.serviceClient().onboardAzureApiManagementApi(resourceGroupName, serviceName, apiId, context);
if (inner != null) {
return new ApiCollectionImpl(inner, this.manager());
} else {
return null;
}
}
public Response offboardAzureApiManagementApiWithResponse(String resourceGroupName, String serviceName,
String apiId, Context context) {
return this.serviceClient()
.offboardAzureApiManagementApiWithResponse(resourceGroupName, serviceName, apiId, context);
}
public void offboardAzureApiManagementApi(String resourceGroupName, String serviceName, String apiId) {
this.serviceClient().offboardAzureApiManagementApi(resourceGroupName, serviceName, apiId);
}
private ApiCollectionsClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.security.SecurityManager manager() {
return this.serviceManager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy