
com.azure.resourcemanager.eventgrid.implementation.EventSubscriptionsImpl 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.EventSubscriptionsClient;
import com.azure.resourcemanager.eventgrid.fluent.models.DeliveryAttributeListResultInner;
import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionFullUrlInner;
import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner;
import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeListResult;
import com.azure.resourcemanager.eventgrid.models.EventSubscription;
import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl;
import com.azure.resourcemanager.eventgrid.models.EventSubscriptions;
import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters;
public final class EventSubscriptionsImpl implements EventSubscriptions {
private static final ClientLogger LOGGER = new ClientLogger(EventSubscriptionsImpl.class);
private final EventSubscriptionsClient innerClient;
private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager;
public EventSubscriptionsImpl(EventSubscriptionsClient innerClient,
com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public Response getDeliveryAttributesWithResponse(String scope,
String eventSubscriptionName, Context context) {
Response inner
= this.serviceClient().getDeliveryAttributesWithResponse(scope, eventSubscriptionName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new DeliveryAttributeListResultImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName) {
DeliveryAttributeListResultInner inner
= this.serviceClient().getDeliveryAttributes(scope, eventSubscriptionName);
if (inner != null) {
return new DeliveryAttributeListResultImpl(inner, this.manager());
} else {
return null;
}
}
public Response getWithResponse(String scope, String eventSubscriptionName, Context context) {
Response inner
= this.serviceClient().getWithResponse(scope, eventSubscriptionName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new EventSubscriptionImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public EventSubscription get(String scope, String eventSubscriptionName) {
EventSubscriptionInner inner = this.serviceClient().get(scope, eventSubscriptionName);
if (inner != null) {
return new EventSubscriptionImpl(inner, this.manager());
} else {
return null;
}
}
public EventSubscription createOrUpdate(String scope, String eventSubscriptionName,
EventSubscriptionInner eventSubscriptionInfo) {
EventSubscriptionInner inner
= this.serviceClient().createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo);
if (inner != null) {
return new EventSubscriptionImpl(inner, this.manager());
} else {
return null;
}
}
public EventSubscription createOrUpdate(String scope, String eventSubscriptionName,
EventSubscriptionInner eventSubscriptionInfo, Context context) {
EventSubscriptionInner inner
= this.serviceClient().createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, context);
if (inner != null) {
return new EventSubscriptionImpl(inner, this.manager());
} else {
return null;
}
}
public void deleteByResourceGroup(String scope, String eventSubscriptionName) {
this.serviceClient().delete(scope, eventSubscriptionName);
}
public void delete(String scope, String eventSubscriptionName, Context context) {
this.serviceClient().delete(scope, eventSubscriptionName, context);
}
public EventSubscription update(String scope, String eventSubscriptionName,
EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) {
EventSubscriptionInner inner
= this.serviceClient().update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters);
if (inner != null) {
return new EventSubscriptionImpl(inner, this.manager());
} else {
return null;
}
}
public EventSubscription update(String scope, String eventSubscriptionName,
EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) {
EventSubscriptionInner inner
= this.serviceClient().update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, context);
if (inner != null) {
return new EventSubscriptionImpl(inner, this.manager());
} else {
return null;
}
}
public Response getFullUrlWithResponse(String scope, String eventSubscriptionName,
Context context) {
Response inner
= this.serviceClient().getFullUrlWithResponse(scope, eventSubscriptionName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public EventSubscriptionFullUrl getFullUrl(String scope, String eventSubscriptionName) {
EventSubscriptionFullUrlInner inner = this.serviceClient().getFullUrl(scope, eventSubscriptionName);
if (inner != null) {
return new EventSubscriptionFullUrlImpl(inner, this.manager());
} else {
return null;
}
}
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable list(String filter, Integer top, Context context) {
PagedIterable inner = this.serviceClient().list(filter, top, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName) {
PagedIterable inner
= this.serviceClient().listGlobalBySubscriptionForTopicType(topicTypeName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName, String filter,
Integer top, Context context) {
PagedIterable inner
= this.serviceClient().listGlobalBySubscriptionForTopicType(topicTypeName, filter, top, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top,
Context context) {
PagedIterable inner
= this.serviceClient().listByResourceGroup(resourceGroupName, filter, top, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listGlobalByResourceGroupForTopicType(String resourceGroupName,
String topicTypeName) {
PagedIterable inner
= this.serviceClient().listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listGlobalByResourceGroupForTopicType(String resourceGroupName,
String topicTypeName, String filter, Integer top, Context context) {
PagedIterable inner = this.serviceClient()
.listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName, filter, top, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listRegionalBySubscription(String location) {
PagedIterable inner = this.serviceClient().listRegionalBySubscription(location);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listRegionalBySubscription(String location, String filter, Integer top,
Context context) {
PagedIterable inner
= this.serviceClient().listRegionalBySubscription(location, filter, top, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listRegionalByResourceGroup(String resourceGroupName, String location) {
PagedIterable inner
= this.serviceClient().listRegionalByResourceGroup(resourceGroupName, location);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listRegionalByResourceGroup(String resourceGroupName, String location,
String filter, Integer top, Context context) {
PagedIterable inner
= this.serviceClient().listRegionalByResourceGroup(resourceGroupName, location, filter, top, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listRegionalBySubscriptionForTopicType(String location,
String topicTypeName) {
PagedIterable inner
= this.serviceClient().listRegionalBySubscriptionForTopicType(location, topicTypeName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listRegionalBySubscriptionForTopicType(String location,
String topicTypeName, String filter, Integer top, Context context) {
PagedIterable inner = this.serviceClient()
.listRegionalBySubscriptionForTopicType(location, topicTypeName, filter, top, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listRegionalByResourceGroupForTopicType(String resourceGroupName,
String location, String topicTypeName) {
PagedIterable inner
= this.serviceClient().listRegionalByResourceGroupForTopicType(resourceGroupName, location, topicTypeName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listRegionalByResourceGroupForTopicType(String resourceGroupName,
String location, String topicTypeName, String filter, Integer top, Context context) {
PagedIterable inner = this.serviceClient()
.listRegionalByResourceGroupForTopicType(resourceGroupName, location, topicTypeName, filter, top, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listByResource(String resourceGroupName, String providerNamespace,
String resourceTypeName, String resourceName) {
PagedIterable inner
= this.serviceClient().listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listByResource(String resourceGroupName, String providerNamespace,
String resourceTypeName, String resourceName, String filter, Integer top, Context context) {
PagedIterable inner = this.serviceClient()
.listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName, filter, top, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listByDomainTopic(String resourceGroupName, String domainName,
String topicName) {
PagedIterable inner
= this.serviceClient().listByDomainTopic(resourceGroupName, domainName, topicName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
public PagedIterable listByDomainTopic(String resourceGroupName, String domainName,
String topicName, String filter, Integer top, Context context) {
PagedIterable inner
= this.serviceClient().listByDomainTopic(resourceGroupName, domainName, topicName, filter, top, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager()));
}
private EventSubscriptionsClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.eventgrid.EventGridManager manager() {
return this.serviceManager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy