odata.msgraph.client.beta.complex.PasswordCredential 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.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.ContextPath;
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.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.time.OffsetDateTime;
import java.util.Optional;
@JsonPropertyOrder({
"@odata.type",
"customKeyIdentifier",
"displayName",
"endDateTime",
"hint",
"keyId",
"secretText",
"startDateTime"})
@JsonInclude(Include.NON_NULL)
public class PasswordCredential implements ODataType {
@JacksonInject
@JsonIgnore
protected ContextPath contextPath;
@JacksonInject
@JsonIgnore
protected UnmappedFieldsImpl unmappedFields;
@JsonProperty("@odata.type")
protected String odataType;
@JsonProperty("customKeyIdentifier")
protected byte[] customKeyIdentifier;
@JsonProperty("displayName")
protected String displayName;
@JsonProperty("endDateTime")
protected OffsetDateTime endDateTime;
@JsonProperty("hint")
protected String hint;
@JsonProperty("keyId")
protected String keyId;
@JsonProperty("secretText")
protected String secretText;
@JsonProperty("startDateTime")
protected OffsetDateTime startDateTime;
protected PasswordCredential() {
}
@Override
public String odataTypeName() {
return "microsoft.graph.passwordCredential";
}
@Property(name="customKeyIdentifier")
@JsonIgnore
public Optional getCustomKeyIdentifier() {
return Optional.ofNullable(customKeyIdentifier);
}
public PasswordCredential withCustomKeyIdentifier(byte[] customKeyIdentifier) {
PasswordCredential _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.passwordCredential");
_x.customKeyIdentifier = customKeyIdentifier;
return _x;
}
@Property(name="displayName")
@JsonIgnore
public Optional getDisplayName() {
return Optional.ofNullable(displayName);
}
public PasswordCredential withDisplayName(String displayName) {
PasswordCredential _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.passwordCredential");
_x.displayName = displayName;
return _x;
}
@Property(name="endDateTime")
@JsonIgnore
public Optional getEndDateTime() {
return Optional.ofNullable(endDateTime);
}
public PasswordCredential withEndDateTime(OffsetDateTime endDateTime) {
PasswordCredential _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.passwordCredential");
_x.endDateTime = endDateTime;
return _x;
}
@Property(name="hint")
@JsonIgnore
public Optional getHint() {
return Optional.ofNullable(hint);
}
public PasswordCredential withHint(String hint) {
PasswordCredential _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.passwordCredential");
_x.hint = hint;
return _x;
}
@Property(name="keyId")
@JsonIgnore
public Optional getKeyId() {
return Optional.ofNullable(keyId);
}
public PasswordCredential withKeyId(String keyId) {
PasswordCredential _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.passwordCredential");
_x.keyId = keyId;
return _x;
}
@Property(name="secretText")
@JsonIgnore
public Optional getSecretText() {
return Optional.ofNullable(secretText);
}
public PasswordCredential withSecretText(String secretText) {
PasswordCredential _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.passwordCredential");
_x.secretText = secretText;
return _x;
}
@Property(name="startDateTime")
@JsonIgnore
public Optional getStartDateTime() {
return Optional.ofNullable(startDateTime);
}
public PasswordCredential withStartDateTime(OffsetDateTime startDateTime) {
PasswordCredential _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.passwordCredential");
_x.startDateTime = startDateTime;
return _x;
}
public PasswordCredential withUnmappedField(String name, String value) {
PasswordCredential _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 byte[] customKeyIdentifier;
private String displayName;
private OffsetDateTime endDateTime;
private String hint;
private String keyId;
private String secretText;
private OffsetDateTime startDateTime;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder customKeyIdentifier(byte[] customKeyIdentifier) {
this.customKeyIdentifier = customKeyIdentifier;
this.changedFields = changedFields.add("customKeyIdentifier");
return this;
}
public Builder displayName(String displayName) {
this.displayName = displayName;
this.changedFields = changedFields.add("displayName");
return this;
}
public Builder endDateTime(OffsetDateTime endDateTime) {
this.endDateTime = endDateTime;
this.changedFields = changedFields.add("endDateTime");
return this;
}
public Builder hint(String hint) {
this.hint = hint;
this.changedFields = changedFields.add("hint");
return this;
}
public Builder keyId(String keyId) {
this.keyId = keyId;
this.changedFields = changedFields.add("keyId");
return this;
}
public Builder secretText(String secretText) {
this.secretText = secretText;
this.changedFields = changedFields.add("secretText");
return this;
}
public Builder startDateTime(OffsetDateTime startDateTime) {
this.startDateTime = startDateTime;
this.changedFields = changedFields.add("startDateTime");
return this;
}
public PasswordCredential build() {
PasswordCredential _x = new PasswordCredential();
_x.contextPath = null;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.passwordCredential";
_x.customKeyIdentifier = customKeyIdentifier;
_x.displayName = displayName;
_x.endDateTime = endDateTime;
_x.hint = hint;
_x.keyId = keyId;
_x.secretText = secretText;
_x.startDateTime = startDateTime;
return _x;
}
}
private PasswordCredential _copy() {
PasswordCredential _x = new PasswordCredential();
_x.contextPath = contextPath;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.customKeyIdentifier = customKeyIdentifier;
_x.displayName = displayName;
_x.endDateTime = endDateTime;
_x.hint = hint;
_x.keyId = keyId;
_x.secretText = secretText;
_x.startDateTime = startDateTime;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("PasswordCredential[");
b.append("customKeyIdentifier=");
b.append(this.customKeyIdentifier);
b.append(", ");
b.append("displayName=");
b.append(this.displayName);
b.append(", ");
b.append("endDateTime=");
b.append(this.endDateTime);
b.append(", ");
b.append("hint=");
b.append(this.hint);
b.append(", ");
b.append("keyId=");
b.append(this.keyId);
b.append(", ");
b.append("secretText=");
b.append(this.secretText);
b.append(", ");
b.append("startDateTime=");
b.append(this.startDateTime);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy