odata.msgraph.client.security.complex.KubernetesPodEvidence Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of odata-client-msgraph Show documentation
Show all versions of odata-client-msgraph Show documentation
Java client for use with the Microsoft Graph v1.0 endpoint
package odata.msgraph.client.security.complex;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.github.davidmoten.odata.client.CollectionPage;
import com.github.davidmoten.odata.client.HttpRequestOptions;
import com.github.davidmoten.odata.client.ODataType;
import com.github.davidmoten.odata.client.UnmappedFields;
import com.github.davidmoten.odata.client.Util;
import com.github.davidmoten.odata.client.annotation.Property;
import com.github.davidmoten.odata.client.internal.ChangedFields;
import com.github.davidmoten.odata.client.internal.UnmappedFieldsImpl;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.time.OffsetDateTime;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import odata.msgraph.client.security.enums.EvidenceRemediationStatus;
import odata.msgraph.client.security.enums.EvidenceRole;
import odata.msgraph.client.security.enums.EvidenceVerdict;
@JsonPropertyOrder({
"@odata.type",
"containers",
"controller",
"ephemeralContainers",
"initContainers",
"labels",
"name",
"namespace",
"podIp",
"serviceAccount"})
@JsonInclude(Include.NON_NULL)
public class KubernetesPodEvidence extends AlertEvidence implements ODataType {
@JsonProperty("containers")
protected List containers;
@JsonProperty("containers@nextLink")
protected String containersNextLink;
@JsonProperty("controller")
protected KubernetesControllerEvidence controller;
@JsonProperty("ephemeralContainers")
protected List ephemeralContainers;
@JsonProperty("ephemeralContainers@nextLink")
protected String ephemeralContainersNextLink;
@JsonProperty("initContainers")
protected List initContainers;
@JsonProperty("initContainers@nextLink")
protected String initContainersNextLink;
@JsonProperty("labels")
protected Dictionary labels;
@JsonProperty("name")
protected String name;
@JsonProperty("namespace")
protected KubernetesNamespaceEvidence namespace;
@JsonProperty("podIp")
protected IpEvidence podIp;
@JsonProperty("serviceAccount")
protected KubernetesServiceAccountEvidence serviceAccount;
protected KubernetesPodEvidence() {
super();
}
@Override
public String odataTypeName() {
return "microsoft.graph.security.kubernetesPodEvidence";
}
@Property(name="containers")
@JsonIgnore
public CollectionPage getContainers() {
return new CollectionPage(contextPath, ContainerEvidence.class, this.containers, Optional.ofNullable(containersNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
@Property(name="containers")
@JsonIgnore
public CollectionPage getContainers(HttpRequestOptions options) {
return new CollectionPage(contextPath, ContainerEvidence.class, this.containers, Optional.ofNullable(containersNextLink), Collections.emptyList(), options);
}
@Property(name="controller")
@JsonIgnore
public Optional getController() {
return Optional.ofNullable(controller);
}
public KubernetesPodEvidence withController(KubernetesControllerEvidence controller) {
KubernetesPodEvidence _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.security.kubernetesPodEvidence");
_x.controller = controller;
return _x;
}
@Property(name="ephemeralContainers")
@JsonIgnore
public CollectionPage getEphemeralContainers() {
return new CollectionPage(contextPath, ContainerEvidence.class, this.ephemeralContainers, Optional.ofNullable(ephemeralContainersNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
@Property(name="ephemeralContainers")
@JsonIgnore
public CollectionPage getEphemeralContainers(HttpRequestOptions options) {
return new CollectionPage(contextPath, ContainerEvidence.class, this.ephemeralContainers, Optional.ofNullable(ephemeralContainersNextLink), Collections.emptyList(), options);
}
@Property(name="initContainers")
@JsonIgnore
public CollectionPage getInitContainers() {
return new CollectionPage(contextPath, ContainerEvidence.class, this.initContainers, Optional.ofNullable(initContainersNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
@Property(name="initContainers")
@JsonIgnore
public CollectionPage getInitContainers(HttpRequestOptions options) {
return new CollectionPage(contextPath, ContainerEvidence.class, this.initContainers, Optional.ofNullable(initContainersNextLink), Collections.emptyList(), options);
}
@Property(name="labels")
@JsonIgnore
public Optional getLabels() {
return Optional.ofNullable(labels);
}
public KubernetesPodEvidence withLabels(Dictionary labels) {
KubernetesPodEvidence _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.security.kubernetesPodEvidence");
_x.labels = labels;
return _x;
}
@Property(name="name")
@JsonIgnore
public Optional getName() {
return Optional.ofNullable(name);
}
public KubernetesPodEvidence withName(String name) {
KubernetesPodEvidence _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.security.kubernetesPodEvidence");
_x.name = name;
return _x;
}
@Property(name="namespace")
@JsonIgnore
public Optional getNamespace() {
return Optional.ofNullable(namespace);
}
public KubernetesPodEvidence withNamespace(KubernetesNamespaceEvidence namespace) {
KubernetesPodEvidence _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.security.kubernetesPodEvidence");
_x.namespace = namespace;
return _x;
}
@Property(name="podIp")
@JsonIgnore
public Optional getPodIp() {
return Optional.ofNullable(podIp);
}
public KubernetesPodEvidence withPodIp(IpEvidence podIp) {
KubernetesPodEvidence _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.security.kubernetesPodEvidence");
_x.podIp = podIp;
return _x;
}
@Property(name="serviceAccount")
@JsonIgnore
public Optional getServiceAccount() {
return Optional.ofNullable(serviceAccount);
}
public KubernetesPodEvidence withServiceAccount(KubernetesServiceAccountEvidence serviceAccount) {
KubernetesPodEvidence _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.security.kubernetesPodEvidence");
_x.serviceAccount = serviceAccount;
return _x;
}
public KubernetesPodEvidence withUnmappedField(String name, Object value) {
KubernetesPodEvidence _x = _copy();
_x.setUnmappedField(name, value);
return _x;
}
@JsonAnySetter
private void setUnmappedField(String name, Object value) {
if (unmappedFields == null) {
unmappedFields = new UnmappedFieldsImpl();
}
unmappedFields.put(name, value);
}
@JsonAnyGetter
private UnmappedFieldsImpl unmappedFields() {
return unmappedFields == null ? UnmappedFieldsImpl.EMPTY : unmappedFields;
}
@Override
public UnmappedFields getUnmappedFields() {
return unmappedFields();
}
@Override
public void postInject(boolean addKeysToContextPath) {
// do nothing;
}
/**
* Returns a builder which is used to create a new
* instance of this class (given that this class is immutable).
*
* @return a new Builder for this class
*/
// Suffix used on builder factory method to differentiate the method
// from static builder methods on superclasses
public static Builder builderKubernetesPodEvidence() {
return new Builder();
}
public static final class Builder {
private OffsetDateTime createdDateTime;
private List detailedRoles;
private String detailedRolesNextLink;
private EvidenceRemediationStatus remediationStatus;
private String remediationStatusDetails;
private List roles;
private String rolesNextLink;
private List tags;
private String tagsNextLink;
private EvidenceVerdict verdict;
private List containers;
private String containersNextLink;
private KubernetesControllerEvidence controller;
private List ephemeralContainers;
private String ephemeralContainersNextLink;
private List initContainers;
private String initContainersNextLink;
private Dictionary labels;
private String name;
private KubernetesNamespaceEvidence namespace;
private IpEvidence podIp;
private KubernetesServiceAccountEvidence serviceAccount;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder createdDateTime(OffsetDateTime createdDateTime) {
this.createdDateTime = createdDateTime;
this.changedFields = changedFields.add("createdDateTime");
return this;
}
public Builder detailedRoles(List detailedRoles) {
this.detailedRoles = detailedRoles;
this.changedFields = changedFields.add("detailedRoles");
return this;
}
public Builder detailedRoles(String... detailedRoles) {
return detailedRoles(Arrays.asList(detailedRoles));
}
public Builder detailedRolesNextLink(String detailedRolesNextLink) {
this.detailedRolesNextLink = detailedRolesNextLink;
this.changedFields = changedFields.add("detailedRoles");
return this;
}
public Builder remediationStatus(EvidenceRemediationStatus remediationStatus) {
this.remediationStatus = remediationStatus;
this.changedFields = changedFields.add("remediationStatus");
return this;
}
public Builder remediationStatusDetails(String remediationStatusDetails) {
this.remediationStatusDetails = remediationStatusDetails;
this.changedFields = changedFields.add("remediationStatusDetails");
return this;
}
public Builder roles(List roles) {
this.roles = roles;
this.changedFields = changedFields.add("roles");
return this;
}
public Builder roles(EvidenceRole... roles) {
return roles(Arrays.asList(roles));
}
public Builder rolesNextLink(String rolesNextLink) {
this.rolesNextLink = rolesNextLink;
this.changedFields = changedFields.add("roles");
return this;
}
public Builder tags(List tags) {
this.tags = tags;
this.changedFields = changedFields.add("tags");
return this;
}
public Builder tags(String... tags) {
return tags(Arrays.asList(tags));
}
public Builder tagsNextLink(String tagsNextLink) {
this.tagsNextLink = tagsNextLink;
this.changedFields = changedFields.add("tags");
return this;
}
public Builder verdict(EvidenceVerdict verdict) {
this.verdict = verdict;
this.changedFields = changedFields.add("verdict");
return this;
}
public Builder containers(List containers) {
this.containers = containers;
this.changedFields = changedFields.add("containers");
return this;
}
public Builder containers(ContainerEvidence... containers) {
return containers(Arrays.asList(containers));
}
public Builder containersNextLink(String containersNextLink) {
this.containersNextLink = containersNextLink;
this.changedFields = changedFields.add("containers");
return this;
}
public Builder controller(KubernetesControllerEvidence controller) {
this.controller = controller;
this.changedFields = changedFields.add("controller");
return this;
}
public Builder ephemeralContainers(List ephemeralContainers) {
this.ephemeralContainers = ephemeralContainers;
this.changedFields = changedFields.add("ephemeralContainers");
return this;
}
public Builder ephemeralContainers(ContainerEvidence... ephemeralContainers) {
return ephemeralContainers(Arrays.asList(ephemeralContainers));
}
public Builder ephemeralContainersNextLink(String ephemeralContainersNextLink) {
this.ephemeralContainersNextLink = ephemeralContainersNextLink;
this.changedFields = changedFields.add("ephemeralContainers");
return this;
}
public Builder initContainers(List initContainers) {
this.initContainers = initContainers;
this.changedFields = changedFields.add("initContainers");
return this;
}
public Builder initContainers(ContainerEvidence... initContainers) {
return initContainers(Arrays.asList(initContainers));
}
public Builder initContainersNextLink(String initContainersNextLink) {
this.initContainersNextLink = initContainersNextLink;
this.changedFields = changedFields.add("initContainers");
return this;
}
public Builder labels(Dictionary labels) {
this.labels = labels;
this.changedFields = changedFields.add("labels");
return this;
}
public Builder name(String name) {
this.name = name;
this.changedFields = changedFields.add("name");
return this;
}
public Builder namespace(KubernetesNamespaceEvidence namespace) {
this.namespace = namespace;
this.changedFields = changedFields.add("namespace");
return this;
}
public Builder podIp(IpEvidence podIp) {
this.podIp = podIp;
this.changedFields = changedFields.add("podIp");
return this;
}
public Builder serviceAccount(KubernetesServiceAccountEvidence serviceAccount) {
this.serviceAccount = serviceAccount;
this.changedFields = changedFields.add("serviceAccount");
return this;
}
public KubernetesPodEvidence build() {
KubernetesPodEvidence _x = new KubernetesPodEvidence();
_x.contextPath = null;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.security.kubernetesPodEvidence";
_x.createdDateTime = createdDateTime;
_x.detailedRoles = detailedRoles;
_x.detailedRolesNextLink = detailedRolesNextLink;
_x.remediationStatus = remediationStatus;
_x.remediationStatusDetails = remediationStatusDetails;
_x.roles = roles;
_x.rolesNextLink = rolesNextLink;
_x.tags = tags;
_x.tagsNextLink = tagsNextLink;
_x.verdict = verdict;
_x.containers = containers;
_x.containersNextLink = containersNextLink;
_x.controller = controller;
_x.ephemeralContainers = ephemeralContainers;
_x.ephemeralContainersNextLink = ephemeralContainersNextLink;
_x.initContainers = initContainers;
_x.initContainersNextLink = initContainersNextLink;
_x.labels = labels;
_x.name = name;
_x.namespace = namespace;
_x.podIp = podIp;
_x.serviceAccount = serviceAccount;
return _x;
}
}
private KubernetesPodEvidence _copy() {
KubernetesPodEvidence _x = new KubernetesPodEvidence();
_x.contextPath = contextPath;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.createdDateTime = createdDateTime;
_x.detailedRoles = detailedRoles;
_x.remediationStatus = remediationStatus;
_x.remediationStatusDetails = remediationStatusDetails;
_x.roles = roles;
_x.tags = tags;
_x.verdict = verdict;
_x.containers = containers;
_x.controller = controller;
_x.ephemeralContainers = ephemeralContainers;
_x.initContainers = initContainers;
_x.labels = labels;
_x.name = name;
_x.namespace = namespace;
_x.podIp = podIp;
_x.serviceAccount = serviceAccount;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("KubernetesPodEvidence[");
b.append("createdDateTime=");
b.append(this.createdDateTime);
b.append(", ");
b.append("detailedRoles=");
b.append(this.detailedRoles);
b.append(", ");
b.append("remediationStatus=");
b.append(this.remediationStatus);
b.append(", ");
b.append("remediationStatusDetails=");
b.append(this.remediationStatusDetails);
b.append(", ");
b.append("roles=");
b.append(this.roles);
b.append(", ");
b.append("tags=");
b.append(this.tags);
b.append(", ");
b.append("verdict=");
b.append(this.verdict);
b.append(", ");
b.append("containers=");
b.append(this.containers);
b.append(", ");
b.append("controller=");
b.append(this.controller);
b.append(", ");
b.append("ephemeralContainers=");
b.append(this.ephemeralContainers);
b.append(", ");
b.append("initContainers=");
b.append(this.initContainers);
b.append(", ");
b.append("labels=");
b.append(this.labels);
b.append(", ");
b.append("name=");
b.append(this.name);
b.append(", ");
b.append("namespace=");
b.append(this.namespace);
b.append(", ");
b.append("podIp=");
b.append(this.podIp);
b.append(", ");
b.append("serviceAccount=");
b.append(this.serviceAccount);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy