
com.azure.resourcemanager.appcontainers.implementation.DaprComponentsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-appcontainers Show documentation
Show all versions of azure-resourcemanager-appcontainers Show documentation
This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-03.
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.appcontainers.implementation;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.appcontainers.fluent.DaprComponentsClient;
import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner;
import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner;
import com.azure.resourcemanager.appcontainers.models.DaprComponent;
import com.azure.resourcemanager.appcontainers.models.DaprComponents;
import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection;
public final class DaprComponentsImpl implements DaprComponents {
private static final ClientLogger LOGGER = new ClientLogger(DaprComponentsImpl.class);
private final DaprComponentsClient innerClient;
private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager;
public DaprComponentsImpl(DaprComponentsClient innerClient,
com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable list(String resourceGroupName, String environmentName) {
PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName);
return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager()));
}
public PagedIterable list(String resourceGroupName, String environmentName, Context context) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, environmentName, context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager()));
}
public Response getWithResponse(String resourceGroupName, String environmentName,
String componentName, Context context) {
Response inner
= this.serviceClient().getWithResponse(resourceGroupName, environmentName, componentName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new DaprComponentImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public DaprComponent get(String resourceGroupName, String environmentName, String componentName) {
DaprComponentInner inner = this.serviceClient().get(resourceGroupName, environmentName, componentName);
if (inner != null) {
return new DaprComponentImpl(inner, this.manager());
} else {
return null;
}
}
public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName,
String componentName, DaprComponentInner daprComponentEnvelope, Context context) {
Response inner = this.serviceClient()
.createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, daprComponentEnvelope,
context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new DaprComponentImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public DaprComponent createOrUpdate(String resourceGroupName, String environmentName, String componentName,
DaprComponentInner daprComponentEnvelope) {
DaprComponentInner inner = this.serviceClient()
.createOrUpdate(resourceGroupName, environmentName, componentName, daprComponentEnvelope);
if (inner != null) {
return new DaprComponentImpl(inner, this.manager());
} else {
return null;
}
}
public Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName,
Context context) {
return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, componentName, context);
}
public void delete(String resourceGroupName, String environmentName, String componentName) {
this.serviceClient().delete(resourceGroupName, environmentName, componentName);
}
public Response listSecretsWithResponse(String resourceGroupName, String environmentName,
String componentName, Context context) {
Response inner
= this.serviceClient().listSecretsWithResponse(resourceGroupName, environmentName, componentName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new DaprSecretsCollectionImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName) {
DaprSecretsCollectionInner inner
= this.serviceClient().listSecrets(resourceGroupName, environmentName, componentName);
if (inner != null) {
return new DaprSecretsCollectionImpl(inner, this.manager());
} else {
return null;
}
}
private DaprComponentsClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() {
return this.serviceManager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy