All Downloads are FREE. Search and download functionalities are using the official Maven repository.

odata.msgraph.client.entity.CrossTenantAccessPolicyConfigurationDefault Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package odata.msgraph.client.entity;

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.ActionRequestNoReturn;
import com.github.davidmoten.odata.client.ClientException;
import com.github.davidmoten.odata.client.NameValue;
import com.github.davidmoten.odata.client.ODataEntityType;
import com.github.davidmoten.odata.client.RequestOptions;
import com.github.davidmoten.odata.client.UnmappedFields;
import com.github.davidmoten.odata.client.Util;
import com.github.davidmoten.odata.client.annotation.Action;
import com.github.davidmoten.odata.client.annotation.Property;
import com.github.davidmoten.odata.client.internal.ChangedFields;
import com.github.davidmoten.odata.client.internal.ParameterMap;
import com.github.davidmoten.odata.client.internal.RequestHelper;
import com.github.davidmoten.odata.client.internal.TypedObject;
import com.github.davidmoten.odata.client.internal.UnmappedFieldsImpl;

import java.lang.Boolean;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.util.Map;
import java.util.Optional;

import odata.msgraph.client.complex.CrossTenantAccessPolicyB2BSetting;
import odata.msgraph.client.complex.CrossTenantAccessPolicyInboundTrust;
import odata.msgraph.client.complex.InboundOutboundPolicyConfiguration;


/**
 * 

* Org.OData.Capabilities.V1.CountRestrictions *

* Countable = false *

* Org.OData.Capabilities.V1.ExpandRestrictions *

* Expandable = false *

* Org.OData.Capabilities.V1.FilterRestrictions *

* Filterable = false *

* Org.OData.Capabilities.V1.NavigationRestrictions *

* Referenceable = false *

* Org.OData.Capabilities.V1.SelectRestrictions *

* Selectable = true *

* Org.OData.Capabilities.V1.SkipSupported *

* false *

* Org.OData.Capabilities.V1.TopSupported *

* false */@JsonPropertyOrder({ "@odata.type", "automaticUserConsentSettings", "b2bCollaborationInbound", "b2bCollaborationOutbound", "b2bDirectConnectInbound", "b2bDirectConnectOutbound", "inboundTrust", "isServiceDefault"}) @JsonInclude(Include.NON_NULL) public class CrossTenantAccessPolicyConfigurationDefault extends Entity implements ODataEntityType { @Override public String odataTypeName() { return "microsoft.graph.crossTenantAccessPolicyConfigurationDefault"; } @JsonProperty("automaticUserConsentSettings") protected InboundOutboundPolicyConfiguration automaticUserConsentSettings; @JsonProperty("b2bCollaborationInbound") protected CrossTenantAccessPolicyB2BSetting b2bCollaborationInbound; @JsonProperty("b2bCollaborationOutbound") protected CrossTenantAccessPolicyB2BSetting b2bCollaborationOutbound; @JsonProperty("b2bDirectConnectInbound") protected CrossTenantAccessPolicyB2BSetting b2bDirectConnectInbound; @JsonProperty("b2bDirectConnectOutbound") protected CrossTenantAccessPolicyB2BSetting b2bDirectConnectOutbound; @JsonProperty("inboundTrust") protected CrossTenantAccessPolicyInboundTrust inboundTrust; @JsonProperty("isServiceDefault") protected Boolean isServiceDefault; protected CrossTenantAccessPolicyConfigurationDefault() { super(); } /** * 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 builderCrossTenantAccessPolicyConfigurationDefault() { return new Builder(); } public static final class Builder { private String id; private InboundOutboundPolicyConfiguration automaticUserConsentSettings; private CrossTenantAccessPolicyB2BSetting b2bCollaborationInbound; private CrossTenantAccessPolicyB2BSetting b2bCollaborationOutbound; private CrossTenantAccessPolicyB2BSetting b2bDirectConnectInbound; private CrossTenantAccessPolicyB2BSetting b2bDirectConnectOutbound; private CrossTenantAccessPolicyInboundTrust inboundTrust; private Boolean isServiceDefault; private ChangedFields changedFields = ChangedFields.EMPTY; Builder() { // prevent instantiation } public Builder id(String id) { this.id = id; this.changedFields = changedFields.add("id"); return this; } public Builder automaticUserConsentSettings(InboundOutboundPolicyConfiguration automaticUserConsentSettings) { this.automaticUserConsentSettings = automaticUserConsentSettings; this.changedFields = changedFields.add("automaticUserConsentSettings"); return this; } public Builder b2bCollaborationInbound(CrossTenantAccessPolicyB2BSetting b2bCollaborationInbound) { this.b2bCollaborationInbound = b2bCollaborationInbound; this.changedFields = changedFields.add("b2bCollaborationInbound"); return this; } public Builder b2bCollaborationOutbound(CrossTenantAccessPolicyB2BSetting b2bCollaborationOutbound) { this.b2bCollaborationOutbound = b2bCollaborationOutbound; this.changedFields = changedFields.add("b2bCollaborationOutbound"); return this; } public Builder b2bDirectConnectInbound(CrossTenantAccessPolicyB2BSetting b2bDirectConnectInbound) { this.b2bDirectConnectInbound = b2bDirectConnectInbound; this.changedFields = changedFields.add("b2bDirectConnectInbound"); return this; } public Builder b2bDirectConnectOutbound(CrossTenantAccessPolicyB2BSetting b2bDirectConnectOutbound) { this.b2bDirectConnectOutbound = b2bDirectConnectOutbound; this.changedFields = changedFields.add("b2bDirectConnectOutbound"); return this; } public Builder inboundTrust(CrossTenantAccessPolicyInboundTrust inboundTrust) { this.inboundTrust = inboundTrust; this.changedFields = changedFields.add("inboundTrust"); return this; } public Builder isServiceDefault(Boolean isServiceDefault) { this.isServiceDefault = isServiceDefault; this.changedFields = changedFields.add("isServiceDefault"); return this; } public CrossTenantAccessPolicyConfigurationDefault build() { CrossTenantAccessPolicyConfigurationDefault _x = new CrossTenantAccessPolicyConfigurationDefault(); _x.contextPath = null; _x.changedFields = changedFields; _x.unmappedFields = new UnmappedFieldsImpl(); _x.odataType = "microsoft.graph.crossTenantAccessPolicyConfigurationDefault"; _x.id = id; _x.automaticUserConsentSettings = automaticUserConsentSettings; _x.b2bCollaborationInbound = b2bCollaborationInbound; _x.b2bCollaborationOutbound = b2bCollaborationOutbound; _x.b2bDirectConnectInbound = b2bDirectConnectInbound; _x.b2bDirectConnectOutbound = b2bDirectConnectOutbound; _x.inboundTrust = inboundTrust; _x.isServiceDefault = isServiceDefault; return _x; } } @Override @JsonIgnore public ChangedFields getChangedFields() { return changedFields; } @Override public void postInject(boolean addKeysToContextPath) { if (addKeysToContextPath && id != null) { contextPath = contextPath.clearQueries().addKeys(new NameValue(id, String.class)); } } @Property(name="automaticUserConsentSettings") @JsonIgnore public Optional getAutomaticUserConsentSettings() { return Optional.ofNullable(automaticUserConsentSettings); } public CrossTenantAccessPolicyConfigurationDefault withAutomaticUserConsentSettings(InboundOutboundPolicyConfiguration automaticUserConsentSettings) { CrossTenantAccessPolicyConfigurationDefault _x = _copy(); _x.changedFields = changedFields.add("automaticUserConsentSettings"); _x.odataType = Util.nvl(odataType, "microsoft.graph.crossTenantAccessPolicyConfigurationDefault"); _x.automaticUserConsentSettings = automaticUserConsentSettings; return _x; } @Property(name="b2bCollaborationInbound") @JsonIgnore public Optional getB2bCollaborationInbound() { return Optional.ofNullable(b2bCollaborationInbound); } public CrossTenantAccessPolicyConfigurationDefault withB2bCollaborationInbound(CrossTenantAccessPolicyB2BSetting b2bCollaborationInbound) { CrossTenantAccessPolicyConfigurationDefault _x = _copy(); _x.changedFields = changedFields.add("b2bCollaborationInbound"); _x.odataType = Util.nvl(odataType, "microsoft.graph.crossTenantAccessPolicyConfigurationDefault"); _x.b2bCollaborationInbound = b2bCollaborationInbound; return _x; } @Property(name="b2bCollaborationOutbound") @JsonIgnore public Optional getB2bCollaborationOutbound() { return Optional.ofNullable(b2bCollaborationOutbound); } public CrossTenantAccessPolicyConfigurationDefault withB2bCollaborationOutbound(CrossTenantAccessPolicyB2BSetting b2bCollaborationOutbound) { CrossTenantAccessPolicyConfigurationDefault _x = _copy(); _x.changedFields = changedFields.add("b2bCollaborationOutbound"); _x.odataType = Util.nvl(odataType, "microsoft.graph.crossTenantAccessPolicyConfigurationDefault"); _x.b2bCollaborationOutbound = b2bCollaborationOutbound; return _x; } @Property(name="b2bDirectConnectInbound") @JsonIgnore public Optional getB2bDirectConnectInbound() { return Optional.ofNullable(b2bDirectConnectInbound); } public CrossTenantAccessPolicyConfigurationDefault withB2bDirectConnectInbound(CrossTenantAccessPolicyB2BSetting b2bDirectConnectInbound) { CrossTenantAccessPolicyConfigurationDefault _x = _copy(); _x.changedFields = changedFields.add("b2bDirectConnectInbound"); _x.odataType = Util.nvl(odataType, "microsoft.graph.crossTenantAccessPolicyConfigurationDefault"); _x.b2bDirectConnectInbound = b2bDirectConnectInbound; return _x; } @Property(name="b2bDirectConnectOutbound") @JsonIgnore public Optional getB2bDirectConnectOutbound() { return Optional.ofNullable(b2bDirectConnectOutbound); } public CrossTenantAccessPolicyConfigurationDefault withB2bDirectConnectOutbound(CrossTenantAccessPolicyB2BSetting b2bDirectConnectOutbound) { CrossTenantAccessPolicyConfigurationDefault _x = _copy(); _x.changedFields = changedFields.add("b2bDirectConnectOutbound"); _x.odataType = Util.nvl(odataType, "microsoft.graph.crossTenantAccessPolicyConfigurationDefault"); _x.b2bDirectConnectOutbound = b2bDirectConnectOutbound; return _x; } @Property(name="inboundTrust") @JsonIgnore public Optional getInboundTrust() { return Optional.ofNullable(inboundTrust); } public CrossTenantAccessPolicyConfigurationDefault withInboundTrust(CrossTenantAccessPolicyInboundTrust inboundTrust) { CrossTenantAccessPolicyConfigurationDefault _x = _copy(); _x.changedFields = changedFields.add("inboundTrust"); _x.odataType = Util.nvl(odataType, "microsoft.graph.crossTenantAccessPolicyConfigurationDefault"); _x.inboundTrust = inboundTrust; return _x; } @Property(name="isServiceDefault") @JsonIgnore public Optional getIsServiceDefault() { return Optional.ofNullable(isServiceDefault); } public CrossTenantAccessPolicyConfigurationDefault withIsServiceDefault(Boolean isServiceDefault) { CrossTenantAccessPolicyConfigurationDefault _x = _copy(); _x.changedFields = changedFields.add("isServiceDefault"); _x.odataType = Util.nvl(odataType, "microsoft.graph.crossTenantAccessPolicyConfigurationDefault"); _x.isServiceDefault = isServiceDefault; return _x; } public CrossTenantAccessPolicyConfigurationDefault withUnmappedField(String name, Object value) { CrossTenantAccessPolicyConfigurationDefault _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(); } /** * Submits only changed fields for update and returns an * immutable copy of {@code this} with changed fields reset. * * @return a copy of {@code this} with changed fields reset * @throws ClientException if HTTP response is not as expected */ public CrossTenantAccessPolicyConfigurationDefault patch() { RequestHelper.patch(this, contextPath, RequestOptions.EMPTY); CrossTenantAccessPolicyConfigurationDefault _x = _copy(); _x.changedFields = null; return _x; } /** * Submits all fields for update and returns an immutable copy of {@code this} * with changed fields reset (they were ignored anyway). * * @return a copy of {@code this} with changed fields reset * @throws ClientException if HTTP response is not as expected */ public CrossTenantAccessPolicyConfigurationDefault put() { RequestHelper.put(this, contextPath, RequestOptions.EMPTY); CrossTenantAccessPolicyConfigurationDefault _x = _copy(); _x.changedFields = null; return _x; } private CrossTenantAccessPolicyConfigurationDefault _copy() { CrossTenantAccessPolicyConfigurationDefault _x = new CrossTenantAccessPolicyConfigurationDefault(); _x.contextPath = contextPath; _x.changedFields = changedFields; _x.unmappedFields = unmappedFields.copy(); _x.odataType = odataType; _x.id = id; _x.automaticUserConsentSettings = automaticUserConsentSettings; _x.b2bCollaborationInbound = b2bCollaborationInbound; _x.b2bCollaborationOutbound = b2bCollaborationOutbound; _x.b2bDirectConnectInbound = b2bDirectConnectInbound; _x.b2bDirectConnectOutbound = b2bDirectConnectOutbound; _x.inboundTrust = inboundTrust; _x.isServiceDefault = isServiceDefault; return _x; } @Action(name = "resetToSystemDefault") @JsonIgnore public ActionRequestNoReturn resetToSystemDefault() { Map _parameters = ParameterMap.empty(); return new ActionRequestNoReturn(this.contextPath.addActionOrFunctionSegment("microsoft.graph.resetToSystemDefault"), _parameters); } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("CrossTenantAccessPolicyConfigurationDefault["); b.append("id="); b.append(this.id); b.append(", "); b.append("automaticUserConsentSettings="); b.append(this.automaticUserConsentSettings); b.append(", "); b.append("b2bCollaborationInbound="); b.append(this.b2bCollaborationInbound); b.append(", "); b.append("b2bCollaborationOutbound="); b.append(this.b2bCollaborationOutbound); b.append(", "); b.append("b2bDirectConnectInbound="); b.append(this.b2bDirectConnectInbound); b.append(", "); b.append("b2bDirectConnectOutbound="); b.append(this.b2bDirectConnectOutbound); b.append(", "); b.append("inboundTrust="); b.append(this.inboundTrust); b.append(", "); b.append("isServiceDefault="); b.append(this.isServiceDefault); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy