@Override public GenericResource.DefinitionStages.Blank define(String name) { return new GenericResourceImpl( name, new GenericResourceInner(), this.manager()); }
GenericResourceImpl(String key, GenericResourceInner innerModel, final ResourceManager resourceManager) { super(key, innerModel, resourceManager); resourceProviderNamespace = ResourceUtils.resourceProviderFromResourceId(innerModel.id()); resourceType = ResourceUtils.resourceTypeFromResourceId(innerModel.id()); parentResourcePath = ResourceUtils.parentRelativePathFromResourceId(innerModel.id()); }
@Override public Plan plan() { return inner().plan(); }
@Override public GenericResourceImpl withoutPlan() { inner().withPlan(null); return this; }
public GenericResourceImpl withProperties(Object properties) { inner().withProperties(properties); return this; }
@Override public Object properties() { return inner().properties(); }
@Override public GenericResourceImpl withoutPlan() { inner().withPlan(null); return this; }
public GenericResourceImpl withProperties(Object properties) { inner().withProperties(properties); return this; }
@Override public Object properties() { return inner().properties(); }
GenericResourceImpl(String key, GenericResourceInner innerModel, final ResourceManager resourceManager) { super(key, innerModel, resourceManager); resourceProviderNamespace = ResourceUtils.resourceProviderFromResourceId(innerModel.id()); resourceType = ResourceUtils.resourceTypeFromResourceId(innerModel.id()); parentResourcePath = ResourceUtils.parentRelativePathFromResourceId(innerModel.id()); }
@Override public GenericResource.DefinitionStages.Blank define(String name) { return new GenericResourceImpl( name, new GenericResourceInner(), this.manager()); }
public GenericResourceImpl withPlan(String name, String publisher, String product, String promotionCode) { inner().withPlan(new Plan().withName(name).withPublisher(publisher).withProduct(product).withPromotionCode(promotionCode)); return this; }
@Override public Plan plan() { return inner().plan(); }
@Override protected GenericResourceImpl wrapModel(GenericResourceInner inner) { if (inner == null) { return null; } return new GenericResourceImpl(inner.id(), inner, this.manager()) .withExistingResourceGroup(ResourceUtils.groupFromResourceId(inner.id())) .withProviderNamespace(ResourceUtils.resourceProviderFromResourceId(inner.id())) .withResourceType(ResourceUtils.resourceTypeFromResourceId(inner.id())) .withParentResourceId(ResourceUtils.parentResourceIdFromResourceId(inner.id())); }
@Override protected GenericResourceImpl wrapModel(String id) { return new GenericResourceImpl(id, new GenericResourceInner(), this.manager()) .withExistingResourceGroup(ResourceUtils.groupFromResourceId(id)) .withProviderNamespace(ResourceUtils.resourceProviderFromResourceId(id)) .withResourceType(ResourceUtils.resourceTypeFromResourceId(id)) .withParentResourceId(ResourceUtils.parentResourceIdFromResourceId(id)); }
public GenericResourceImpl withPlan(String name, String publisher, String product, String promotionCode) { inner().withPlan(new Plan().withName(name).withPublisher(publisher).withProduct(product).withPromotionCode(promotionCode)); return this; }
@Override protected GenericResourceImpl wrapModel(GenericResourceInner inner) { if (inner == null) { return null; } return new GenericResourceImpl(inner.id(), inner, this.manager()) .withExistingResourceGroup(ResourceUtils.groupFromResourceId(inner.id())) .withProviderNamespace(ResourceUtils.resourceProviderFromResourceId(inner.id())) .withResourceType(ResourceUtils.resourceTypeFromResourceId(inner.id())) .withParentResourceId(ResourceUtils.parentResourceIdFromResourceId(inner.id())); }
@Override protected GenericResourceImpl wrapModel(String id) { return new GenericResourceImpl(id, new GenericResourceInner(), this.manager()) .withExistingResourceGroup(ResourceUtils.groupFromResourceId(id)) .withProviderNamespace(ResourceUtils.resourceProviderFromResourceId(id)) .withResourceType(ResourceUtils.resourceTypeFromResourceId(id)) .withParentResourceId(ResourceUtils.parentResourceIdFromResourceId(id)); }
@Override public Observable<GenericResource> call(String api) { String name = name(); if (!isInCreateMode()) { name = ResourceUtils.nameFromResourceId(inner().id()); } return resourceClient.createOrUpdateAsync( resourceGroupName(), resourceProviderNamespace, parentResourcePath(), resourceType, name, api, inner()) .subscribeOn(SdkContext.getRxScheduler()) .map(innerToFluentMap(self)); } });
@Override public Observable<GenericResource> call(String api) { String name = name(); if (!isInCreateMode()) { name = ResourceUtils.nameFromResourceId(inner().id()); } return resourceClient.createOrUpdateAsync( resourceGroupName(), resourceProviderNamespace, parentResourcePath(), resourceType, name, api, inner()) .subscribeOn(SdkContext.getRxScheduler()) .map(innerToFluentMap(self)); } });