com.azure.resourcemanager.compute.implementation.VirtualMachineExtensionsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-compute Show documentation
Show all versions of azure-resourcemanager-compute Show documentation
This package contains Microsoft Azure Compute Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.resourcemanager.compute.implementation;
import com.azure.resourcemanager.compute.models.VirtualMachine;
import com.azure.resourcemanager.compute.models.VirtualMachineExtension;
import com.azure.resourcemanager.compute.fluent.models.VirtualMachineExtensionInner;
import com.azure.resourcemanager.compute.fluent.VirtualMachineExtensionsClient;
import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils;
import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.ExternalChildResourcesCachedImpl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Represents a extension collection associated with a virtual machine. */
class VirtualMachineExtensionsImpl
extends ExternalChildResourcesCachedImpl<
VirtualMachineExtensionImpl,
VirtualMachineExtension,
VirtualMachineExtensionInner,
VirtualMachineImpl,
VirtualMachine> {
private final VirtualMachineExtensionsClient client;
/**
* Creates new VirtualMachineExtensionsImpl.
*
* @param client the client to perform REST calls on extensions
* @param parent the parent virtual machine of the extensions
*/
VirtualMachineExtensionsImpl(VirtualMachineExtensionsClient client, VirtualMachineImpl parent) {
super(parent, parent.taskGroup(), "VirtualMachineExtension");
this.client = client;
this.cacheCollection();
}
/** @return the extension as a map indexed by name. */
public Map asMap() {
return this.asMapAsync().block();
}
/** @return an observable emits extensions in this collection as a map indexed by name. */
public Mono