All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.healthdataaiservices.implementation.PrivateEndpointConnectionResourceImpl Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for Health Data AI Services Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt.

The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.healthdataaiservices.implementation;

import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.healthdataaiservices.fluent.models.PrivateEndpointConnectionResourceInner;
import com.azure.resourcemanager.healthdataaiservices.models.PrivateEndpointConnectionProperties;
import com.azure.resourcemanager.healthdataaiservices.models.PrivateEndpointConnectionResource;

public final class PrivateEndpointConnectionResourceImpl
    implements PrivateEndpointConnectionResource, PrivateEndpointConnectionResource.Definition {
    private PrivateEndpointConnectionResourceInner innerObject;

    private final com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager serviceManager;

    PrivateEndpointConnectionResourceImpl(PrivateEndpointConnectionResourceInner innerObject,
        com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = 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 PrivateEndpointConnectionResourceInner innerModel() {
        return this.innerObject;
    }

    private com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager manager() {
        return this.serviceManager;
    }

    private String resourceGroupName;

    private String deidServiceName;

    private String privateEndpointConnectionName;

    public PrivateEndpointConnectionResourceImpl withExistingDeidService(String resourceGroupName,
        String deidServiceName) {
        this.resourceGroupName = resourceGroupName;
        this.deidServiceName = deidServiceName;
        return this;
    }

    public PrivateEndpointConnectionResource create() {
        this.innerObject = serviceManager.serviceClient()
            .getPrivateEndpointConnections()
            .create(resourceGroupName, deidServiceName, privateEndpointConnectionName, this.innerModel(), Context.NONE);
        return this;
    }

    public PrivateEndpointConnectionResource create(Context context) {
        this.innerObject = serviceManager.serviceClient()
            .getPrivateEndpointConnections()
            .create(resourceGroupName, deidServiceName, privateEndpointConnectionName, this.innerModel(), context);
        return this;
    }

    PrivateEndpointConnectionResourceImpl(String name,
        com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager serviceManager) {
        this.innerObject = new PrivateEndpointConnectionResourceInner();
        this.serviceManager = serviceManager;
        this.privateEndpointConnectionName = name;
    }

    public PrivateEndpointConnectionResource refresh() {
        this.innerObject = serviceManager.serviceClient()
            .getPrivateEndpointConnections()
            .getWithResponse(resourceGroupName, deidServiceName, privateEndpointConnectionName, Context.NONE)
            .getValue();
        return this;
    }

    public PrivateEndpointConnectionResource refresh(Context context) {
        this.innerObject = serviceManager.serviceClient()
            .getPrivateEndpointConnections()
            .getWithResponse(resourceGroupName, deidServiceName, privateEndpointConnectionName, context)
            .getValue();
        return this;
    }

    public PrivateEndpointConnectionResourceImpl withProperties(PrivateEndpointConnectionProperties properties) {
        this.innerModel().withProperties(properties);
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy