odata.msgraph.client.complex.DefaultUserRolePermissions 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.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.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;
@JsonPropertyOrder({
"@odata.type",
"allowedToCreateApps",
"allowedToCreateSecurityGroups",
"allowedToCreateTenants",
"allowedToReadBitlockerKeysForOwnedDevice",
"allowedToReadOtherUsers",
"permissionGrantPoliciesAssigned"})
@JsonInclude(Include.NON_NULL)
public class DefaultUserRolePermissions implements ODataType {
@JacksonInject
@JsonIgnore
protected ContextPath contextPath;
@JacksonInject
@JsonIgnore
protected UnmappedFieldsImpl unmappedFields;
@JsonProperty("@odata.type")
protected String odataType;
@JsonProperty("allowedToCreateApps")
protected Boolean allowedToCreateApps;
@JsonProperty("allowedToCreateSecurityGroups")
protected Boolean allowedToCreateSecurityGroups;
@JsonProperty("allowedToCreateTenants")
protected Boolean allowedToCreateTenants;
@JsonProperty("allowedToReadBitlockerKeysForOwnedDevice")
protected Boolean allowedToReadBitlockerKeysForOwnedDevice;
@JsonProperty("allowedToReadOtherUsers")
protected Boolean allowedToReadOtherUsers;
@JsonProperty("permissionGrantPoliciesAssigned")
protected List permissionGrantPoliciesAssigned;
@JsonProperty("permissionGrantPoliciesAssigned@nextLink")
protected String permissionGrantPoliciesAssignedNextLink;
protected DefaultUserRolePermissions() {
}
@Override
public String odataTypeName() {
return "microsoft.graph.defaultUserRolePermissions";
}
@Property(name="allowedToCreateApps")
@JsonIgnore
public Optional getAllowedToCreateApps() {
return Optional.ofNullable(allowedToCreateApps);
}
public DefaultUserRolePermissions withAllowedToCreateApps(Boolean allowedToCreateApps) {
DefaultUserRolePermissions _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.defaultUserRolePermissions");
_x.allowedToCreateApps = allowedToCreateApps;
return _x;
}
@Property(name="allowedToCreateSecurityGroups")
@JsonIgnore
public Optional getAllowedToCreateSecurityGroups() {
return Optional.ofNullable(allowedToCreateSecurityGroups);
}
public DefaultUserRolePermissions withAllowedToCreateSecurityGroups(Boolean allowedToCreateSecurityGroups) {
DefaultUserRolePermissions _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.defaultUserRolePermissions");
_x.allowedToCreateSecurityGroups = allowedToCreateSecurityGroups;
return _x;
}
@Property(name="allowedToCreateTenants")
@JsonIgnore
public Optional getAllowedToCreateTenants() {
return Optional.ofNullable(allowedToCreateTenants);
}
public DefaultUserRolePermissions withAllowedToCreateTenants(Boolean allowedToCreateTenants) {
DefaultUserRolePermissions _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.defaultUserRolePermissions");
_x.allowedToCreateTenants = allowedToCreateTenants;
return _x;
}
@Property(name="allowedToReadBitlockerKeysForOwnedDevice")
@JsonIgnore
public Optional getAllowedToReadBitlockerKeysForOwnedDevice() {
return Optional.ofNullable(allowedToReadBitlockerKeysForOwnedDevice);
}
public DefaultUserRolePermissions withAllowedToReadBitlockerKeysForOwnedDevice(Boolean allowedToReadBitlockerKeysForOwnedDevice) {
DefaultUserRolePermissions _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.defaultUserRolePermissions");
_x.allowedToReadBitlockerKeysForOwnedDevice = allowedToReadBitlockerKeysForOwnedDevice;
return _x;
}
@Property(name="allowedToReadOtherUsers")
@JsonIgnore
public Optional getAllowedToReadOtherUsers() {
return Optional.ofNullable(allowedToReadOtherUsers);
}
public DefaultUserRolePermissions withAllowedToReadOtherUsers(Boolean allowedToReadOtherUsers) {
DefaultUserRolePermissions _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.defaultUserRolePermissions");
_x.allowedToReadOtherUsers = allowedToReadOtherUsers;
return _x;
}
@Property(name="permissionGrantPoliciesAssigned")
@JsonIgnore
public CollectionPage getPermissionGrantPoliciesAssigned() {
return new CollectionPage(contextPath, String.class, this.permissionGrantPoliciesAssigned, Optional.ofNullable(permissionGrantPoliciesAssignedNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
@Property(name="permissionGrantPoliciesAssigned")
@JsonIgnore
public CollectionPage getPermissionGrantPoliciesAssigned(HttpRequestOptions options) {
return new CollectionPage(contextPath, String.class, this.permissionGrantPoliciesAssigned, Optional.ofNullable(permissionGrantPoliciesAssignedNextLink), Collections.emptyList(), options);
}
public DefaultUserRolePermissions withUnmappedField(String name, Object value) {
DefaultUserRolePermissions _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 Boolean allowedToCreateApps;
private Boolean allowedToCreateSecurityGroups;
private Boolean allowedToCreateTenants;
private Boolean allowedToReadBitlockerKeysForOwnedDevice;
private Boolean allowedToReadOtherUsers;
private List permissionGrantPoliciesAssigned;
private String permissionGrantPoliciesAssignedNextLink;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder allowedToCreateApps(Boolean allowedToCreateApps) {
this.allowedToCreateApps = allowedToCreateApps;
this.changedFields = changedFields.add("allowedToCreateApps");
return this;
}
public Builder allowedToCreateSecurityGroups(Boolean allowedToCreateSecurityGroups) {
this.allowedToCreateSecurityGroups = allowedToCreateSecurityGroups;
this.changedFields = changedFields.add("allowedToCreateSecurityGroups");
return this;
}
public Builder allowedToCreateTenants(Boolean allowedToCreateTenants) {
this.allowedToCreateTenants = allowedToCreateTenants;
this.changedFields = changedFields.add("allowedToCreateTenants");
return this;
}
public Builder allowedToReadBitlockerKeysForOwnedDevice(Boolean allowedToReadBitlockerKeysForOwnedDevice) {
this.allowedToReadBitlockerKeysForOwnedDevice = allowedToReadBitlockerKeysForOwnedDevice;
this.changedFields = changedFields.add("allowedToReadBitlockerKeysForOwnedDevice");
return this;
}
public Builder allowedToReadOtherUsers(Boolean allowedToReadOtherUsers) {
this.allowedToReadOtherUsers = allowedToReadOtherUsers;
this.changedFields = changedFields.add("allowedToReadOtherUsers");
return this;
}
public Builder permissionGrantPoliciesAssigned(List permissionGrantPoliciesAssigned) {
this.permissionGrantPoliciesAssigned = permissionGrantPoliciesAssigned;
this.changedFields = changedFields.add("permissionGrantPoliciesAssigned");
return this;
}
public Builder permissionGrantPoliciesAssigned(String... permissionGrantPoliciesAssigned) {
return permissionGrantPoliciesAssigned(Arrays.asList(permissionGrantPoliciesAssigned));
}
public Builder permissionGrantPoliciesAssignedNextLink(String permissionGrantPoliciesAssignedNextLink) {
this.permissionGrantPoliciesAssignedNextLink = permissionGrantPoliciesAssignedNextLink;
this.changedFields = changedFields.add("permissionGrantPoliciesAssigned");
return this;
}
public DefaultUserRolePermissions build() {
DefaultUserRolePermissions _x = new DefaultUserRolePermissions();
_x.contextPath = null;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.defaultUserRolePermissions";
_x.allowedToCreateApps = allowedToCreateApps;
_x.allowedToCreateSecurityGroups = allowedToCreateSecurityGroups;
_x.allowedToCreateTenants = allowedToCreateTenants;
_x.allowedToReadBitlockerKeysForOwnedDevice = allowedToReadBitlockerKeysForOwnedDevice;
_x.allowedToReadOtherUsers = allowedToReadOtherUsers;
_x.permissionGrantPoliciesAssigned = permissionGrantPoliciesAssigned;
_x.permissionGrantPoliciesAssignedNextLink = permissionGrantPoliciesAssignedNextLink;
return _x;
}
}
private DefaultUserRolePermissions _copy() {
DefaultUserRolePermissions _x = new DefaultUserRolePermissions();
_x.contextPath = contextPath;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.allowedToCreateApps = allowedToCreateApps;
_x.allowedToCreateSecurityGroups = allowedToCreateSecurityGroups;
_x.allowedToCreateTenants = allowedToCreateTenants;
_x.allowedToReadBitlockerKeysForOwnedDevice = allowedToReadBitlockerKeysForOwnedDevice;
_x.allowedToReadOtherUsers = allowedToReadOtherUsers;
_x.permissionGrantPoliciesAssigned = permissionGrantPoliciesAssigned;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("DefaultUserRolePermissions[");
b.append("allowedToCreateApps=");
b.append(this.allowedToCreateApps);
b.append(", ");
b.append("allowedToCreateSecurityGroups=");
b.append(this.allowedToCreateSecurityGroups);
b.append(", ");
b.append("allowedToCreateTenants=");
b.append(this.allowedToCreateTenants);
b.append(", ");
b.append("allowedToReadBitlockerKeysForOwnedDevice=");
b.append(this.allowedToReadBitlockerKeysForOwnedDevice);
b.append(", ");
b.append("allowedToReadOtherUsers=");
b.append(this.allowedToReadOtherUsers);
b.append(", ");
b.append("permissionGrantPoliciesAssigned=");
b.append(this.permissionGrantPoliciesAssigned);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy