com.microsoft.azure.management.batch.implementation.BatchAccountsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-mgmt-batch Show documentation
Show all versions of azure-mgmt-batch Show documentation
This package contains Microsoft Azure Batch Account Management SDK. This package has been deprecated. A replacement package com.azure.resourcemanager:azure-resourcemanager-batch is available as of 31-March-2022. We strongly encourage you to upgrade to continue receiving updates. See Migration Guide https://aka.ms/java-track2-migration-guide for guidance on upgrading. Refer to our deprecation policy https://azure.github.io/azure-sdk/policies_support.html for more details.
package com.microsoft.azure.management.batch.implementation;
import com.microsoft.azure.PagedList;
import com.microsoft.azure.management.apigeneration.LangDefinition;
import com.microsoft.azure.management.batch.BatchAccount;
import com.microsoft.azure.management.batch.BatchAccounts;
import com.microsoft.azure.management.resources.fluentcore.arm.Region;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl;
import com.microsoft.azure.management.storage.implementation.StorageManager;
import rx.Observable;
/**
* Implementation for BatchAccounts and its parent interfaces.
*/
@LangDefinition
public class BatchAccountsImpl
extends GroupableResourcesImpl
implements BatchAccounts {
private final StorageManager storageManager;
private ApplicationsInner applicationsClient;
private ApplicationPackagesInner applicationPackagesClient;
private LocationsInner locationClient;
protected BatchAccountsImpl(
BatchAccountsInner innerCollection,
BatchManager manager,
ApplicationsInner applicationsClient,
ApplicationPackagesInner applicationPackagesClient,
LocationsInner locationClient,
StorageManager storageManager) {
super(innerCollection, manager);
this.storageManager = storageManager;
this.applicationsClient = applicationsClient;
this.applicationPackagesClient = applicationPackagesClient;
this.locationClient = locationClient;
}
@Override
public Observable deleteAsync(String groupName, String name) {
return this.innerCollection.deleteAsync(groupName, name);
}
@Override
protected BatchAccountImpl wrapModel(String name) {
BatchAccountInner inner = new BatchAccountInner();
return new BatchAccountImpl(
name,
inner,
this.innerCollection,
super.myManager,
this.applicationsClient,
this.applicationPackagesClient,
this.storageManager);
}
@Override
public PagedList list() {
return wrapList(this.innerCollection.list());
}
@Override
public PagedList listByGroup(String resourceGroupName) {
return wrapList(this.innerCollection.listByResourceGroup(resourceGroupName));
}
@Override
protected BatchAccountImpl wrapModel(BatchAccountInner inner) {
return new BatchAccountImpl(
inner.name(),
inner,
this.innerCollection,
this.myManager,
this.applicationsClient,
this.applicationPackagesClient,
this.storageManager);
}
@Override
public BatchAccount.DefinitionStages.Blank define(String name) {
return wrapModel(name);
}
@Override
public BatchAccount getByGroup(String groupName, String name) {
return wrapModel(this.innerCollection.get(groupName, name));
}
@Override
public int getBatchAccountQuotaByLocation(Region region) {
return this.locationClient.getQuotas(region.toString()).accountQuota();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy