com.azure.resourcemanager.hybridcompute.implementation.PrivateEndpointConnectionImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-hybridcompute Show documentation
Show all versions of azure-resourcemanager-hybridcompute Show documentation
This package contains Microsoft Azure SDK for HybridCompute Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Hybrid Compute Management Client. Package tag package-preview-2024-07.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.hybridcompute.implementation;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnection;
import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionProperties;
public final class PrivateEndpointConnectionImpl
implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update {
private PrivateEndpointConnectionInner innerObject;
private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager;
public String id() {
return this.innerModel().id();
}
public String name() {
return this.innerModel().name();
}
public String type() {
return this.innerModel().type();
}
public PrivateEndpointConnectionProperties properties() {
return this.innerModel().properties();
}
public SystemData systemData() {
return this.innerModel().systemData();
}
public String resourceGroupName() {
return resourceGroupName;
}
public PrivateEndpointConnectionInner innerModel() {
return this.innerObject;
}
private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() {
return this.serviceManager;
}
private String resourceGroupName;
private String scopeName;
private String privateEndpointConnectionName;
public PrivateEndpointConnectionImpl withExistingPrivateLinkScope(String resourceGroupName, String scopeName) {
this.resourceGroupName = resourceGroupName;
this.scopeName = scopeName;
return this;
}
public PrivateEndpointConnection create() {
this.innerObject = serviceManager.serviceClient()
.getPrivateEndpointConnections()
.createOrUpdate(resourceGroupName, scopeName, privateEndpointConnectionName, this.innerModel(),
Context.NONE);
return this;
}
public PrivateEndpointConnection create(Context context) {
this.innerObject = serviceManager.serviceClient()
.getPrivateEndpointConnections()
.createOrUpdate(resourceGroupName, scopeName, privateEndpointConnectionName, this.innerModel(), context);
return this;
}
PrivateEndpointConnectionImpl(String name,
com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) {
this.innerObject = new PrivateEndpointConnectionInner();
this.serviceManager = serviceManager;
this.privateEndpointConnectionName = name;
}
public PrivateEndpointConnectionImpl update() {
return this;
}
public PrivateEndpointConnection apply() {
this.innerObject = serviceManager.serviceClient()
.getPrivateEndpointConnections()
.createOrUpdate(resourceGroupName, scopeName, privateEndpointConnectionName, this.innerModel(),
Context.NONE);
return this;
}
public PrivateEndpointConnection apply(Context context) {
this.innerObject = serviceManager.serviceClient()
.getPrivateEndpointConnections()
.createOrUpdate(resourceGroupName, scopeName, privateEndpointConnectionName, this.innerModel(), context);
return this;
}
PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject,
com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
this.scopeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateLinkScopes");
this.privateEndpointConnectionName
= ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections");
}
public PrivateEndpointConnection refresh() {
this.innerObject = serviceManager.serviceClient()
.getPrivateEndpointConnections()
.getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, Context.NONE)
.getValue();
return this;
}
public PrivateEndpointConnection refresh(Context context) {
this.innerObject = serviceManager.serviceClient()
.getPrivateEndpointConnections()
.getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, context)
.getValue();
return this;
}
public PrivateEndpointConnectionImpl withProperties(PrivateEndpointConnectionProperties properties) {
this.innerModel().withProperties(properties);
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy