odata.msgraph.client.entity.IdentityGovernance 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.entity;
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.ClientException;
import com.github.davidmoten.odata.client.ContextPath;
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.NavigationProperty;
import com.github.davidmoten.odata.client.internal.ChangedFields;
import com.github.davidmoten.odata.client.internal.RequestHelper;
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.Optional;
import odata.msgraph.client.entity.request.AccessReviewSetRequest;
import odata.msgraph.client.entity.request.AppConsentApprovalRouteRequest;
import odata.msgraph.client.entity.request.EntitlementManagementRequest;
import odata.msgraph.client.entity.request.PrivilegedAccessRootRequest;
import odata.msgraph.client.entity.request.TermsOfUseContainerRequest;
import odata.msgraph.client.identitygovernance.entity.LifecycleWorkflowsContainer;
import odata.msgraph.client.identitygovernance.entity.request.LifecycleWorkflowsContainerRequest;
@JsonPropertyOrder({
"@odata.type",
"lifecycleWorkflows",
"accessReviews",
"appConsent",
"termsOfUse",
"entitlementManagement",
"privilegedAccess"})
@JsonInclude(Include.NON_NULL)
public class IdentityGovernance implements ODataEntityType {
@JacksonInject
@JsonIgnore
protected ContextPath contextPath;
@JacksonInject
@JsonIgnore
protected UnmappedFieldsImpl unmappedFields;
@JacksonInject
@JsonIgnore
protected ChangedFields changedFields;
@Override
public String odataTypeName() {
return "microsoft.graph.identityGovernance";
}
@JsonProperty("@odata.type")
protected String odataType;
@JsonProperty("lifecycleWorkflows")
protected LifecycleWorkflowsContainer lifecycleWorkflows;
@JsonProperty("accessReviews")
protected AccessReviewSet accessReviews;
@JsonProperty("appConsent")
protected AppConsentApprovalRoute appConsent;
@JsonProperty("termsOfUse")
protected TermsOfUseContainer termsOfUse;
@JsonProperty("entitlementManagement")
protected EntitlementManagement entitlementManagement;
@JsonProperty("privilegedAccess")
protected PrivilegedAccessRoot privilegedAccess;
protected IdentityGovernance() {
}
/**
* 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 LifecycleWorkflowsContainer lifecycleWorkflows;
private AccessReviewSet accessReviews;
private AppConsentApprovalRoute appConsent;
private TermsOfUseContainer termsOfUse;
private EntitlementManagement entitlementManagement;
private PrivilegedAccessRoot privilegedAccess;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder lifecycleWorkflows(LifecycleWorkflowsContainer lifecycleWorkflows) {
this.lifecycleWorkflows = lifecycleWorkflows;
this.changedFields = changedFields.add("lifecycleWorkflows");
return this;
}
public Builder accessReviews(AccessReviewSet accessReviews) {
this.accessReviews = accessReviews;
this.changedFields = changedFields.add("accessReviews");
return this;
}
public Builder appConsent(AppConsentApprovalRoute appConsent) {
this.appConsent = appConsent;
this.changedFields = changedFields.add("appConsent");
return this;
}
public Builder termsOfUse(TermsOfUseContainer termsOfUse) {
this.termsOfUse = termsOfUse;
this.changedFields = changedFields.add("termsOfUse");
return this;
}
public Builder entitlementManagement(EntitlementManagement entitlementManagement) {
this.entitlementManagement = entitlementManagement;
this.changedFields = changedFields.add("entitlementManagement");
return this;
}
public Builder privilegedAccess(PrivilegedAccessRoot privilegedAccess) {
this.privilegedAccess = privilegedAccess;
this.changedFields = changedFields.add("privilegedAccess");
return this;
}
public IdentityGovernance build() {
IdentityGovernance _x = new IdentityGovernance();
_x.contextPath = null;
_x.changedFields = changedFields;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.identityGovernance";
_x.lifecycleWorkflows = lifecycleWorkflows;
_x.accessReviews = accessReviews;
_x.appConsent = appConsent;
_x.termsOfUse = termsOfUse;
_x.entitlementManagement = entitlementManagement;
_x.privilegedAccess = privilegedAccess;
return _x;
}
}
@Override
@JsonIgnore
public ChangedFields getChangedFields() {
return changedFields;
}
@Override
public void postInject(boolean addKeysToContextPath) {
if (addKeysToContextPath) {
contextPath = contextPath.clearQueries();
}
}
public IdentityGovernance withUnmappedField(String name, Object value) {
IdentityGovernance _x = _copy();
_x.setUnmappedField(name, value);
return _x;
}
@NavigationProperty(name="lifecycleWorkflows")
@JsonIgnore
public LifecycleWorkflowsContainerRequest getLifecycleWorkflows() {
return new LifecycleWorkflowsContainerRequest(contextPath.addSegment("lifecycleWorkflows"), Optional.ofNullable(lifecycleWorkflows));
}
@NavigationProperty(name="accessReviews")
@JsonIgnore
public AccessReviewSetRequest getAccessReviews() {
return new AccessReviewSetRequest(contextPath.addSegment("accessReviews"), Optional.ofNullable(accessReviews));
}
@NavigationProperty(name="appConsent")
@JsonIgnore
public AppConsentApprovalRouteRequest getAppConsent() {
return new AppConsentApprovalRouteRequest(contextPath.addSegment("appConsent"), Optional.ofNullable(appConsent));
}
@NavigationProperty(name="termsOfUse")
@JsonIgnore
public TermsOfUseContainerRequest getTermsOfUse() {
return new TermsOfUseContainerRequest(contextPath.addSegment("termsOfUse"), Optional.ofNullable(termsOfUse));
}
@NavigationProperty(name="entitlementManagement")
@JsonIgnore
public EntitlementManagementRequest getEntitlementManagement() {
return new EntitlementManagementRequest(contextPath.addSegment("entitlementManagement"), Optional.ofNullable(entitlementManagement));
}
@NavigationProperty(name="privilegedAccess")
@JsonIgnore
public PrivilegedAccessRootRequest getPrivilegedAccess() {
return new PrivilegedAccessRootRequest(contextPath.addSegment("privilegedAccess"), Optional.ofNullable(privilegedAccess));
}
public IdentityGovernance withLifecycleWorkflows(LifecycleWorkflowsContainer lifecycleWorkflows) {
IdentityGovernance _x = _copy();
_x.changedFields = changedFields.add("lifecycleWorkflows");
_x.odataType = Util.nvl(odataType, "microsoft.graph.identityGovernance");
_x.lifecycleWorkflows = lifecycleWorkflows;
return _x;
}
public IdentityGovernance withAccessReviews(AccessReviewSet accessReviews) {
IdentityGovernance _x = _copy();
_x.changedFields = changedFields.add("accessReviews");
_x.odataType = Util.nvl(odataType, "microsoft.graph.identityGovernance");
_x.accessReviews = accessReviews;
return _x;
}
public IdentityGovernance withAppConsent(AppConsentApprovalRoute appConsent) {
IdentityGovernance _x = _copy();
_x.changedFields = changedFields.add("appConsent");
_x.odataType = Util.nvl(odataType, "microsoft.graph.identityGovernance");
_x.appConsent = appConsent;
return _x;
}
public IdentityGovernance withTermsOfUse(TermsOfUseContainer termsOfUse) {
IdentityGovernance _x = _copy();
_x.changedFields = changedFields.add("termsOfUse");
_x.odataType = Util.nvl(odataType, "microsoft.graph.identityGovernance");
_x.termsOfUse = termsOfUse;
return _x;
}
public IdentityGovernance withEntitlementManagement(EntitlementManagement entitlementManagement) {
IdentityGovernance _x = _copy();
_x.changedFields = changedFields.add("entitlementManagement");
_x.odataType = Util.nvl(odataType, "microsoft.graph.identityGovernance");
_x.entitlementManagement = entitlementManagement;
return _x;
}
public IdentityGovernance withPrivilegedAccess(PrivilegedAccessRoot privilegedAccess) {
IdentityGovernance _x = _copy();
_x.changedFields = changedFields.add("privilegedAccess");
_x.odataType = Util.nvl(odataType, "microsoft.graph.identityGovernance");
_x.privilegedAccess = privilegedAccess;
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 IdentityGovernance patch() {
RequestHelper.patch(this, contextPath, RequestOptions.EMPTY);
IdentityGovernance _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 IdentityGovernance put() {
RequestHelper.put(this, contextPath, RequestOptions.EMPTY);
IdentityGovernance _x = _copy();
_x.changedFields = null;
return _x;
}
private IdentityGovernance _copy() {
IdentityGovernance _x = new IdentityGovernance();
_x.contextPath = contextPath;
_x.changedFields = changedFields;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.lifecycleWorkflows = lifecycleWorkflows;
_x.accessReviews = accessReviews;
_x.appConsent = appConsent;
_x.termsOfUse = termsOfUse;
_x.entitlementManagement = entitlementManagement;
_x.privilegedAccess = privilegedAccess;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("IdentityGovernance[");
b.append("lifecycleWorkflows=");
b.append(this.lifecycleWorkflows);
b.append(", ");
b.append("accessReviews=");
b.append(this.accessReviews);
b.append(", ");
b.append("appConsent=");
b.append(this.appConsent);
b.append(", ");
b.append("termsOfUse=");
b.append(this.termsOfUse);
b.append(", ");
b.append("entitlementManagement=");
b.append(this.entitlementManagement);
b.append(", ");
b.append("privilegedAccess=");
b.append(this.privilegedAccess);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy