
com.azure.resourcemanager.mixedreality.implementation.RemoteRenderingAccountImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-mixedreality Show documentation
Show all versions of azure-resourcemanager-mixedreality Show documentation
This package contains Microsoft Azure SDK for MixedReality Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Mixed Reality Client. Package tag package-2021-01.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.mixedreality.implementation;
import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.mixedreality.fluent.models.RemoteRenderingAccountInner;
import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
import com.azure.resourcemanager.mixedreality.models.AccountKeys;
import com.azure.resourcemanager.mixedreality.models.Identity;
import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount;
import com.azure.resourcemanager.mixedreality.models.Sku;
import java.util.Collections;
import java.util.Map;
public final class RemoteRenderingAccountImpl
implements RemoteRenderingAccount, RemoteRenderingAccount.Definition, RemoteRenderingAccount.Update {
private RemoteRenderingAccountInner innerObject;
private final com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager;
public String id() {
return this.innerModel().id();
}
public String name() {
return this.innerModel().name();
}
public String type() {
return this.innerModel().type();
}
public String location() {
return this.innerModel().location();
}
public Map tags() {
Map inner = this.innerModel().tags();
if (inner != null) {
return Collections.unmodifiableMap(inner);
} else {
return Collections.emptyMap();
}
}
public Identity identity() {
return this.innerModel().identity();
}
public Identity plan() {
return this.innerModel().plan();
}
public Sku sku() {
return this.innerModel().sku();
}
public Sku kind() {
return this.innerModel().kind();
}
public SystemData systemData() {
return this.innerModel().systemData();
}
public String storageAccountName() {
return this.innerModel().storageAccountName();
}
public String accountId() {
return this.innerModel().accountId();
}
public String accountDomain() {
return this.innerModel().accountDomain();
}
public Region region() {
return Region.fromName(this.regionName());
}
public String regionName() {
return this.location();
}
public String resourceGroupName() {
return resourceGroupName;
}
public RemoteRenderingAccountInner innerModel() {
return this.innerObject;
}
private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() {
return this.serviceManager;
}
private String resourceGroupName;
private String accountName;
public RemoteRenderingAccountImpl withExistingResourceGroup(String resourceGroupName) {
this.resourceGroupName = resourceGroupName;
return this;
}
public RemoteRenderingAccount create() {
this.innerObject =
serviceManager
.serviceClient()
.getRemoteRenderingAccounts()
.createWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE)
.getValue();
return this;
}
public RemoteRenderingAccount create(Context context) {
this.innerObject =
serviceManager
.serviceClient()
.getRemoteRenderingAccounts()
.createWithResponse(resourceGroupName, accountName, this.innerModel(), context)
.getValue();
return this;
}
RemoteRenderingAccountImpl(String name, com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
this.innerObject = new RemoteRenderingAccountInner();
this.serviceManager = serviceManager;
this.accountName = name;
}
public RemoteRenderingAccountImpl update() {
return this;
}
public RemoteRenderingAccount apply() {
this.innerObject =
serviceManager
.serviceClient()
.getRemoteRenderingAccounts()
.updateWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE)
.getValue();
return this;
}
public RemoteRenderingAccount apply(Context context) {
this.innerObject =
serviceManager
.serviceClient()
.getRemoteRenderingAccounts()
.updateWithResponse(resourceGroupName, accountName, this.innerModel(), context)
.getValue();
return this;
}
RemoteRenderingAccountImpl(
RemoteRenderingAccountInner innerObject,
com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
this.accountName = Utils.getValueFromIdByName(innerObject.id(), "remoteRenderingAccounts");
}
public RemoteRenderingAccount refresh() {
this.innerObject =
serviceManager
.serviceClient()
.getRemoteRenderingAccounts()
.getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE)
.getValue();
return this;
}
public RemoteRenderingAccount refresh(Context context) {
this.innerObject =
serviceManager
.serviceClient()
.getRemoteRenderingAccounts()
.getByResourceGroupWithResponse(resourceGroupName, accountName, context)
.getValue();
return this;
}
public Response listKeysWithResponse(Context context) {
return serviceManager.remoteRenderingAccounts().listKeysWithResponse(resourceGroupName, accountName, context);
}
public AccountKeys listKeys() {
return serviceManager.remoteRenderingAccounts().listKeys(resourceGroupName, accountName);
}
public Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context) {
return serviceManager
.remoteRenderingAccounts()
.regenerateKeysWithResponse(resourceGroupName, accountName, regenerate, context);
}
public AccountKeys regenerateKeys(AccountKeyRegenerateRequest regenerate) {
return serviceManager.remoteRenderingAccounts().regenerateKeys(resourceGroupName, accountName, regenerate);
}
public RemoteRenderingAccountImpl withRegion(Region location) {
this.innerModel().withLocation(location.toString());
return this;
}
public RemoteRenderingAccountImpl withRegion(String location) {
this.innerModel().withLocation(location);
return this;
}
public RemoteRenderingAccountImpl withTags(Map tags) {
this.innerModel().withTags(tags);
return this;
}
public RemoteRenderingAccountImpl withIdentity(Identity identity) {
this.innerModel().withIdentity(identity);
return this;
}
public RemoteRenderingAccountImpl withPlan(Identity plan) {
this.innerModel().withPlan(plan);
return this;
}
public RemoteRenderingAccountImpl withSku(Sku sku) {
this.innerModel().withSku(sku);
return this;
}
public RemoteRenderingAccountImpl withKind(Sku kind) {
this.innerModel().withKind(kind);
return this;
}
public RemoteRenderingAccountImpl withStorageAccountName(String storageAccountName) {
this.innerModel().withStorageAccountName(storageAccountName);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy