com.azure.resourcemanager.mongocluster.implementation.ReplicasImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-mongocluster Show documentation
Show all versions of azure-resourcemanager-mongocluster Show documentation
This package contains Microsoft Azure SDK for Mongo Cluster Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure Cosmos DB for MongoDB vCore resources including clusters and firewall rules.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mongocluster.implementation;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.mongocluster.fluent.ReplicasClient;
import com.azure.resourcemanager.mongocluster.fluent.models.ReplicaInner;
import com.azure.resourcemanager.mongocluster.models.Replica;
import com.azure.resourcemanager.mongocluster.models.Replicas;
public final class ReplicasImpl implements Replicas {
private static final ClientLogger LOGGER = new ClientLogger(ReplicasImpl.class);
private final ReplicasClient innerClient;
private final com.azure.resourcemanager.mongocluster.MongoClusterManager serviceManager;
public ReplicasImpl(ReplicasClient innerClient,
com.azure.resourcemanager.mongocluster.MongoClusterManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable listByParent(String resourceGroupName, String mongoClusterName) {
PagedIterable inner = this.serviceClient().listByParent(resourceGroupName, mongoClusterName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicaImpl(inner1, this.manager()));
}
public PagedIterable listByParent(String resourceGroupName, String mongoClusterName, Context context) {
PagedIterable inner
= this.serviceClient().listByParent(resourceGroupName, mongoClusterName, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicaImpl(inner1, this.manager()));
}
private ReplicasClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.mongocluster.MongoClusterManager manager() {
return this.serviceManager;
}
}