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

com.azure.resourcemanager.storage.implementation.BlobServicesImpl Maven / Gradle / Ivy

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

package com.azure.resourcemanager.storage.implementation;

import com.azure.resourcemanager.resources.fluentcore.model.implementation.WrapperImpl;
import com.azure.resourcemanager.storage.StorageManager;
import com.azure.resourcemanager.storage.fluent.BlobServicesClient;
import com.azure.resourcemanager.storage.models.BlobServiceProperties;
import com.azure.resourcemanager.storage.models.BlobServices;
import com.azure.resourcemanager.storage.fluent.models.BlobServicePropertiesInner;
import reactor.core.publisher.Mono;

public class BlobServicesImpl extends WrapperImpl implements BlobServices {
    private final StorageManager manager;

    public BlobServicesImpl(StorageManager manager) {
        super(manager.serviceClient().getBlobServices());
        this.manager = manager;
    }

    public StorageManager getManager() {
        return this.manager;
    }

    @Override
    public BlobServicePropertiesImpl define(String name) {
        return wrapModel(name);
    }

    private BlobServicePropertiesImpl wrapModel(BlobServicePropertiesInner inner) {
        return new BlobServicePropertiesImpl(inner, getManager());
    }

    private BlobServicePropertiesImpl wrapModel(String name) {
        return new BlobServicePropertiesImpl(name, this.getManager());
    }

    @Override
    public Mono getServicePropertiesAsync(String resourceGroupName, String accountName) {
        return innerModel().getServicePropertiesAsync(resourceGroupName, accountName).map(inner -> wrapModel(inner));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy