odata.msgraph.client.beta.complex.ConditionalAccessGrantControls Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of odata-client-msgraph-beta Show documentation
Show all versions of odata-client-msgraph-beta Show documentation
Java client for use with Microsoft Graph beta endpoint
package odata.msgraph.client.beta.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.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.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import odata.msgraph.client.beta.enums.ConditionalAccessGrantControl;
@JsonPropertyOrder({
"@odata.type",
"builtInControls",
"customAuthenticationFactors",
"operator",
"termsOfUse"})
@JsonInclude(Include.NON_NULL)
public class ConditionalAccessGrantControls implements ODataType {
@JacksonInject
@JsonIgnore
protected ContextPath contextPath;
@JacksonInject
@JsonIgnore
protected UnmappedFieldsImpl unmappedFields;
@JsonProperty("@odata.type")
protected String odataType;
@JsonProperty("builtInControls")
protected List builtInControls;
@JsonProperty("builtInControls@nextLink")
protected String builtInControlsNextLink;
@JsonProperty("customAuthenticationFactors")
protected List customAuthenticationFactors;
@JsonProperty("customAuthenticationFactors@nextLink")
protected String customAuthenticationFactorsNextLink;
@JsonProperty("operator")
protected String operator;
@JsonProperty("termsOfUse")
protected List termsOfUse;
@JsonProperty("termsOfUse@nextLink")
protected String termsOfUseNextLink;
protected ConditionalAccessGrantControls() {
}
@Override
public String odataTypeName() {
return "microsoft.graph.conditionalAccessGrantControls";
}
@Property(name="builtInControls")
@JsonIgnore
public CollectionPage getBuiltInControls() {
return new CollectionPage(contextPath, ConditionalAccessGrantControl.class, this.builtInControls, Optional.ofNullable(builtInControlsNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
@Property(name="builtInControls")
@JsonIgnore
public CollectionPage getBuiltInControls(HttpRequestOptions options) {
return new CollectionPage(contextPath, ConditionalAccessGrantControl.class, this.builtInControls, Optional.ofNullable(builtInControlsNextLink), Collections.emptyList(), options);
}
@Property(name="customAuthenticationFactors")
@JsonIgnore
public CollectionPage getCustomAuthenticationFactors() {
return new CollectionPage(contextPath, String.class, this.customAuthenticationFactors, Optional.ofNullable(customAuthenticationFactorsNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
@Property(name="customAuthenticationFactors")
@JsonIgnore
public CollectionPage getCustomAuthenticationFactors(HttpRequestOptions options) {
return new CollectionPage(contextPath, String.class, this.customAuthenticationFactors, Optional.ofNullable(customAuthenticationFactorsNextLink), Collections.emptyList(), options);
}
@Property(name="operator")
@JsonIgnore
public Optional getOperator() {
return Optional.ofNullable(operator);
}
public ConditionalAccessGrantControls withOperator(String operator) {
ConditionalAccessGrantControls _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.conditionalAccessGrantControls");
_x.operator = operator;
return _x;
}
@Property(name="termsOfUse")
@JsonIgnore
public CollectionPage getTermsOfUse() {
return new CollectionPage(contextPath, String.class, this.termsOfUse, Optional.ofNullable(termsOfUseNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
@Property(name="termsOfUse")
@JsonIgnore
public CollectionPage getTermsOfUse(HttpRequestOptions options) {
return new CollectionPage(contextPath, String.class, this.termsOfUse, Optional.ofNullable(termsOfUseNextLink), Collections.emptyList(), options);
}
public ConditionalAccessGrantControls withUnmappedField(String name, String value) {
ConditionalAccessGrantControls _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 builtInControls;
private String builtInControlsNextLink;
private List customAuthenticationFactors;
private String customAuthenticationFactorsNextLink;
private String operator;
private List termsOfUse;
private String termsOfUseNextLink;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder builtInControls(List builtInControls) {
this.builtInControls = builtInControls;
this.changedFields = changedFields.add("builtInControls");
return this;
}
public Builder builtInControls(ConditionalAccessGrantControl... builtInControls) {
return builtInControls(Arrays.asList(builtInControls));
}
public Builder builtInControlsNextLink(String builtInControlsNextLink) {
this.builtInControlsNextLink = builtInControlsNextLink;
this.changedFields = changedFields.add("builtInControls");
return this;
}
public Builder customAuthenticationFactors(List customAuthenticationFactors) {
this.customAuthenticationFactors = customAuthenticationFactors;
this.changedFields = changedFields.add("customAuthenticationFactors");
return this;
}
public Builder customAuthenticationFactors(String... customAuthenticationFactors) {
return customAuthenticationFactors(Arrays.asList(customAuthenticationFactors));
}
public Builder customAuthenticationFactorsNextLink(String customAuthenticationFactorsNextLink) {
this.customAuthenticationFactorsNextLink = customAuthenticationFactorsNextLink;
this.changedFields = changedFields.add("customAuthenticationFactors");
return this;
}
public Builder operator(String operator) {
this.operator = operator;
this.changedFields = changedFields.add("operator");
return this;
}
public Builder termsOfUse(List termsOfUse) {
this.termsOfUse = termsOfUse;
this.changedFields = changedFields.add("termsOfUse");
return this;
}
public Builder termsOfUse(String... termsOfUse) {
return termsOfUse(Arrays.asList(termsOfUse));
}
public Builder termsOfUseNextLink(String termsOfUseNextLink) {
this.termsOfUseNextLink = termsOfUseNextLink;
this.changedFields = changedFields.add("termsOfUse");
return this;
}
public ConditionalAccessGrantControls build() {
ConditionalAccessGrantControls _x = new ConditionalAccessGrantControls();
_x.contextPath = null;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.conditionalAccessGrantControls";
_x.builtInControls = builtInControls;
_x.builtInControlsNextLink = builtInControlsNextLink;
_x.customAuthenticationFactors = customAuthenticationFactors;
_x.customAuthenticationFactorsNextLink = customAuthenticationFactorsNextLink;
_x.operator = operator;
_x.termsOfUse = termsOfUse;
_x.termsOfUseNextLink = termsOfUseNextLink;
return _x;
}
}
private ConditionalAccessGrantControls _copy() {
ConditionalAccessGrantControls _x = new ConditionalAccessGrantControls();
_x.contextPath = contextPath;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.builtInControls = builtInControls;
_x.customAuthenticationFactors = customAuthenticationFactors;
_x.operator = operator;
_x.termsOfUse = termsOfUse;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("ConditionalAccessGrantControls[");
b.append("builtInControls=");
b.append(this.builtInControls);
b.append(", ");
b.append("customAuthenticationFactors=");
b.append(this.customAuthenticationFactors);
b.append(", ");
b.append("operator=");
b.append(this.operator);
b.append(", ");
b.append("termsOfUse=");
b.append(this.termsOfUse);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy