odata.msgraph.client.entity.PrivilegedAccessGroup 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.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.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.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.Arrays;
import java.util.List;
import java.util.Optional;
import odata.msgraph.client.entity.collection.request.ApprovalCollectionRequest;
import odata.msgraph.client.entity.collection.request.PrivilegedAccessGroupAssignmentScheduleCollectionRequest;
import odata.msgraph.client.entity.collection.request.PrivilegedAccessGroupAssignmentScheduleInstanceCollectionRequest;
import odata.msgraph.client.entity.collection.request.PrivilegedAccessGroupAssignmentScheduleRequestCollectionRequest;
import odata.msgraph.client.entity.collection.request.PrivilegedAccessGroupEligibilityScheduleCollectionRequest;
import odata.msgraph.client.entity.collection.request.PrivilegedAccessGroupEligibilityScheduleInstanceCollectionRequest;
import odata.msgraph.client.entity.collection.request.PrivilegedAccessGroupEligibilityScheduleRequestCollectionRequest;
@JsonPropertyOrder({
"@odata.type",
"assignmentApprovals",
"assignmentScheduleInstances",
"assignmentScheduleRequests",
"assignmentSchedules",
"eligibilityScheduleInstances",
"eligibilityScheduleRequests",
"eligibilitySchedules"})
@JsonInclude(Include.NON_NULL)
public class PrivilegedAccessGroup extends Entity implements ODataEntityType {
@Override
public String odataTypeName() {
return "microsoft.graph.privilegedAccessGroup";
}
@JsonProperty("assignmentApprovals")
protected List assignmentApprovals;
@JsonProperty("assignmentScheduleInstances")
protected List assignmentScheduleInstances;
@JsonProperty("assignmentScheduleRequests")
protected List assignmentScheduleRequests;
@JsonProperty("assignmentSchedules")
protected List assignmentSchedules;
@JsonProperty("eligibilityScheduleInstances")
protected List eligibilityScheduleInstances;
@JsonProperty("eligibilityScheduleRequests")
protected List eligibilityScheduleRequests;
@JsonProperty("eligibilitySchedules")
protected List eligibilitySchedules;
protected PrivilegedAccessGroup() {
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 builderPrivilegedAccessGroup() {
return new Builder();
}
public static final class Builder {
private String id;
private List assignmentApprovals;
private List assignmentScheduleInstances;
private List assignmentScheduleRequests;
private List assignmentSchedules;
private List eligibilityScheduleInstances;
private List eligibilityScheduleRequests;
private List eligibilitySchedules;
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 assignmentApprovals(List assignmentApprovals) {
this.assignmentApprovals = assignmentApprovals;
this.changedFields = changedFields.add("assignmentApprovals");
return this;
}
public Builder assignmentApprovals(Approval... assignmentApprovals) {
return assignmentApprovals(Arrays.asList(assignmentApprovals));
}
public Builder assignmentScheduleInstances(List assignmentScheduleInstances) {
this.assignmentScheduleInstances = assignmentScheduleInstances;
this.changedFields = changedFields.add("assignmentScheduleInstances");
return this;
}
public Builder assignmentScheduleInstances(PrivilegedAccessGroupAssignmentScheduleInstance... assignmentScheduleInstances) {
return assignmentScheduleInstances(Arrays.asList(assignmentScheduleInstances));
}
public Builder assignmentScheduleRequests(List assignmentScheduleRequests) {
this.assignmentScheduleRequests = assignmentScheduleRequests;
this.changedFields = changedFields.add("assignmentScheduleRequests");
return this;
}
public Builder assignmentScheduleRequests(PrivilegedAccessGroupAssignmentScheduleRequest... assignmentScheduleRequests) {
return assignmentScheduleRequests(Arrays.asList(assignmentScheduleRequests));
}
public Builder assignmentSchedules(List assignmentSchedules) {
this.assignmentSchedules = assignmentSchedules;
this.changedFields = changedFields.add("assignmentSchedules");
return this;
}
public Builder assignmentSchedules(PrivilegedAccessGroupAssignmentSchedule... assignmentSchedules) {
return assignmentSchedules(Arrays.asList(assignmentSchedules));
}
public Builder eligibilityScheduleInstances(List eligibilityScheduleInstances) {
this.eligibilityScheduleInstances = eligibilityScheduleInstances;
this.changedFields = changedFields.add("eligibilityScheduleInstances");
return this;
}
public Builder eligibilityScheduleInstances(PrivilegedAccessGroupEligibilityScheduleInstance... eligibilityScheduleInstances) {
return eligibilityScheduleInstances(Arrays.asList(eligibilityScheduleInstances));
}
public Builder eligibilityScheduleRequests(List eligibilityScheduleRequests) {
this.eligibilityScheduleRequests = eligibilityScheduleRequests;
this.changedFields = changedFields.add("eligibilityScheduleRequests");
return this;
}
public Builder eligibilityScheduleRequests(PrivilegedAccessGroupEligibilityScheduleRequest... eligibilityScheduleRequests) {
return eligibilityScheduleRequests(Arrays.asList(eligibilityScheduleRequests));
}
public Builder eligibilitySchedules(List eligibilitySchedules) {
this.eligibilitySchedules = eligibilitySchedules;
this.changedFields = changedFields.add("eligibilitySchedules");
return this;
}
public Builder eligibilitySchedules(PrivilegedAccessGroupEligibilitySchedule... eligibilitySchedules) {
return eligibilitySchedules(Arrays.asList(eligibilitySchedules));
}
public PrivilegedAccessGroup build() {
PrivilegedAccessGroup _x = new PrivilegedAccessGroup();
_x.contextPath = null;
_x.changedFields = changedFields;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.privilegedAccessGroup";
_x.id = id;
_x.assignmentApprovals = assignmentApprovals;
_x.assignmentScheduleInstances = assignmentScheduleInstances;
_x.assignmentScheduleRequests = assignmentScheduleRequests;
_x.assignmentSchedules = assignmentSchedules;
_x.eligibilityScheduleInstances = eligibilityScheduleInstances;
_x.eligibilityScheduleRequests = eligibilityScheduleRequests;
_x.eligibilitySchedules = eligibilitySchedules;
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));
}
}
public PrivilegedAccessGroup withUnmappedField(String name, Object value) {
PrivilegedAccessGroup _x = _copy();
_x.setUnmappedField(name, value);
return _x;
}
@NavigationProperty(name="assignmentApprovals")
@JsonIgnore
public ApprovalCollectionRequest getAssignmentApprovals() {
return new ApprovalCollectionRequest(
contextPath.addSegment("assignmentApprovals"), Optional.ofNullable(assignmentApprovals));
}
@NavigationProperty(name="assignmentScheduleInstances")
@JsonIgnore
public PrivilegedAccessGroupAssignmentScheduleInstanceCollectionRequest getAssignmentScheduleInstances() {
return new PrivilegedAccessGroupAssignmentScheduleInstanceCollectionRequest(
contextPath.addSegment("assignmentScheduleInstances"), Optional.ofNullable(assignmentScheduleInstances));
}
@NavigationProperty(name="assignmentScheduleRequests")
@JsonIgnore
public PrivilegedAccessGroupAssignmentScheduleRequestCollectionRequest getAssignmentScheduleRequests() {
return new PrivilegedAccessGroupAssignmentScheduleRequestCollectionRequest(
contextPath.addSegment("assignmentScheduleRequests"), Optional.ofNullable(assignmentScheduleRequests));
}
@NavigationProperty(name="assignmentSchedules")
@JsonIgnore
public PrivilegedAccessGroupAssignmentScheduleCollectionRequest getAssignmentSchedules() {
return new PrivilegedAccessGroupAssignmentScheduleCollectionRequest(
contextPath.addSegment("assignmentSchedules"), Optional.ofNullable(assignmentSchedules));
}
@NavigationProperty(name="eligibilityScheduleInstances")
@JsonIgnore
public PrivilegedAccessGroupEligibilityScheduleInstanceCollectionRequest getEligibilityScheduleInstances() {
return new PrivilegedAccessGroupEligibilityScheduleInstanceCollectionRequest(
contextPath.addSegment("eligibilityScheduleInstances"), Optional.ofNullable(eligibilityScheduleInstances));
}
@NavigationProperty(name="eligibilityScheduleRequests")
@JsonIgnore
public PrivilegedAccessGroupEligibilityScheduleRequestCollectionRequest getEligibilityScheduleRequests() {
return new PrivilegedAccessGroupEligibilityScheduleRequestCollectionRequest(
contextPath.addSegment("eligibilityScheduleRequests"), Optional.ofNullable(eligibilityScheduleRequests));
}
@NavigationProperty(name="eligibilitySchedules")
@JsonIgnore
public PrivilegedAccessGroupEligibilityScheduleCollectionRequest getEligibilitySchedules() {
return new PrivilegedAccessGroupEligibilityScheduleCollectionRequest(
contextPath.addSegment("eligibilitySchedules"), Optional.ofNullable(eligibilitySchedules));
}
public PrivilegedAccessGroup withAssignmentApprovals(List assignmentApprovals) {
PrivilegedAccessGroup _x = _copy();
_x.changedFields = changedFields.add("assignmentApprovals");
_x.odataType = Util.nvl(odataType, "microsoft.graph.privilegedAccessGroup");
_x.assignmentApprovals = assignmentApprovals;
return _x;
}
public PrivilegedAccessGroup withAssignmentScheduleInstances(List assignmentScheduleInstances) {
PrivilegedAccessGroup _x = _copy();
_x.changedFields = changedFields.add("assignmentScheduleInstances");
_x.odataType = Util.nvl(odataType, "microsoft.graph.privilegedAccessGroup");
_x.assignmentScheduleInstances = assignmentScheduleInstances;
return _x;
}
public PrivilegedAccessGroup withAssignmentScheduleRequests(List assignmentScheduleRequests) {
PrivilegedAccessGroup _x = _copy();
_x.changedFields = changedFields.add("assignmentScheduleRequests");
_x.odataType = Util.nvl(odataType, "microsoft.graph.privilegedAccessGroup");
_x.assignmentScheduleRequests = assignmentScheduleRequests;
return _x;
}
public PrivilegedAccessGroup withAssignmentSchedules(List assignmentSchedules) {
PrivilegedAccessGroup _x = _copy();
_x.changedFields = changedFields.add("assignmentSchedules");
_x.odataType = Util.nvl(odataType, "microsoft.graph.privilegedAccessGroup");
_x.assignmentSchedules = assignmentSchedules;
return _x;
}
public PrivilegedAccessGroup withEligibilityScheduleInstances(List eligibilityScheduleInstances) {
PrivilegedAccessGroup _x = _copy();
_x.changedFields = changedFields.add("eligibilityScheduleInstances");
_x.odataType = Util.nvl(odataType, "microsoft.graph.privilegedAccessGroup");
_x.eligibilityScheduleInstances = eligibilityScheduleInstances;
return _x;
}
public PrivilegedAccessGroup withEligibilityScheduleRequests(List eligibilityScheduleRequests) {
PrivilegedAccessGroup _x = _copy();
_x.changedFields = changedFields.add("eligibilityScheduleRequests");
_x.odataType = Util.nvl(odataType, "microsoft.graph.privilegedAccessGroup");
_x.eligibilityScheduleRequests = eligibilityScheduleRequests;
return _x;
}
public PrivilegedAccessGroup withEligibilitySchedules(List eligibilitySchedules) {
PrivilegedAccessGroup _x = _copy();
_x.changedFields = changedFields.add("eligibilitySchedules");
_x.odataType = Util.nvl(odataType, "microsoft.graph.privilegedAccessGroup");
_x.eligibilitySchedules = eligibilitySchedules;
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 PrivilegedAccessGroup patch() {
RequestHelper.patch(this, contextPath, RequestOptions.EMPTY);
PrivilegedAccessGroup _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 PrivilegedAccessGroup put() {
RequestHelper.put(this, contextPath, RequestOptions.EMPTY);
PrivilegedAccessGroup _x = _copy();
_x.changedFields = null;
return _x;
}
private PrivilegedAccessGroup _copy() {
PrivilegedAccessGroup _x = new PrivilegedAccessGroup();
_x.contextPath = contextPath;
_x.changedFields = changedFields;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.id = id;
_x.assignmentApprovals = assignmentApprovals;
_x.assignmentScheduleInstances = assignmentScheduleInstances;
_x.assignmentScheduleRequests = assignmentScheduleRequests;
_x.assignmentSchedules = assignmentSchedules;
_x.eligibilityScheduleInstances = eligibilityScheduleInstances;
_x.eligibilityScheduleRequests = eligibilityScheduleRequests;
_x.eligibilitySchedules = eligibilitySchedules;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("PrivilegedAccessGroup[");
b.append("id=");
b.append(this.id);
b.append(", ");
b.append("assignmentApprovals=");
b.append(this.assignmentApprovals);
b.append(", ");
b.append("assignmentScheduleInstances=");
b.append(this.assignmentScheduleInstances);
b.append(", ");
b.append("assignmentScheduleRequests=");
b.append(this.assignmentScheduleRequests);
b.append(", ");
b.append("assignmentSchedules=");
b.append(this.assignmentSchedules);
b.append(", ");
b.append("eligibilityScheduleInstances=");
b.append(this.eligibilityScheduleInstances);
b.append(", ");
b.append("eligibilityScheduleRequests=");
b.append(this.eligibilityScheduleRequests);
b.append(", ");
b.append("eligibilitySchedules=");
b.append(this.eligibilitySchedules);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy