
com.azure.resourcemanager.eventgrid.implementation.PrivateLinkResourcesImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-eventgrid Show documentation
Show all versions of azure-resourcemanager-eventgrid Show documentation
This package contains Microsoft Azure SDK for EventGrid Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure EventGrid Management Client. Package tag package-2021-10-preview.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.eventgrid.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.eventgrid.fluent.PrivateLinkResourcesClient;
import com.azure.resourcemanager.eventgrid.fluent.models.PrivateLinkResourceInner;
import com.azure.resourcemanager.eventgrid.models.PrivateLinkResource;
import com.azure.resourcemanager.eventgrid.models.PrivateLinkResources;
public final class PrivateLinkResourcesImpl implements PrivateLinkResources {
private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class);
private final PrivateLinkResourcesClient innerClient;
private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager;
public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient,
com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public Response getWithResponse(String resourceGroupName, String parentType, String parentName,
String privateLinkResourceName, Context context) {
Response inner = this.serviceClient()
.getWithResponse(resourceGroupName, parentType, parentName, privateLinkResourceName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new PrivateLinkResourceImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public PrivateLinkResource get(String resourceGroupName, String parentType, String parentName,
String privateLinkResourceName) {
PrivateLinkResourceInner inner
= this.serviceClient().get(resourceGroupName, parentType, parentName, privateLinkResourceName);
if (inner != null) {
return new PrivateLinkResourceImpl(inner, this.manager());
} else {
return null;
}
}
public PagedIterable listByResource(String resourceGroupName, String parentType,
String parentName) {
PagedIterable inner
= this.serviceClient().listByResource(resourceGroupName, parentType, parentName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
}
public PagedIterable listByResource(String resourceGroupName, String parentType,
String parentName, String filter, Integer top, Context context) {
PagedIterable inner
= this.serviceClient().listByResource(resourceGroupName, parentType, parentName, filter, top, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
}
private PrivateLinkResourcesClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.eventgrid.EventGridManager manager() {
return this.serviceManager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy