odata.msgraph.client.security.complex.BlobEvidence 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",
"blobContainer",
"etag",
"fileHashes",
"name",
"url"})
@JsonInclude(Include.NON_NULL)
public class BlobEvidence extends AlertEvidence implements ODataType {
@JsonProperty("blobContainer")
protected BlobContainerEvidence blobContainer;
@JsonProperty("etag")
protected String etag;
@JsonProperty("fileHashes")
protected List fileHashes;
@JsonProperty("fileHashes@nextLink")
protected String fileHashesNextLink;
@JsonProperty("name")
protected String name;
@JsonProperty("url")
protected String url;
protected BlobEvidence() {
super();
}
@Override
public String odataTypeName() {
return "microsoft.graph.security.blobEvidence";
}
@Property(name="blobContainer")
@JsonIgnore
public Optional getBlobContainer() {
return Optional.ofNullable(blobContainer);
}
public BlobEvidence withBlobContainer(BlobContainerEvidence blobContainer) {
BlobEvidence _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.security.blobEvidence");
_x.blobContainer = blobContainer;
return _x;
}
@Property(name="etag")
@JsonIgnore
public Optional getEtag() {
return Optional.ofNullable(etag);
}
public BlobEvidence withEtag(String etag) {
BlobEvidence _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.security.blobEvidence");
_x.etag = etag;
return _x;
}
@Property(name="fileHashes")
@JsonIgnore
public CollectionPage getFileHashes() {
return new CollectionPage(contextPath, FileHash.class, this.fileHashes, Optional.ofNullable(fileHashesNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
@Property(name="fileHashes")
@JsonIgnore
public CollectionPage getFileHashes(HttpRequestOptions options) {
return new CollectionPage(contextPath, FileHash.class, this.fileHashes, Optional.ofNullable(fileHashesNextLink), Collections.emptyList(), options);
}
@Property(name="name")
@JsonIgnore
public Optional getName() {
return Optional.ofNullable(name);
}
public BlobEvidence withName(String name) {
BlobEvidence _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.security.blobEvidence");
_x.name = name;
return _x;
}
@Property(name="url")
@JsonIgnore
public Optional getUrl() {
return Optional.ofNullable(url);
}
public BlobEvidence withUrl(String url) {
BlobEvidence _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.security.blobEvidence");
_x.url = url;
return _x;
}
public BlobEvidence withUnmappedField(String name, Object value) {
BlobEvidence _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 builderBlobEvidence() {
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 BlobContainerEvidence blobContainer;
private String etag;
private List fileHashes;
private String fileHashesNextLink;
private String name;
private String url;
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 blobContainer(BlobContainerEvidence blobContainer) {
this.blobContainer = blobContainer;
this.changedFields = changedFields.add("blobContainer");
return this;
}
public Builder etag(String etag) {
this.etag = etag;
this.changedFields = changedFields.add("etag");
return this;
}
public Builder fileHashes(List fileHashes) {
this.fileHashes = fileHashes;
this.changedFields = changedFields.add("fileHashes");
return this;
}
public Builder fileHashes(FileHash... fileHashes) {
return fileHashes(Arrays.asList(fileHashes));
}
public Builder fileHashesNextLink(String fileHashesNextLink) {
this.fileHashesNextLink = fileHashesNextLink;
this.changedFields = changedFields.add("fileHashes");
return this;
}
public Builder name(String name) {
this.name = name;
this.changedFields = changedFields.add("name");
return this;
}
public Builder url(String url) {
this.url = url;
this.changedFields = changedFields.add("url");
return this;
}
public BlobEvidence build() {
BlobEvidence _x = new BlobEvidence();
_x.contextPath = null;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.security.blobEvidence";
_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.blobContainer = blobContainer;
_x.etag = etag;
_x.fileHashes = fileHashes;
_x.fileHashesNextLink = fileHashesNextLink;
_x.name = name;
_x.url = url;
return _x;
}
}
private BlobEvidence _copy() {
BlobEvidence _x = new BlobEvidence();
_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.blobContainer = blobContainer;
_x.etag = etag;
_x.fileHashes = fileHashes;
_x.name = name;
_x.url = url;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("BlobEvidence[");
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("blobContainer=");
b.append(this.blobContainer);
b.append(", ");
b.append("etag=");
b.append(this.etag);
b.append(", ");
b.append("fileHashes=");
b.append(this.fileHashes);
b.append(", ");
b.append("name=");
b.append(this.name);
b.append(", ");
b.append("url=");
b.append(this.url);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy