odata.msgraph.client.beta.entity.PermissionGrantConditionSet 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.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.CollectionPage;
import com.github.davidmoten.odata.client.HttpRequestOptions;
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.Property;
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.Boolean;
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.PermissionType;
@JsonPropertyOrder({
"@odata.type",
"clientApplicationIds",
"clientApplicationPublisherIds",
"clientApplicationsFromVerifiedPublisherOnly",
"clientApplicationTenantIds",
"permissionClassification",
"permissions",
"permissionType",
"resourceApplication"})
@JsonInclude(Include.NON_NULL)
public class PermissionGrantConditionSet extends Entity implements ODataEntityType {
@Override
public String odataTypeName() {
return "microsoft.graph.permissionGrantConditionSet";
}
@JsonProperty("clientApplicationIds")
protected List clientApplicationIds;
@JsonProperty("clientApplicationIds@nextLink")
protected String clientApplicationIdsNextLink;
@JsonProperty("clientApplicationPublisherIds")
protected List clientApplicationPublisherIds;
@JsonProperty("clientApplicationPublisherIds@nextLink")
protected String clientApplicationPublisherIdsNextLink;
@JsonProperty("clientApplicationsFromVerifiedPublisherOnly")
protected Boolean clientApplicationsFromVerifiedPublisherOnly;
@JsonProperty("clientApplicationTenantIds")
protected List clientApplicationTenantIds;
@JsonProperty("clientApplicationTenantIds@nextLink")
protected String clientApplicationTenantIdsNextLink;
@JsonProperty("permissionClassification")
protected String permissionClassification;
@JsonProperty("permissions")
protected List permissions;
@JsonProperty("permissions@nextLink")
protected String permissionsNextLink;
@JsonProperty("permissionType")
protected PermissionType permissionType;
@JsonProperty("resourceApplication")
protected String resourceApplication;
protected PermissionGrantConditionSet() {
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 builderPermissionGrantConditionSet() {
return new Builder();
}
public static final class Builder {
private String id;
private List clientApplicationIds;
private String clientApplicationIdsNextLink;
private List clientApplicationPublisherIds;
private String clientApplicationPublisherIdsNextLink;
private Boolean clientApplicationsFromVerifiedPublisherOnly;
private List clientApplicationTenantIds;
private String clientApplicationTenantIdsNextLink;
private String permissionClassification;
private List permissions;
private String permissionsNextLink;
private PermissionType permissionType;
private String resourceApplication;
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 clientApplicationIds(List clientApplicationIds) {
this.clientApplicationIds = clientApplicationIds;
this.changedFields = changedFields.add("clientApplicationIds");
return this;
}
public Builder clientApplicationIds(String... clientApplicationIds) {
return clientApplicationIds(Arrays.asList(clientApplicationIds));
}
public Builder clientApplicationIdsNextLink(String clientApplicationIdsNextLink) {
this.clientApplicationIdsNextLink = clientApplicationIdsNextLink;
this.changedFields = changedFields.add("clientApplicationIds");
return this;
}
public Builder clientApplicationPublisherIds(List clientApplicationPublisherIds) {
this.clientApplicationPublisherIds = clientApplicationPublisherIds;
this.changedFields = changedFields.add("clientApplicationPublisherIds");
return this;
}
public Builder clientApplicationPublisherIds(String... clientApplicationPublisherIds) {
return clientApplicationPublisherIds(Arrays.asList(clientApplicationPublisherIds));
}
public Builder clientApplicationPublisherIdsNextLink(String clientApplicationPublisherIdsNextLink) {
this.clientApplicationPublisherIdsNextLink = clientApplicationPublisherIdsNextLink;
this.changedFields = changedFields.add("clientApplicationPublisherIds");
return this;
}
public Builder clientApplicationsFromVerifiedPublisherOnly(Boolean clientApplicationsFromVerifiedPublisherOnly) {
this.clientApplicationsFromVerifiedPublisherOnly = clientApplicationsFromVerifiedPublisherOnly;
this.changedFields = changedFields.add("clientApplicationsFromVerifiedPublisherOnly");
return this;
}
public Builder clientApplicationTenantIds(List clientApplicationTenantIds) {
this.clientApplicationTenantIds = clientApplicationTenantIds;
this.changedFields = changedFields.add("clientApplicationTenantIds");
return this;
}
public Builder clientApplicationTenantIds(String... clientApplicationTenantIds) {
return clientApplicationTenantIds(Arrays.asList(clientApplicationTenantIds));
}
public Builder clientApplicationTenantIdsNextLink(String clientApplicationTenantIdsNextLink) {
this.clientApplicationTenantIdsNextLink = clientApplicationTenantIdsNextLink;
this.changedFields = changedFields.add("clientApplicationTenantIds");
return this;
}
public Builder permissionClassification(String permissionClassification) {
this.permissionClassification = permissionClassification;
this.changedFields = changedFields.add("permissionClassification");
return this;
}
public Builder permissions(List permissions) {
this.permissions = permissions;
this.changedFields = changedFields.add("permissions");
return this;
}
public Builder permissions(String... permissions) {
return permissions(Arrays.asList(permissions));
}
public Builder permissionsNextLink(String permissionsNextLink) {
this.permissionsNextLink = permissionsNextLink;
this.changedFields = changedFields.add("permissions");
return this;
}
public Builder permissionType(PermissionType permissionType) {
this.permissionType = permissionType;
this.changedFields = changedFields.add("permissionType");
return this;
}
public Builder resourceApplication(String resourceApplication) {
this.resourceApplication = resourceApplication;
this.changedFields = changedFields.add("resourceApplication");
return this;
}
public PermissionGrantConditionSet build() {
PermissionGrantConditionSet _x = new PermissionGrantConditionSet();
_x.contextPath = null;
_x.changedFields = changedFields;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.permissionGrantConditionSet";
_x.id = id;
_x.clientApplicationIds = clientApplicationIds;
_x.clientApplicationIdsNextLink = clientApplicationIdsNextLink;
_x.clientApplicationPublisherIds = clientApplicationPublisherIds;
_x.clientApplicationPublisherIdsNextLink = clientApplicationPublisherIdsNextLink;
_x.clientApplicationsFromVerifiedPublisherOnly = clientApplicationsFromVerifiedPublisherOnly;
_x.clientApplicationTenantIds = clientApplicationTenantIds;
_x.clientApplicationTenantIdsNextLink = clientApplicationTenantIdsNextLink;
_x.permissionClassification = permissionClassification;
_x.permissions = permissions;
_x.permissionsNextLink = permissionsNextLink;
_x.permissionType = permissionType;
_x.resourceApplication = resourceApplication;
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.toString()));
}
}
@Property(name="clientApplicationIds")
@JsonIgnore
public CollectionPage getClientApplicationIds() {
return new CollectionPage(contextPath, String.class, this.clientApplicationIds, Optional.ofNullable(clientApplicationIdsNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
public PermissionGrantConditionSet withClientApplicationIds(List clientApplicationIds) {
PermissionGrantConditionSet _x = _copy();
_x.changedFields = changedFields.add("clientApplicationIds");
_x.odataType = Util.nvl(odataType, "microsoft.graph.permissionGrantConditionSet");
_x.clientApplicationIds = clientApplicationIds;
return _x;
}
@Property(name="clientApplicationIds")
@JsonIgnore
public CollectionPage getClientApplicationIds(HttpRequestOptions options) {
return new CollectionPage(contextPath, String.class, this.clientApplicationIds, Optional.ofNullable(clientApplicationIdsNextLink), Collections.emptyList(), options);
}
@Property(name="clientApplicationPublisherIds")
@JsonIgnore
public CollectionPage getClientApplicationPublisherIds() {
return new CollectionPage(contextPath, String.class, this.clientApplicationPublisherIds, Optional.ofNullable(clientApplicationPublisherIdsNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
public PermissionGrantConditionSet withClientApplicationPublisherIds(List clientApplicationPublisherIds) {
PermissionGrantConditionSet _x = _copy();
_x.changedFields = changedFields.add("clientApplicationPublisherIds");
_x.odataType = Util.nvl(odataType, "microsoft.graph.permissionGrantConditionSet");
_x.clientApplicationPublisherIds = clientApplicationPublisherIds;
return _x;
}
@Property(name="clientApplicationPublisherIds")
@JsonIgnore
public CollectionPage getClientApplicationPublisherIds(HttpRequestOptions options) {
return new CollectionPage(contextPath, String.class, this.clientApplicationPublisherIds, Optional.ofNullable(clientApplicationPublisherIdsNextLink), Collections.emptyList(), options);
}
@Property(name="clientApplicationsFromVerifiedPublisherOnly")
@JsonIgnore
public Optional getClientApplicationsFromVerifiedPublisherOnly() {
return Optional.ofNullable(clientApplicationsFromVerifiedPublisherOnly);
}
public PermissionGrantConditionSet withClientApplicationsFromVerifiedPublisherOnly(Boolean clientApplicationsFromVerifiedPublisherOnly) {
PermissionGrantConditionSet _x = _copy();
_x.changedFields = changedFields.add("clientApplicationsFromVerifiedPublisherOnly");
_x.odataType = Util.nvl(odataType, "microsoft.graph.permissionGrantConditionSet");
_x.clientApplicationsFromVerifiedPublisherOnly = clientApplicationsFromVerifiedPublisherOnly;
return _x;
}
@Property(name="clientApplicationTenantIds")
@JsonIgnore
public CollectionPage getClientApplicationTenantIds() {
return new CollectionPage(contextPath, String.class, this.clientApplicationTenantIds, Optional.ofNullable(clientApplicationTenantIdsNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
public PermissionGrantConditionSet withClientApplicationTenantIds(List clientApplicationTenantIds) {
PermissionGrantConditionSet _x = _copy();
_x.changedFields = changedFields.add("clientApplicationTenantIds");
_x.odataType = Util.nvl(odataType, "microsoft.graph.permissionGrantConditionSet");
_x.clientApplicationTenantIds = clientApplicationTenantIds;
return _x;
}
@Property(name="clientApplicationTenantIds")
@JsonIgnore
public CollectionPage getClientApplicationTenantIds(HttpRequestOptions options) {
return new CollectionPage(contextPath, String.class, this.clientApplicationTenantIds, Optional.ofNullable(clientApplicationTenantIdsNextLink), Collections.emptyList(), options);
}
@Property(name="permissionClassification")
@JsonIgnore
public Optional getPermissionClassification() {
return Optional.ofNullable(permissionClassification);
}
public PermissionGrantConditionSet withPermissionClassification(String permissionClassification) {
PermissionGrantConditionSet _x = _copy();
_x.changedFields = changedFields.add("permissionClassification");
_x.odataType = Util.nvl(odataType, "microsoft.graph.permissionGrantConditionSet");
_x.permissionClassification = permissionClassification;
return _x;
}
@Property(name="permissions")
@JsonIgnore
public CollectionPage getPermissions() {
return new CollectionPage(contextPath, String.class, this.permissions, Optional.ofNullable(permissionsNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
public PermissionGrantConditionSet withPermissions(List permissions) {
PermissionGrantConditionSet _x = _copy();
_x.changedFields = changedFields.add("permissions");
_x.odataType = Util.nvl(odataType, "microsoft.graph.permissionGrantConditionSet");
_x.permissions = permissions;
return _x;
}
@Property(name="permissions")
@JsonIgnore
public CollectionPage getPermissions(HttpRequestOptions options) {
return new CollectionPage(contextPath, String.class, this.permissions, Optional.ofNullable(permissionsNextLink), Collections.emptyList(), options);
}
@Property(name="permissionType")
@JsonIgnore
public Optional getPermissionType() {
return Optional.ofNullable(permissionType);
}
public PermissionGrantConditionSet withPermissionType(PermissionType permissionType) {
PermissionGrantConditionSet _x = _copy();
_x.changedFields = changedFields.add("permissionType");
_x.odataType = Util.nvl(odataType, "microsoft.graph.permissionGrantConditionSet");
_x.permissionType = permissionType;
return _x;
}
@Property(name="resourceApplication")
@JsonIgnore
public Optional getResourceApplication() {
return Optional.ofNullable(resourceApplication);
}
public PermissionGrantConditionSet withResourceApplication(String resourceApplication) {
PermissionGrantConditionSet _x = _copy();
_x.changedFields = changedFields.add("resourceApplication");
_x.odataType = Util.nvl(odataType, "microsoft.graph.permissionGrantConditionSet");
_x.resourceApplication = resourceApplication;
return _x;
}
public PermissionGrantConditionSet withUnmappedField(String name, String value) {
PermissionGrantConditionSet _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 PermissionGrantConditionSet patch() {
RequestHelper.patch(this, contextPath, RequestOptions.EMPTY);
PermissionGrantConditionSet _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 PermissionGrantConditionSet put() {
RequestHelper.put(this, contextPath, RequestOptions.EMPTY);
PermissionGrantConditionSet _x = _copy();
_x.changedFields = null;
return _x;
}
private PermissionGrantConditionSet _copy() {
PermissionGrantConditionSet _x = new PermissionGrantConditionSet();
_x.contextPath = contextPath;
_x.changedFields = changedFields;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.id = id;
_x.clientApplicationIds = clientApplicationIds;
_x.clientApplicationPublisherIds = clientApplicationPublisherIds;
_x.clientApplicationsFromVerifiedPublisherOnly = clientApplicationsFromVerifiedPublisherOnly;
_x.clientApplicationTenantIds = clientApplicationTenantIds;
_x.permissionClassification = permissionClassification;
_x.permissions = permissions;
_x.permissionType = permissionType;
_x.resourceApplication = resourceApplication;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("PermissionGrantConditionSet[");
b.append("id=");
b.append(this.id);
b.append(", ");
b.append("clientApplicationIds=");
b.append(this.clientApplicationIds);
b.append(", ");
b.append("clientApplicationPublisherIds=");
b.append(this.clientApplicationPublisherIds);
b.append(", ");
b.append("clientApplicationsFromVerifiedPublisherOnly=");
b.append(this.clientApplicationsFromVerifiedPublisherOnly);
b.append(", ");
b.append("clientApplicationTenantIds=");
b.append(this.clientApplicationTenantIds);
b.append(", ");
b.append("permissionClassification=");
b.append(this.permissionClassification);
b.append(", ");
b.append("permissions=");
b.append(this.permissions);
b.append(", ");
b.append("permissionType=");
b.append(this.permissionType);
b.append(", ");
b.append("resourceApplication=");
b.append(this.resourceApplication);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy