odata.msgraph.client.beta.entity.DeviceManagementPartner Maven / Gradle / Ivy
Show all versions of odata-client-msgraph-beta Show documentation
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.time.OffsetDateTime;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import odata.msgraph.client.beta.complex.DeviceManagementPartnerAssignment;
import odata.msgraph.client.beta.enums.DeviceManagementPartnerAppType;
import odata.msgraph.client.beta.enums.DeviceManagementPartnerTenantState;
/**
* “Entity which represents a connection to device management partner.”
*/@JsonPropertyOrder({
"@odata.type",
"displayName",
"groupsRequiringPartnerEnrollment",
"isConfigured",
"lastHeartbeatDateTime",
"partnerAppType",
"partnerState",
"singleTenantAppId",
"whenPartnerDevicesWillBeMarkedAsNonCompliant",
"whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime",
"whenPartnerDevicesWillBeRemoved",
"whenPartnerDevicesWillBeRemovedDateTime"})
@JsonInclude(Include.NON_NULL)
public class DeviceManagementPartner extends Entity implements ODataEntityType {
@Override
public String odataTypeName() {
return "microsoft.graph.deviceManagementPartner";
}
@JsonProperty("displayName")
protected String displayName;
@JsonProperty("groupsRequiringPartnerEnrollment")
protected List groupsRequiringPartnerEnrollment;
@JsonProperty("groupsRequiringPartnerEnrollment@nextLink")
protected String groupsRequiringPartnerEnrollmentNextLink;
@JsonProperty("isConfigured")
protected Boolean isConfigured;
@JsonProperty("lastHeartbeatDateTime")
protected OffsetDateTime lastHeartbeatDateTime;
@JsonProperty("partnerAppType")
protected DeviceManagementPartnerAppType partnerAppType;
@JsonProperty("partnerState")
protected DeviceManagementPartnerTenantState partnerState;
@JsonProperty("singleTenantAppId")
protected String singleTenantAppId;
@JsonProperty("whenPartnerDevicesWillBeMarkedAsNonCompliant")
protected OffsetDateTime whenPartnerDevicesWillBeMarkedAsNonCompliant;
@JsonProperty("whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime")
protected OffsetDateTime whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime;
@JsonProperty("whenPartnerDevicesWillBeRemoved")
protected OffsetDateTime whenPartnerDevicesWillBeRemoved;
@JsonProperty("whenPartnerDevicesWillBeRemovedDateTime")
protected OffsetDateTime whenPartnerDevicesWillBeRemovedDateTime;
protected DeviceManagementPartner() {
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 builderDeviceManagementPartner() {
return new Builder();
}
public static final class Builder {
private String id;
private String displayName;
private List groupsRequiringPartnerEnrollment;
private String groupsRequiringPartnerEnrollmentNextLink;
private Boolean isConfigured;
private OffsetDateTime lastHeartbeatDateTime;
private DeviceManagementPartnerAppType partnerAppType;
private DeviceManagementPartnerTenantState partnerState;
private String singleTenantAppId;
private OffsetDateTime whenPartnerDevicesWillBeMarkedAsNonCompliant;
private OffsetDateTime whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime;
private OffsetDateTime whenPartnerDevicesWillBeRemoved;
private OffsetDateTime whenPartnerDevicesWillBeRemovedDateTime;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder id(String id) {
this.id = id;
this.changedFields = changedFields.add("id");
return this;
}
/**
* “Partner display name”
*
* @param displayName
* value of {@code displayName} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder displayName(String displayName) {
this.displayName = displayName;
this.changedFields = changedFields.add("displayName");
return this;
}
/**
* “User groups that specifies whether enrollment is through partner.”
*
* @param groupsRequiringPartnerEnrollment
* value of {@code groupsRequiringPartnerEnrollment} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder groupsRequiringPartnerEnrollment(List groupsRequiringPartnerEnrollment) {
this.groupsRequiringPartnerEnrollment = groupsRequiringPartnerEnrollment;
this.changedFields = changedFields.add("groupsRequiringPartnerEnrollment");
return this;
}
/**
* “User groups that specifies whether enrollment is through partner.”
*
* @param groupsRequiringPartnerEnrollment
* value of {@code groupsRequiringPartnerEnrollment} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder groupsRequiringPartnerEnrollment(DeviceManagementPartnerAssignment... groupsRequiringPartnerEnrollment) {
return groupsRequiringPartnerEnrollment(Arrays.asList(groupsRequiringPartnerEnrollment));
}
/**
* “User groups that specifies whether enrollment is through partner.”
*
* @param groupsRequiringPartnerEnrollmentNextLink
* value of {@code groupsRequiringPartnerEnrollment@nextLink} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder groupsRequiringPartnerEnrollmentNextLink(String groupsRequiringPartnerEnrollmentNextLink) {
this.groupsRequiringPartnerEnrollmentNextLink = groupsRequiringPartnerEnrollmentNextLink;
this.changedFields = changedFields.add("groupsRequiringPartnerEnrollment");
return this;
}
/**
* “Whether device management partner is configured or not”
*
* @param isConfigured
* value of {@code isConfigured} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder isConfigured(Boolean isConfigured) {
this.isConfigured = isConfigured;
this.changedFields = changedFields.add("isConfigured");
return this;
}
/**
* “Timestamp of last heartbeat after admin enabled option Connect to Device
* management Partner”
*
* @param lastHeartbeatDateTime
* value of {@code lastHeartbeatDateTime} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder lastHeartbeatDateTime(OffsetDateTime lastHeartbeatDateTime) {
this.lastHeartbeatDateTime = lastHeartbeatDateTime;
this.changedFields = changedFields.add("lastHeartbeatDateTime");
return this;
}
/**
* “Partner App type”
*
* @param partnerAppType
* value of {@code partnerAppType} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder partnerAppType(DeviceManagementPartnerAppType partnerAppType) {
this.partnerAppType = partnerAppType;
this.changedFields = changedFields.add("partnerAppType");
return this;
}
/**
* “Partner state of this tenant”
*
* @param partnerState
* value of {@code partnerState} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder partnerState(DeviceManagementPartnerTenantState partnerState) {
this.partnerState = partnerState;
this.changedFields = changedFields.add("partnerState");
return this;
}
/**
* “Partner Single tenant App id”
*
* @param singleTenantAppId
* value of {@code singleTenantAppId} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder singleTenantAppId(String singleTenantAppId) {
this.singleTenantAppId = singleTenantAppId;
this.changedFields = changedFields.add("singleTenantAppId");
return this;
}
/**
* “DateTime in UTC when PartnerDevices will be marked as NonCompliant. This will
* become obselete soon.”
*
* @param whenPartnerDevicesWillBeMarkedAsNonCompliant
* value of {@code whenPartnerDevicesWillBeMarkedAsNonCompliant} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder whenPartnerDevicesWillBeMarkedAsNonCompliant(OffsetDateTime whenPartnerDevicesWillBeMarkedAsNonCompliant) {
this.whenPartnerDevicesWillBeMarkedAsNonCompliant = whenPartnerDevicesWillBeMarkedAsNonCompliant;
this.changedFields = changedFields.add("whenPartnerDevicesWillBeMarkedAsNonCompliant");
return this;
}
/**
* “DateTime in UTC when PartnerDevices will be marked as NonCompliant”
*
* @param whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime
* value of {@code whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime(OffsetDateTime whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime) {
this.whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime = whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime;
this.changedFields = changedFields.add("whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime");
return this;
}
/**
* “DateTime in UTC when PartnerDevices will be removed. This will become obselete
* soon.”
*
* @param whenPartnerDevicesWillBeRemoved
* value of {@code whenPartnerDevicesWillBeRemoved} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder whenPartnerDevicesWillBeRemoved(OffsetDateTime whenPartnerDevicesWillBeRemoved) {
this.whenPartnerDevicesWillBeRemoved = whenPartnerDevicesWillBeRemoved;
this.changedFields = changedFields.add("whenPartnerDevicesWillBeRemoved");
return this;
}
/**
* “DateTime in UTC when PartnerDevices will be removed”
*
* @param whenPartnerDevicesWillBeRemovedDateTime
* value of {@code whenPartnerDevicesWillBeRemovedDateTime} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder whenPartnerDevicesWillBeRemovedDateTime(OffsetDateTime whenPartnerDevicesWillBeRemovedDateTime) {
this.whenPartnerDevicesWillBeRemovedDateTime = whenPartnerDevicesWillBeRemovedDateTime;
this.changedFields = changedFields.add("whenPartnerDevicesWillBeRemovedDateTime");
return this;
}
public DeviceManagementPartner build() {
DeviceManagementPartner _x = new DeviceManagementPartner();
_x.contextPath = null;
_x.changedFields = changedFields;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.deviceManagementPartner";
_x.id = id;
_x.displayName = displayName;
_x.groupsRequiringPartnerEnrollment = groupsRequiringPartnerEnrollment;
_x.groupsRequiringPartnerEnrollmentNextLink = groupsRequiringPartnerEnrollmentNextLink;
_x.isConfigured = isConfigured;
_x.lastHeartbeatDateTime = lastHeartbeatDateTime;
_x.partnerAppType = partnerAppType;
_x.partnerState = partnerState;
_x.singleTenantAppId = singleTenantAppId;
_x.whenPartnerDevicesWillBeMarkedAsNonCompliant = whenPartnerDevicesWillBeMarkedAsNonCompliant;
_x.whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime = whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime;
_x.whenPartnerDevicesWillBeRemoved = whenPartnerDevicesWillBeRemoved;
_x.whenPartnerDevicesWillBeRemovedDateTime = whenPartnerDevicesWillBeRemovedDateTime;
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()));
}
}
/**
* “Partner display name”
*
* @return property displayName
*/
@Property(name="displayName")
@JsonIgnore
public Optional getDisplayName() {
return Optional.ofNullable(displayName);
}
/**
* Returns an immutable copy of {@code this} with just the {@code displayName}
* field changed. Field description below. The field name is also added to an
* internal map of changed fields in the returned object so that when {@code this.
* patch()} is called (if available)on the returned object only the changed fields
* are submitted.
*
* “Partner display name”
*
* @param displayName
* new value of {@code displayName} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code displayName} field changed
*/
public DeviceManagementPartner withDisplayName(String displayName) {
DeviceManagementPartner _x = _copy();
_x.changedFields = changedFields.add("displayName");
_x.odataType = Util.nvl(odataType, "microsoft.graph.deviceManagementPartner");
_x.displayName = displayName;
return _x;
}
/**
* “User groups that specifies whether enrollment is through partner.”
*
* @return property groupsRequiringPartnerEnrollment
*/
@Property(name="groupsRequiringPartnerEnrollment")
@JsonIgnore
public CollectionPage getGroupsRequiringPartnerEnrollment() {
return new CollectionPage(contextPath, DeviceManagementPartnerAssignment.class, this.groupsRequiringPartnerEnrollment, Optional.ofNullable(groupsRequiringPartnerEnrollmentNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* groupsRequiringPartnerEnrollment} field changed. Field description below. The
* field name is also added to an internal map of changed fields in the returned
* object so that when {@code this.patch()} is called (if available)on the returned
* object only the changed fields are submitted.
*
* “User groups that specifies whether enrollment is through partner.”
*
* @param groupsRequiringPartnerEnrollment
* new value of {@code groupsRequiringPartnerEnrollment} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code groupsRequiringPartnerEnrollment} field changed
*/
public DeviceManagementPartner withGroupsRequiringPartnerEnrollment(List groupsRequiringPartnerEnrollment) {
DeviceManagementPartner _x = _copy();
_x.changedFields = changedFields.add("groupsRequiringPartnerEnrollment");
_x.odataType = Util.nvl(odataType, "microsoft.graph.deviceManagementPartner");
_x.groupsRequiringPartnerEnrollment = groupsRequiringPartnerEnrollment;
return _x;
}
/**
* “User groups that specifies whether enrollment is through partner.”
*
* @param options
* specify connect and read timeouts
* @return property groupsRequiringPartnerEnrollment
*/
@Property(name="groupsRequiringPartnerEnrollment")
@JsonIgnore
public CollectionPage getGroupsRequiringPartnerEnrollment(HttpRequestOptions options) {
return new CollectionPage(contextPath, DeviceManagementPartnerAssignment.class, this.groupsRequiringPartnerEnrollment, Optional.ofNullable(groupsRequiringPartnerEnrollmentNextLink), Collections.emptyList(), options);
}
/**
* “Whether device management partner is configured or not”
*
* @return property isConfigured
*/
@Property(name="isConfigured")
@JsonIgnore
public Optional getIsConfigured() {
return Optional.ofNullable(isConfigured);
}
/**
* Returns an immutable copy of {@code this} with just the {@code isConfigured}
* field changed. Field description below. The field name is also added to an
* internal map of changed fields in the returned object so that when {@code this.
* patch()} is called (if available)on the returned object only the changed fields
* are submitted.
*
* “Whether device management partner is configured or not”
*
* @param isConfigured
* new value of {@code isConfigured} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code isConfigured} field changed
*/
public DeviceManagementPartner withIsConfigured(Boolean isConfigured) {
DeviceManagementPartner _x = _copy();
_x.changedFields = changedFields.add("isConfigured");
_x.odataType = Util.nvl(odataType, "microsoft.graph.deviceManagementPartner");
_x.isConfigured = isConfigured;
return _x;
}
/**
* “Timestamp of last heartbeat after admin enabled option Connect to Device
* management Partner”
*
* @return property lastHeartbeatDateTime
*/
@Property(name="lastHeartbeatDateTime")
@JsonIgnore
public Optional getLastHeartbeatDateTime() {
return Optional.ofNullable(lastHeartbeatDateTime);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* lastHeartbeatDateTime} field changed. Field description below. The field name is
* also added to an internal map of changed fields in the returned object so that
* when {@code this.patch()} is called (if available)on the returned object only
* the changed fields are submitted.
*
* “Timestamp of last heartbeat after admin enabled option Connect to Device
* management Partner”
*
* @param lastHeartbeatDateTime
* new value of {@code lastHeartbeatDateTime} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code lastHeartbeatDateTime} field changed
*/
public DeviceManagementPartner withLastHeartbeatDateTime(OffsetDateTime lastHeartbeatDateTime) {
DeviceManagementPartner _x = _copy();
_x.changedFields = changedFields.add("lastHeartbeatDateTime");
_x.odataType = Util.nvl(odataType, "microsoft.graph.deviceManagementPartner");
_x.lastHeartbeatDateTime = lastHeartbeatDateTime;
return _x;
}
/**
* “Partner App type”
*
* @return property partnerAppType
*/
@Property(name="partnerAppType")
@JsonIgnore
public Optional getPartnerAppType() {
return Optional.ofNullable(partnerAppType);
}
/**
* Returns an immutable copy of {@code this} with just the {@code partnerAppType}
* field changed. Field description below. The field name is also added to an
* internal map of changed fields in the returned object so that when {@code this.
* patch()} is called (if available)on the returned object only the changed fields
* are submitted.
*
* “Partner App type”
*
* @param partnerAppType
* new value of {@code partnerAppType} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code partnerAppType} field changed
*/
public DeviceManagementPartner withPartnerAppType(DeviceManagementPartnerAppType partnerAppType) {
DeviceManagementPartner _x = _copy();
_x.changedFields = changedFields.add("partnerAppType");
_x.odataType = Util.nvl(odataType, "microsoft.graph.deviceManagementPartner");
_x.partnerAppType = partnerAppType;
return _x;
}
/**
* “Partner state of this tenant”
*
* @return property partnerState
*/
@Property(name="partnerState")
@JsonIgnore
public Optional getPartnerState() {
return Optional.ofNullable(partnerState);
}
/**
* Returns an immutable copy of {@code this} with just the {@code partnerState}
* field changed. Field description below. The field name is also added to an
* internal map of changed fields in the returned object so that when {@code this.
* patch()} is called (if available)on the returned object only the changed fields
* are submitted.
*
* “Partner state of this tenant”
*
* @param partnerState
* new value of {@code partnerState} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code partnerState} field changed
*/
public DeviceManagementPartner withPartnerState(DeviceManagementPartnerTenantState partnerState) {
DeviceManagementPartner _x = _copy();
_x.changedFields = changedFields.add("partnerState");
_x.odataType = Util.nvl(odataType, "microsoft.graph.deviceManagementPartner");
_x.partnerState = partnerState;
return _x;
}
/**
* “Partner Single tenant App id”
*
* @return property singleTenantAppId
*/
@Property(name="singleTenantAppId")
@JsonIgnore
public Optional getSingleTenantAppId() {
return Optional.ofNullable(singleTenantAppId);
}
/**
* Returns an immutable copy of {@code this} with just the {@code singleTenantAppId
* } field changed. Field description below. The field name is also added to an
* internal map of changed fields in the returned object so that when {@code this.
* patch()} is called (if available)on the returned object only the changed fields
* are submitted.
*
* “Partner Single tenant App id”
*
* @param singleTenantAppId
* new value of {@code singleTenantAppId} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code singleTenantAppId} field changed
*/
public DeviceManagementPartner withSingleTenantAppId(String singleTenantAppId) {
DeviceManagementPartner _x = _copy();
_x.changedFields = changedFields.add("singleTenantAppId");
_x.odataType = Util.nvl(odataType, "microsoft.graph.deviceManagementPartner");
_x.singleTenantAppId = singleTenantAppId;
return _x;
}
/**
* “DateTime in UTC when PartnerDevices will be marked as NonCompliant. This will
* become obselete soon.”
*
* @return property whenPartnerDevicesWillBeMarkedAsNonCompliant
*/
@Property(name="whenPartnerDevicesWillBeMarkedAsNonCompliant")
@JsonIgnore
public Optional getWhenPartnerDevicesWillBeMarkedAsNonCompliant() {
return Optional.ofNullable(whenPartnerDevicesWillBeMarkedAsNonCompliant);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* whenPartnerDevicesWillBeMarkedAsNonCompliant} field changed. Field description
* below. The field name is also added to an internal map of changed fields in the
* returned object so that when {@code this.patch()} is called (if available)on the
* returned object only the changed fields are submitted.
*
* “DateTime in UTC when PartnerDevices will be marked as NonCompliant. This will
* become obselete soon.”
*
* @param whenPartnerDevicesWillBeMarkedAsNonCompliant
* new value of {@code whenPartnerDevicesWillBeMarkedAsNonCompliant} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code whenPartnerDevicesWillBeMarkedAsNonCompliant} field changed
*/
public DeviceManagementPartner withWhenPartnerDevicesWillBeMarkedAsNonCompliant(OffsetDateTime whenPartnerDevicesWillBeMarkedAsNonCompliant) {
DeviceManagementPartner _x = _copy();
_x.changedFields = changedFields.add("whenPartnerDevicesWillBeMarkedAsNonCompliant");
_x.odataType = Util.nvl(odataType, "microsoft.graph.deviceManagementPartner");
_x.whenPartnerDevicesWillBeMarkedAsNonCompliant = whenPartnerDevicesWillBeMarkedAsNonCompliant;
return _x;
}
/**
* “DateTime in UTC when PartnerDevices will be marked as NonCompliant”
*
* @return property whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime
*/
@Property(name="whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime")
@JsonIgnore
public Optional getWhenPartnerDevicesWillBeMarkedAsNonCompliantDateTime() {
return Optional.ofNullable(whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime} field changed. Field
* description below. The field name is also added to an internal map of changed
* fields in the returned object so that when {@code this.patch()} is called (if
* available)on the returned object only the changed fields are submitted.
*
* “DateTime in UTC when PartnerDevices will be marked as NonCompliant”
*
* @param whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime
* new value of {@code whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime} field changed
*/
public DeviceManagementPartner withWhenPartnerDevicesWillBeMarkedAsNonCompliantDateTime(OffsetDateTime whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime) {
DeviceManagementPartner _x = _copy();
_x.changedFields = changedFields.add("whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime");
_x.odataType = Util.nvl(odataType, "microsoft.graph.deviceManagementPartner");
_x.whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime = whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime;
return _x;
}
/**
* “DateTime in UTC when PartnerDevices will be removed. This will become obselete
* soon.”
*
* @return property whenPartnerDevicesWillBeRemoved
*/
@Property(name="whenPartnerDevicesWillBeRemoved")
@JsonIgnore
public Optional getWhenPartnerDevicesWillBeRemoved() {
return Optional.ofNullable(whenPartnerDevicesWillBeRemoved);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* whenPartnerDevicesWillBeRemoved} field changed. Field description below. The
* field name is also added to an internal map of changed fields in the returned
* object so that when {@code this.patch()} is called (if available)on the returned
* object only the changed fields are submitted.
*
* “DateTime in UTC when PartnerDevices will be removed. This will become obselete
* soon.”
*
* @param whenPartnerDevicesWillBeRemoved
* new value of {@code whenPartnerDevicesWillBeRemoved} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code whenPartnerDevicesWillBeRemoved} field changed
*/
public DeviceManagementPartner withWhenPartnerDevicesWillBeRemoved(OffsetDateTime whenPartnerDevicesWillBeRemoved) {
DeviceManagementPartner _x = _copy();
_x.changedFields = changedFields.add("whenPartnerDevicesWillBeRemoved");
_x.odataType = Util.nvl(odataType, "microsoft.graph.deviceManagementPartner");
_x.whenPartnerDevicesWillBeRemoved = whenPartnerDevicesWillBeRemoved;
return _x;
}
/**
* “DateTime in UTC when PartnerDevices will be removed”
*
* @return property whenPartnerDevicesWillBeRemovedDateTime
*/
@Property(name="whenPartnerDevicesWillBeRemovedDateTime")
@JsonIgnore
public Optional getWhenPartnerDevicesWillBeRemovedDateTime() {
return Optional.ofNullable(whenPartnerDevicesWillBeRemovedDateTime);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* whenPartnerDevicesWillBeRemovedDateTime} field changed. Field description below.
* The field name is also added to an internal map of changed fields in the
* returned object so that when {@code this.patch()} is called (if available)on the
* returned object only the changed fields are submitted.
*
* “DateTime in UTC when PartnerDevices will be removed”
*
* @param whenPartnerDevicesWillBeRemovedDateTime
* new value of {@code whenPartnerDevicesWillBeRemovedDateTime} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code whenPartnerDevicesWillBeRemovedDateTime} field changed
*/
public DeviceManagementPartner withWhenPartnerDevicesWillBeRemovedDateTime(OffsetDateTime whenPartnerDevicesWillBeRemovedDateTime) {
DeviceManagementPartner _x = _copy();
_x.changedFields = changedFields.add("whenPartnerDevicesWillBeRemovedDateTime");
_x.odataType = Util.nvl(odataType, "microsoft.graph.deviceManagementPartner");
_x.whenPartnerDevicesWillBeRemovedDateTime = whenPartnerDevicesWillBeRemovedDateTime;
return _x;
}
public DeviceManagementPartner withUnmappedField(String name, String value) {
DeviceManagementPartner _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 DeviceManagementPartner patch() {
RequestHelper.patch(this, contextPath, RequestOptions.EMPTY);
DeviceManagementPartner _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 DeviceManagementPartner put() {
RequestHelper.put(this, contextPath, RequestOptions.EMPTY);
DeviceManagementPartner _x = _copy();
_x.changedFields = null;
return _x;
}
private DeviceManagementPartner _copy() {
DeviceManagementPartner _x = new DeviceManagementPartner();
_x.contextPath = contextPath;
_x.changedFields = changedFields;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.id = id;
_x.displayName = displayName;
_x.groupsRequiringPartnerEnrollment = groupsRequiringPartnerEnrollment;
_x.isConfigured = isConfigured;
_x.lastHeartbeatDateTime = lastHeartbeatDateTime;
_x.partnerAppType = partnerAppType;
_x.partnerState = partnerState;
_x.singleTenantAppId = singleTenantAppId;
_x.whenPartnerDevicesWillBeMarkedAsNonCompliant = whenPartnerDevicesWillBeMarkedAsNonCompliant;
_x.whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime = whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime;
_x.whenPartnerDevicesWillBeRemoved = whenPartnerDevicesWillBeRemoved;
_x.whenPartnerDevicesWillBeRemovedDateTime = whenPartnerDevicesWillBeRemovedDateTime;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("DeviceManagementPartner[");
b.append("id=");
b.append(this.id);
b.append(", ");
b.append("displayName=");
b.append(this.displayName);
b.append(", ");
b.append("groupsRequiringPartnerEnrollment=");
b.append(this.groupsRequiringPartnerEnrollment);
b.append(", ");
b.append("isConfigured=");
b.append(this.isConfigured);
b.append(", ");
b.append("lastHeartbeatDateTime=");
b.append(this.lastHeartbeatDateTime);
b.append(", ");
b.append("partnerAppType=");
b.append(this.partnerAppType);
b.append(", ");
b.append("partnerState=");
b.append(this.partnerState);
b.append(", ");
b.append("singleTenantAppId=");
b.append(this.singleTenantAppId);
b.append(", ");
b.append("whenPartnerDevicesWillBeMarkedAsNonCompliant=");
b.append(this.whenPartnerDevicesWillBeMarkedAsNonCompliant);
b.append(", ");
b.append("whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime=");
b.append(this.whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime);
b.append(", ");
b.append("whenPartnerDevicesWillBeRemoved=");
b.append(this.whenPartnerDevicesWillBeRemoved);
b.append(", ");
b.append("whenPartnerDevicesWillBeRemovedDateTime=");
b.append(this.whenPartnerDevicesWillBeRemovedDateTime);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}