odata.msgraph.client.security.complex.HuntingQueryResults 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.JacksonInject;
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.ContextPath;
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.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.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
@JsonPropertyOrder({
"@odata.type",
"results",
"schema"})
@JsonInclude(Include.NON_NULL)
public class HuntingQueryResults implements ODataType {
@JacksonInject
@JsonIgnore
protected ContextPath contextPath;
@JacksonInject
@JsonIgnore
protected UnmappedFieldsImpl unmappedFields;
@JsonProperty("@odata.type")
protected String odataType;
@JsonProperty("results")
protected List results;
@JsonProperty("results@nextLink")
protected String resultsNextLink;
@JsonProperty("schema")
protected List schema;
@JsonProperty("schema@nextLink")
protected String schemaNextLink;
protected HuntingQueryResults() {
}
@Override
public String odataTypeName() {
return "microsoft.graph.security.huntingQueryResults";
}
@Property(name="results")
@JsonIgnore
public CollectionPage getResults() {
return new CollectionPage(contextPath, HuntingRowResult.class, this.results, Optional.ofNullable(resultsNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
@Property(name="results")
@JsonIgnore
public CollectionPage getResults(HttpRequestOptions options) {
return new CollectionPage(contextPath, HuntingRowResult.class, this.results, Optional.ofNullable(resultsNextLink), Collections.emptyList(), options);
}
@Property(name="schema")
@JsonIgnore
public CollectionPage getSchema() {
return new CollectionPage(contextPath, SinglePropertySchema.class, this.schema, Optional.ofNullable(schemaNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
@Property(name="schema")
@JsonIgnore
public CollectionPage getSchema(HttpRequestOptions options) {
return new CollectionPage(contextPath, SinglePropertySchema.class, this.schema, Optional.ofNullable(schemaNextLink), Collections.emptyList(), options);
}
public HuntingQueryResults withUnmappedField(String name, Object value) {
HuntingQueryResults _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 builder() {
return new Builder();
}
public static final class Builder {
private List results;
private String resultsNextLink;
private List schema;
private String schemaNextLink;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder results(List results) {
this.results = results;
this.changedFields = changedFields.add("results");
return this;
}
public Builder results(HuntingRowResult... results) {
return results(Arrays.asList(results));
}
public Builder resultsNextLink(String resultsNextLink) {
this.resultsNextLink = resultsNextLink;
this.changedFields = changedFields.add("results");
return this;
}
public Builder schema(List schema) {
this.schema = schema;
this.changedFields = changedFields.add("schema");
return this;
}
public Builder schema(SinglePropertySchema... schema) {
return schema(Arrays.asList(schema));
}
public Builder schemaNextLink(String schemaNextLink) {
this.schemaNextLink = schemaNextLink;
this.changedFields = changedFields.add("schema");
return this;
}
public HuntingQueryResults build() {
HuntingQueryResults _x = new HuntingQueryResults();
_x.contextPath = null;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.security.huntingQueryResults";
_x.results = results;
_x.resultsNextLink = resultsNextLink;
_x.schema = schema;
_x.schemaNextLink = schemaNextLink;
return _x;
}
}
private HuntingQueryResults _copy() {
HuntingQueryResults _x = new HuntingQueryResults();
_x.contextPath = contextPath;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.results = results;
_x.schema = schema;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("HuntingQueryResults[");
b.append("results=");
b.append(this.results);
b.append(", ");
b.append("schema=");
b.append(this.schema);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy