com.azure.resourcemanager.monitor.implementation.ActionGroupsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-monitor Show documentation
Show all versions of azure-resourcemanager-monitor Show documentation
This package contains Microsoft Azure Monitor SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.resourcemanager.monitor.implementation;
import com.azure.resourcemanager.monitor.MonitorManager;
import com.azure.resourcemanager.monitor.models.ActionGroup;
import com.azure.resourcemanager.monitor.models.ActionGroups;
import com.azure.resourcemanager.monitor.fluent.models.ActionGroupResourceInner;
import com.azure.resourcemanager.monitor.fluent.ActionGroupsClient;
import com.azure.resourcemanager.monitor.models.EnableRequest;
import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.TopLevelModifiableResourcesImpl;
import reactor.core.publisher.Mono;
/** Implementation for {@link ActionGroups}. */
public class ActionGroupsImpl extends
TopLevelModifiableResourcesImpl
implements ActionGroups {
public ActionGroupsImpl(final MonitorManager monitorManager) {
super(monitorManager.serviceClient().getActionGroups(), monitorManager);
}
@Override
protected ActionGroupImpl wrapModel(String name) {
return new ActionGroupImpl(name, new ActionGroupResourceInner(), this.manager());
}
@Override
protected ActionGroupImpl wrapModel(ActionGroupResourceInner inner) {
if (inner == null) {
return null;
}
return new ActionGroupImpl(inner.name(), inner, this.manager());
}
@Override
public ActionGroupImpl define(String name) {
return wrapModel(name);
}
@Override
public void enableReceiver(String resourceGroupName, String actionGroupName, String receiverName) {
this.inner()
.enableReceiver(resourceGroupName, actionGroupName, new EnableRequest().withReceiverName(receiverName));
}
@Override
public Mono enableReceiverAsync(String resourceGroupName, String actionGroupName, String receiverName) {
return this.inner()
.enableReceiverAsync(resourceGroupName, actionGroupName,
new EnableRequest().withReceiverName(receiverName));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy