com.azure.resourcemanager.security.models.DefenderForContainersAwsOffering 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.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* The Defender for Containers AWS offering.
*/
@Fluent
public final class DefenderForContainersAwsOffering extends CloudOffering {
/*
* The type of the security offering.
*/
private OfferingType offeringType = OfferingType.DEFENDER_FOR_CONTAINERS_AWS;
/*
* The kubernetes service connection configuration
*/
private DefenderForContainersAwsOfferingKubernetesService kubernetesService;
/*
* The kubernetes data collection connection configuration
*/
private DefenderForContainersAwsOfferingKubernetesDataCollection kubernetesDataCollection;
/*
* The cloudwatch to kinesis connection configuration
*/
private DefenderForContainersAwsOfferingCloudWatchToKinesis cloudWatchToKinesis;
/*
* The kinesis to s3 connection configuration
*/
private DefenderForContainersAwsOfferingKinesisToS3 kinesisToS3;
/*
* Is audit logs data collection enabled
*/
private Boolean enableAuditLogsAutoProvisioning;
/*
* Is Microsoft Defender for Cloud Kubernetes agent auto provisioning enabled
*/
private Boolean enableDefenderAgentAutoProvisioning;
/*
* Is Policy Kubernetes agent auto provisioning enabled
*/
private Boolean enablePolicyAgentAutoProvisioning;
/*
* The retention time in days of kube audit logs set on the CloudWatch log group
*/
private Long kubeAuditRetentionTime;
/*
* The externalId used by the data reader to prevent the confused deputy attack
*/
private String dataCollectionExternalId;
/*
* The Microsoft Defender container image assessment configuration
*/
private DefenderForContainersAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment;
/*
* The Microsoft Defender container agentless discovery K8s configuration
*/
private DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S;
/*
* The Microsoft Defender for Container K8s VM host scanning configuration
*/
private DefenderForContainersAwsOfferingVmScanners vmScanners;
/**
* Creates an instance of DefenderForContainersAwsOffering class.
*/
public DefenderForContainersAwsOffering() {
}
/**
* Get the offeringType property: The type of the security offering.
*
* @return the offeringType value.
*/
@Override
public OfferingType offeringType() {
return this.offeringType;
}
/**
* Get the kubernetesService property: The kubernetes service connection configuration.
*
* @return the kubernetesService value.
*/
public DefenderForContainersAwsOfferingKubernetesService kubernetesService() {
return this.kubernetesService;
}
/**
* Set the kubernetesService property: The kubernetes service connection configuration.
*
* @param kubernetesService the kubernetesService value to set.
* @return the DefenderForContainersAwsOffering object itself.
*/
public DefenderForContainersAwsOffering
withKubernetesService(DefenderForContainersAwsOfferingKubernetesService kubernetesService) {
this.kubernetesService = kubernetesService;
return this;
}
/**
* Get the kubernetesDataCollection property: The kubernetes data collection connection configuration.
*
* @return the kubernetesDataCollection value.
*/
public DefenderForContainersAwsOfferingKubernetesDataCollection kubernetesDataCollection() {
return this.kubernetesDataCollection;
}
/**
* Set the kubernetesDataCollection property: The kubernetes data collection connection configuration.
*
* @param kubernetesDataCollection the kubernetesDataCollection value to set.
* @return the DefenderForContainersAwsOffering object itself.
*/
public DefenderForContainersAwsOffering withKubernetesDataCollection(
DefenderForContainersAwsOfferingKubernetesDataCollection kubernetesDataCollection) {
this.kubernetesDataCollection = kubernetesDataCollection;
return this;
}
/**
* Get the cloudWatchToKinesis property: The cloudwatch to kinesis connection configuration.
*
* @return the cloudWatchToKinesis value.
*/
public DefenderForContainersAwsOfferingCloudWatchToKinesis cloudWatchToKinesis() {
return this.cloudWatchToKinesis;
}
/**
* Set the cloudWatchToKinesis property: The cloudwatch to kinesis connection configuration.
*
* @param cloudWatchToKinesis the cloudWatchToKinesis value to set.
* @return the DefenderForContainersAwsOffering object itself.
*/
public DefenderForContainersAwsOffering
withCloudWatchToKinesis(DefenderForContainersAwsOfferingCloudWatchToKinesis cloudWatchToKinesis) {
this.cloudWatchToKinesis = cloudWatchToKinesis;
return this;
}
/**
* Get the kinesisToS3 property: The kinesis to s3 connection configuration.
*
* @return the kinesisToS3 value.
*/
public DefenderForContainersAwsOfferingKinesisToS3 kinesisToS3() {
return this.kinesisToS3;
}
/**
* Set the kinesisToS3 property: The kinesis to s3 connection configuration.
*
* @param kinesisToS3 the kinesisToS3 value to set.
* @return the DefenderForContainersAwsOffering object itself.
*/
public DefenderForContainersAwsOffering withKinesisToS3(DefenderForContainersAwsOfferingKinesisToS3 kinesisToS3) {
this.kinesisToS3 = kinesisToS3;
return this;
}
/**
* Get the enableAuditLogsAutoProvisioning property: Is audit logs data collection enabled.
*
* @return the enableAuditLogsAutoProvisioning value.
*/
public Boolean enableAuditLogsAutoProvisioning() {
return this.enableAuditLogsAutoProvisioning;
}
/**
* Set the enableAuditLogsAutoProvisioning property: Is audit logs data collection enabled.
*
* @param enableAuditLogsAutoProvisioning the enableAuditLogsAutoProvisioning value to set.
* @return the DefenderForContainersAwsOffering object itself.
*/
public DefenderForContainersAwsOffering
withEnableAuditLogsAutoProvisioning(Boolean enableAuditLogsAutoProvisioning) {
this.enableAuditLogsAutoProvisioning = enableAuditLogsAutoProvisioning;
return this;
}
/**
* Get the enableDefenderAgentAutoProvisioning property: Is Microsoft Defender for Cloud Kubernetes agent auto
* provisioning enabled.
*
* @return the enableDefenderAgentAutoProvisioning value.
*/
public Boolean enableDefenderAgentAutoProvisioning() {
return this.enableDefenderAgentAutoProvisioning;
}
/**
* Set the enableDefenderAgentAutoProvisioning property: Is Microsoft Defender for Cloud Kubernetes agent auto
* provisioning enabled.
*
* @param enableDefenderAgentAutoProvisioning the enableDefenderAgentAutoProvisioning value to set.
* @return the DefenderForContainersAwsOffering object itself.
*/
public DefenderForContainersAwsOffering
withEnableDefenderAgentAutoProvisioning(Boolean enableDefenderAgentAutoProvisioning) {
this.enableDefenderAgentAutoProvisioning = enableDefenderAgentAutoProvisioning;
return this;
}
/**
* Get the enablePolicyAgentAutoProvisioning property: Is Policy Kubernetes agent auto provisioning enabled.
*
* @return the enablePolicyAgentAutoProvisioning value.
*/
public Boolean enablePolicyAgentAutoProvisioning() {
return this.enablePolicyAgentAutoProvisioning;
}
/**
* Set the enablePolicyAgentAutoProvisioning property: Is Policy Kubernetes agent auto provisioning enabled.
*
* @param enablePolicyAgentAutoProvisioning the enablePolicyAgentAutoProvisioning value to set.
* @return the DefenderForContainersAwsOffering object itself.
*/
public DefenderForContainersAwsOffering
withEnablePolicyAgentAutoProvisioning(Boolean enablePolicyAgentAutoProvisioning) {
this.enablePolicyAgentAutoProvisioning = enablePolicyAgentAutoProvisioning;
return this;
}
/**
* Get the kubeAuditRetentionTime property: The retention time in days of kube audit logs set on the CloudWatch log
* group.
*
* @return the kubeAuditRetentionTime value.
*/
public Long kubeAuditRetentionTime() {
return this.kubeAuditRetentionTime;
}
/**
* Set the kubeAuditRetentionTime property: The retention time in days of kube audit logs set on the CloudWatch log
* group.
*
* @param kubeAuditRetentionTime the kubeAuditRetentionTime value to set.
* @return the DefenderForContainersAwsOffering object itself.
*/
public DefenderForContainersAwsOffering withKubeAuditRetentionTime(Long kubeAuditRetentionTime) {
this.kubeAuditRetentionTime = kubeAuditRetentionTime;
return this;
}
/**
* Get the dataCollectionExternalId property: The externalId used by the data reader to prevent the confused deputy
* attack.
*
* @return the dataCollectionExternalId value.
*/
public String dataCollectionExternalId() {
return this.dataCollectionExternalId;
}
/**
* Set the dataCollectionExternalId property: The externalId used by the data reader to prevent the confused deputy
* attack.
*
* @param dataCollectionExternalId the dataCollectionExternalId value to set.
* @return the DefenderForContainersAwsOffering object itself.
*/
public DefenderForContainersAwsOffering withDataCollectionExternalId(String dataCollectionExternalId) {
this.dataCollectionExternalId = dataCollectionExternalId;
return this;
}
/**
* Get the mdcContainersImageAssessment property: The Microsoft Defender container image assessment configuration.
*
* @return the mdcContainersImageAssessment value.
*/
public DefenderForContainersAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment() {
return this.mdcContainersImageAssessment;
}
/**
* Set the mdcContainersImageAssessment property: The Microsoft Defender container image assessment configuration.
*
* @param mdcContainersImageAssessment the mdcContainersImageAssessment value to set.
* @return the DefenderForContainersAwsOffering object itself.
*/
public DefenderForContainersAwsOffering withMdcContainersImageAssessment(
DefenderForContainersAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment) {
this.mdcContainersImageAssessment = mdcContainersImageAssessment;
return this;
}
/**
* Get the mdcContainersAgentlessDiscoveryK8S property: The Microsoft Defender container agentless discovery K8s
* configuration.
*
* @return the mdcContainersAgentlessDiscoveryK8S value.
*/
public DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S() {
return this.mdcContainersAgentlessDiscoveryK8S;
}
/**
* Set the mdcContainersAgentlessDiscoveryK8S property: The Microsoft Defender container agentless discovery K8s
* configuration.
*
* @param mdcContainersAgentlessDiscoveryK8S the mdcContainersAgentlessDiscoveryK8S value to set.
* @return the DefenderForContainersAwsOffering object itself.
*/
public DefenderForContainersAwsOffering withMdcContainersAgentlessDiscoveryK8S(
DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S) {
this.mdcContainersAgentlessDiscoveryK8S = mdcContainersAgentlessDiscoveryK8S;
return this;
}
/**
* Get the vmScanners property: The Microsoft Defender for Container K8s VM host scanning configuration.
*
* @return the vmScanners value.
*/
public DefenderForContainersAwsOfferingVmScanners vmScanners() {
return this.vmScanners;
}
/**
* Set the vmScanners property: The Microsoft Defender for Container K8s VM host scanning configuration.
*
* @param vmScanners the vmScanners value to set.
* @return the DefenderForContainersAwsOffering object itself.
*/
public DefenderForContainersAwsOffering withVmScanners(DefenderForContainersAwsOfferingVmScanners vmScanners) {
this.vmScanners = vmScanners;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
if (kubernetesService() != null) {
kubernetesService().validate();
}
if (kubernetesDataCollection() != null) {
kubernetesDataCollection().validate();
}
if (cloudWatchToKinesis() != null) {
cloudWatchToKinesis().validate();
}
if (kinesisToS3() != null) {
kinesisToS3().validate();
}
if (mdcContainersImageAssessment() != null) {
mdcContainersImageAssessment().validate();
}
if (mdcContainersAgentlessDiscoveryK8S() != null) {
mdcContainersAgentlessDiscoveryK8S().validate();
}
if (vmScanners() != null) {
vmScanners().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("offeringType", this.offeringType == null ? null : this.offeringType.toString());
jsonWriter.writeJsonField("kubernetesService", this.kubernetesService);
jsonWriter.writeJsonField("kubernetesDataCollection", this.kubernetesDataCollection);
jsonWriter.writeJsonField("cloudWatchToKinesis", this.cloudWatchToKinesis);
jsonWriter.writeJsonField("kinesisToS3", this.kinesisToS3);
jsonWriter.writeBooleanField("enableAuditLogsAutoProvisioning", this.enableAuditLogsAutoProvisioning);
jsonWriter.writeBooleanField("enableDefenderAgentAutoProvisioning", this.enableDefenderAgentAutoProvisioning);
jsonWriter.writeBooleanField("enablePolicyAgentAutoProvisioning", this.enablePolicyAgentAutoProvisioning);
jsonWriter.writeNumberField("kubeAuditRetentionTime", this.kubeAuditRetentionTime);
jsonWriter.writeStringField("dataCollectionExternalId", this.dataCollectionExternalId);
jsonWriter.writeJsonField("mdcContainersImageAssessment", this.mdcContainersImageAssessment);
jsonWriter.writeJsonField("mdcContainersAgentlessDiscoveryK8s", this.mdcContainersAgentlessDiscoveryK8S);
jsonWriter.writeJsonField("vmScanners", this.vmScanners);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of DefenderForContainersAwsOffering from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of DefenderForContainersAwsOffering if the JsonReader was pointing to an instance of it, or
* null if it was pointing to JSON null.
* @throws IOException If an error occurs while reading the DefenderForContainersAwsOffering.
*/
public static DefenderForContainersAwsOffering fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
DefenderForContainersAwsOffering deserializedDefenderForContainersAwsOffering
= new DefenderForContainersAwsOffering();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("description".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.withDescription(reader.getString());
} else if ("offeringType".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.offeringType
= OfferingType.fromString(reader.getString());
} else if ("kubernetesService".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.kubernetesService
= DefenderForContainersAwsOfferingKubernetesService.fromJson(reader);
} else if ("kubernetesDataCollection".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.kubernetesDataCollection
= DefenderForContainersAwsOfferingKubernetesDataCollection.fromJson(reader);
} else if ("cloudWatchToKinesis".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.cloudWatchToKinesis
= DefenderForContainersAwsOfferingCloudWatchToKinesis.fromJson(reader);
} else if ("kinesisToS3".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.kinesisToS3
= DefenderForContainersAwsOfferingKinesisToS3.fromJson(reader);
} else if ("enableAuditLogsAutoProvisioning".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.enableAuditLogsAutoProvisioning
= reader.getNullable(JsonReader::getBoolean);
} else if ("enableDefenderAgentAutoProvisioning".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.enableDefenderAgentAutoProvisioning
= reader.getNullable(JsonReader::getBoolean);
} else if ("enablePolicyAgentAutoProvisioning".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.enablePolicyAgentAutoProvisioning
= reader.getNullable(JsonReader::getBoolean);
} else if ("kubeAuditRetentionTime".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.kubeAuditRetentionTime
= reader.getNullable(JsonReader::getLong);
} else if ("dataCollectionExternalId".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.dataCollectionExternalId = reader.getString();
} else if ("mdcContainersImageAssessment".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.mdcContainersImageAssessment
= DefenderForContainersAwsOfferingMdcContainersImageAssessment.fromJson(reader);
} else if ("mdcContainersAgentlessDiscoveryK8s".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.mdcContainersAgentlessDiscoveryK8S
= DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.fromJson(reader);
} else if ("vmScanners".equals(fieldName)) {
deserializedDefenderForContainersAwsOffering.vmScanners
= DefenderForContainersAwsOfferingVmScanners.fromJson(reader);
} else {
reader.skipChildren();
}
}
return deserializedDefenderForContainersAwsOffering;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy