com.azure.resourcemanager.security.implementation.SecurityStandardImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-security Show documentation
Show all versions of azure-resourcemanager-security Show documentation
This package contains Microsoft Azure SDK for Security Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.Security (Azure Security Center) resource provider. Package tag package-composite-v3.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.security.implementation;
import com.azure.core.util.Context;
import com.azure.resourcemanager.security.fluent.models.SecurityStandardInner;
import com.azure.resourcemanager.security.models.PartialAssessmentProperties;
import com.azure.resourcemanager.security.models.SecurityStandard;
import com.azure.resourcemanager.security.models.StandardMetadata;
import com.azure.resourcemanager.security.models.StandardSupportedCloud;
import com.azure.resourcemanager.security.models.StandardType;
import java.util.Collections;
import java.util.List;
public final class SecurityStandardImpl
implements SecurityStandard, SecurityStandard.Definition, SecurityStandard.Update {
private SecurityStandardInner innerObject;
private final com.azure.resourcemanager.security.SecurityManager serviceManager;
public String id() {
return this.innerModel().id();
}
public String name() {
return this.innerModel().name();
}
public String type() {
return this.innerModel().type();
}
public String displayName() {
return this.innerModel().displayName();
}
public StandardType standardType() {
return this.innerModel().standardType();
}
public String description() {
return this.innerModel().description();
}
public List assessments() {
List inner = this.innerModel().assessments();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
return Collections.emptyList();
}
}
public List cloudProviders() {
List inner = this.innerModel().cloudProviders();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
return Collections.emptyList();
}
}
public String policySetDefinitionId() {
return this.innerModel().policySetDefinitionId();
}
public StandardMetadata metadata() {
return this.innerModel().metadata();
}
public SecurityStandardInner innerModel() {
return this.innerObject;
}
private com.azure.resourcemanager.security.SecurityManager manager() {
return this.serviceManager;
}
private String scope;
private String standardId;
public SecurityStandardImpl withExistingScope(String scope) {
this.scope = scope;
return this;
}
public SecurityStandard create() {
this.innerObject = serviceManager.serviceClient()
.getSecurityStandards()
.createOrUpdateWithResponse(scope, standardId, this.innerModel(), Context.NONE)
.getValue();
return this;
}
public SecurityStandard create(Context context) {
this.innerObject = serviceManager.serviceClient()
.getSecurityStandards()
.createOrUpdateWithResponse(scope, standardId, this.innerModel(), context)
.getValue();
return this;
}
SecurityStandardImpl(String name, com.azure.resourcemanager.security.SecurityManager serviceManager) {
this.innerObject = new SecurityStandardInner();
this.serviceManager = serviceManager;
this.standardId = name;
}
public SecurityStandardImpl update() {
return this;
}
public SecurityStandard apply() {
this.innerObject = serviceManager.serviceClient()
.getSecurityStandards()
.createOrUpdateWithResponse(scope, standardId, this.innerModel(), Context.NONE)
.getValue();
return this;
}
public SecurityStandard apply(Context context) {
this.innerObject = serviceManager.serviceClient()
.getSecurityStandards()
.createOrUpdateWithResponse(scope, standardId, this.innerModel(), context)
.getValue();
return this;
}
SecurityStandardImpl(SecurityStandardInner innerObject,
com.azure.resourcemanager.security.SecurityManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.scope = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(),
"/{scope}/providers/Microsoft.Security/securityStandards/{standardId}", "scope");
this.standardId = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(),
"/{scope}/providers/Microsoft.Security/securityStandards/{standardId}", "standardId");
}
public SecurityStandard refresh() {
this.innerObject = serviceManager.serviceClient()
.getSecurityStandards()
.getWithResponse(scope, standardId, Context.NONE)
.getValue();
return this;
}
public SecurityStandard refresh(Context context) {
this.innerObject = serviceManager.serviceClient()
.getSecurityStandards()
.getWithResponse(scope, standardId, context)
.getValue();
return this;
}
public SecurityStandardImpl withDisplayName(String displayName) {
this.innerModel().withDisplayName(displayName);
return this;
}
public SecurityStandardImpl withDescription(String description) {
this.innerModel().withDescription(description);
return this;
}
public SecurityStandardImpl withAssessments(List assessments) {
this.innerModel().withAssessments(assessments);
return this;
}
public SecurityStandardImpl withCloudProviders(List cloudProviders) {
this.innerModel().withCloudProviders(cloudProviders);
return this;
}
public SecurityStandardImpl withPolicySetDefinitionId(String policySetDefinitionId) {
this.innerModel().withPolicySetDefinitionId(policySetDefinitionId);
return this;
}
public SecurityStandardImpl withMetadata(StandardMetadata metadata) {
this.innerModel().withMetadata(metadata);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy