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

com.azure.resourcemanager.appplatform.implementation.SpringAppDomainImpl Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure App Platform Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt

There is a newer version: 2.42.0
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.resourcemanager.appplatform.implementation;

import com.azure.resourcemanager.appplatform.AppPlatformManager;
import com.azure.resourcemanager.appplatform.fluent.models.CustomDomainResourceInner;
import com.azure.resourcemanager.appplatform.models.CustomDomainProperties;
import com.azure.resourcemanager.appplatform.models.SpringApp;
import com.azure.resourcemanager.appplatform.models.SpringAppDomain;
import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.ExternalChildResourceImpl;
import reactor.core.publisher.Mono;

public class SpringAppDomainImpl
    extends ExternalChildResourceImpl
    implements SpringAppDomain {
    SpringAppDomainImpl(String name, SpringAppImpl parent, CustomDomainResourceInner innerObject) {
        super(name, parent, innerObject);
    }

    @Override
    public Mono createResourceAsync() {
        return manager().serviceClient().getCustomDomains().createOrUpdateAsync(
            parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name(), innerModel()
        )
            .map(inner -> {
                setInner(inner);
                return this;
            });
    }

    @Override
    public Mono updateResourceAsync() {
        return createResourceAsync();
    }

    @Override
    public Mono deleteResourceAsync() {
        return manager().serviceClient().getBindings().deleteAsync(
            parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name()
        );
    }

    @Override
    protected Mono getInnerAsync() {
        return manager().serviceClient().getCustomDomains().getAsync(
            parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name()
        );
    }

    @Override
    public String id() {
        return innerModel().id();
    }

    @Override
    public CustomDomainProperties properties() {
        return innerModel().properties();
    }

    private AppPlatformManager manager() {
        return parent().manager();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy