![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.securityinsights.implementation.EntityRelationsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-securityinsights Show documentation
Show all versions of azure-resourcemanager-securityinsights Show documentation
This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2021-09.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.securityinsights.implementation;
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.securityinsights.fluent.EntityRelationsClient;
import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner;
import com.azure.resourcemanager.securityinsights.models.EntityRelations;
import com.azure.resourcemanager.securityinsights.models.Relation;
public final class EntityRelationsImpl implements EntityRelations {
private static final ClientLogger LOGGER = new ClientLogger(EntityRelationsImpl.class);
private final EntityRelationsClient innerClient;
private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager;
public EntityRelationsImpl(EntityRelationsClient innerClient,
com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public Response getRelationWithResponse(String resourceGroupName, String workspaceName, String entityId,
String relationName, Context context) {
Response inner = this.serviceClient()
.getRelationWithResponse(resourceGroupName, workspaceName, entityId, relationName, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new RelationImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
public Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName) {
RelationInner inner
= this.serviceClient().getRelation(resourceGroupName, workspaceName, entityId, relationName);
if (inner != null) {
return new RelationImpl(inner, this.manager());
} else {
return null;
}
}
private EntityRelationsClient serviceClient() {
return this.innerClient;
}
private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() {
return this.serviceManager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy