All Downloads are FREE. Search and download functionalities are using the official Maven repository.

odata.msgraph.client.complex.AuditActor Maven / Gradle / Ivy

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.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;


/**
 * “A class containing the properties for Audit Actor.”
 */@JsonPropertyOrder({
    "@odata.type", 
    "applicationDisplayName", 
    "applicationId", 
    "auditActorType", 
    "ipAddress", 
    "servicePrincipalName", 
    "userId", 
    "userPermissions", 
    "userPrincipalName"})
@JsonInclude(Include.NON_NULL)
public class AuditActor implements ODataType {

    @JacksonInject
    @JsonIgnore
    protected ContextPath contextPath;

    @JacksonInject
    @JsonIgnore
    protected UnmappedFieldsImpl unmappedFields;

    @JsonProperty("@odata.type")
    protected String odataType;

    @JsonProperty("applicationDisplayName")
    protected String applicationDisplayName;

    @JsonProperty("applicationId")
    protected String applicationId;

    @JsonProperty("auditActorType")
    protected String auditActorType;

    @JsonProperty("ipAddress")
    protected String ipAddress;

    @JsonProperty("servicePrincipalName")
    protected String servicePrincipalName;

    @JsonProperty("userId")
    protected String userId;

    @JsonProperty("userPermissions")
    protected List userPermissions;

    @JsonProperty("userPermissions@nextLink")
    protected String userPermissionsNextLink;

    @JsonProperty("userPrincipalName")
    protected String userPrincipalName;

    protected AuditActor() {
    }

    @Override
    public String odataTypeName() {
        return "microsoft.graph.auditActor";
    }

    /**
     * “Name of the Application.”
     * 
     * @return property applicationDisplayName
     */
    @Property(name="applicationDisplayName")
    @JsonIgnore
    public Optional getApplicationDisplayName() {
        return Optional.ofNullable(applicationDisplayName);
    }

    /**
     * Returns an immutable copy of {@code this} with just the {@code
     * applicationDisplayName} 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.
     * 

* “Name of the Application.” * * @param applicationDisplayName * new value of {@code applicationDisplayName} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code applicationDisplayName} field changed */ public AuditActor withApplicationDisplayName(String applicationDisplayName) { AuditActor _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.auditActor"); _x.applicationDisplayName = applicationDisplayName; return _x; } /** * “AAD Application Id.” * * @return property applicationId */ @Property(name="applicationId") @JsonIgnore public Optional getApplicationId() { return Optional.ofNullable(applicationId); } /** * Returns an immutable copy of {@code this} with just the {@code applicationId} * 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. *

* “AAD Application Id.” * * @param applicationId * new value of {@code applicationId} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code applicationId} field changed */ public AuditActor withApplicationId(String applicationId) { AuditActor _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.auditActor"); _x.applicationId = applicationId; return _x; } /** * “Actor Type.” * * @return property auditActorType */ @Property(name="auditActorType") @JsonIgnore public Optional getAuditActorType() { return Optional.ofNullable(auditActorType); } /** * Returns an immutable copy of {@code this} with just the {@code auditActorType} * 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. *

* “Actor Type.” * * @param auditActorType * new value of {@code auditActorType} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code auditActorType} field changed */ public AuditActor withAuditActorType(String auditActorType) { AuditActor _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.auditActor"); _x.auditActorType = auditActorType; return _x; } /** * “IPAddress.” * * @return property ipAddress */ @Property(name="ipAddress") @JsonIgnore public Optional getIpAddress() { return Optional.ofNullable(ipAddress); } /** * Returns an immutable copy of {@code this} with just the {@code ipAddress} 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. *

* “IPAddress.” * * @param ipAddress * new value of {@code ipAddress} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code ipAddress} field changed */ public AuditActor withIpAddress(String ipAddress) { AuditActor _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.auditActor"); _x.ipAddress = ipAddress; return _x; } /** * “Service Principal Name (SPN).” * * @return property servicePrincipalName */ @Property(name="servicePrincipalName") @JsonIgnore public Optional getServicePrincipalName() { return Optional.ofNullable(servicePrincipalName); } /** * Returns an immutable copy of {@code this} with just the {@code * servicePrincipalName} 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. *

* “Service Principal Name (SPN).” * * @param servicePrincipalName * new value of {@code servicePrincipalName} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code servicePrincipalName} field changed */ public AuditActor withServicePrincipalName(String servicePrincipalName) { AuditActor _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.auditActor"); _x.servicePrincipalName = servicePrincipalName; return _x; } /** * “User Id.” * * @return property userId */ @Property(name="userId") @JsonIgnore public Optional getUserId() { return Optional.ofNullable(userId); } /** * Returns an immutable copy of {@code this} with just the {@code userId} 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 Id.” * * @param userId * new value of {@code userId} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code userId} field changed */ public AuditActor withUserId(String userId) { AuditActor _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.auditActor"); _x.userId = userId; return _x; } /** * “List of user permissions when the audit was performed.” * * @return property userPermissions */ @Property(name="userPermissions") @JsonIgnore public CollectionPage getUserPermissions() { return new CollectionPage(contextPath, String.class, this.userPermissions, Optional.ofNullable(userPermissionsNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY); } /** * “List of user permissions when the audit was performed.” * * @param options * specify connect and read timeouts * @return property userPermissions */ @Property(name="userPermissions") @JsonIgnore public CollectionPage getUserPermissions(HttpRequestOptions options) { return new CollectionPage(contextPath, String.class, this.userPermissions, Optional.ofNullable(userPermissionsNextLink), Collections.emptyList(), options); } /** * “User Principal Name (UPN).” * * @return property userPrincipalName */ @Property(name="userPrincipalName") @JsonIgnore public Optional getUserPrincipalName() { return Optional.ofNullable(userPrincipalName); } /** * Returns an immutable copy of {@code this} with just the {@code userPrincipalName * } 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 Principal Name (UPN).” * * @param userPrincipalName * new value of {@code userPrincipalName} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code userPrincipalName} field changed */ public AuditActor withUserPrincipalName(String userPrincipalName) { AuditActor _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.auditActor"); _x.userPrincipalName = userPrincipalName; return _x; } public AuditActor withUnmappedField(String name, String value) { AuditActor _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 String applicationDisplayName; private String applicationId; private String auditActorType; private String ipAddress; private String servicePrincipalName; private String userId; private List userPermissions; private String userPermissionsNextLink; private String userPrincipalName; private ChangedFields changedFields = ChangedFields.EMPTY; Builder() { // prevent instantiation } /** * “Name of the Application.” * * @param applicationDisplayName * value of {@code applicationDisplayName} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder applicationDisplayName(String applicationDisplayName) { this.applicationDisplayName = applicationDisplayName; this.changedFields = changedFields.add("applicationDisplayName"); return this; } /** * “AAD Application Id.” * * @param applicationId * value of {@code applicationId} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder applicationId(String applicationId) { this.applicationId = applicationId; this.changedFields = changedFields.add("applicationId"); return this; } /** * “Actor Type.” * * @param auditActorType * value of {@code auditActorType} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder auditActorType(String auditActorType) { this.auditActorType = auditActorType; this.changedFields = changedFields.add("auditActorType"); return this; } /** * “IPAddress.” * * @param ipAddress * value of {@code ipAddress} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder ipAddress(String ipAddress) { this.ipAddress = ipAddress; this.changedFields = changedFields.add("ipAddress"); return this; } /** * “Service Principal Name (SPN).” * * @param servicePrincipalName * value of {@code servicePrincipalName} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder servicePrincipalName(String servicePrincipalName) { this.servicePrincipalName = servicePrincipalName; this.changedFields = changedFields.add("servicePrincipalName"); return this; } /** * “User Id.” * * @param userId * value of {@code userId} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder userId(String userId) { this.userId = userId; this.changedFields = changedFields.add("userId"); return this; } /** * “List of user permissions when the audit was performed.” * * @param userPermissions * value of {@code userPermissions} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder userPermissions(List userPermissions) { this.userPermissions = userPermissions; this.changedFields = changedFields.add("userPermissions"); return this; } /** * “List of user permissions when the audit was performed.” * * @param userPermissions * value of {@code userPermissions} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder userPermissions(String... userPermissions) { return userPermissions(Arrays.asList(userPermissions)); } /** * “List of user permissions when the audit was performed.” * * @param userPermissionsNextLink * value of {@code userPermissions@nextLink} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder userPermissionsNextLink(String userPermissionsNextLink) { this.userPermissionsNextLink = userPermissionsNextLink; this.changedFields = changedFields.add("userPermissions"); return this; } /** * “User Principal Name (UPN).” * * @param userPrincipalName * value of {@code userPrincipalName} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder userPrincipalName(String userPrincipalName) { this.userPrincipalName = userPrincipalName; this.changedFields = changedFields.add("userPrincipalName"); return this; } public AuditActor build() { AuditActor _x = new AuditActor(); _x.contextPath = null; _x.unmappedFields = new UnmappedFieldsImpl(); _x.odataType = "microsoft.graph.auditActor"; _x.applicationDisplayName = applicationDisplayName; _x.applicationId = applicationId; _x.auditActorType = auditActorType; _x.ipAddress = ipAddress; _x.servicePrincipalName = servicePrincipalName; _x.userId = userId; _x.userPermissions = userPermissions; _x.userPermissionsNextLink = userPermissionsNextLink; _x.userPrincipalName = userPrincipalName; return _x; } } private AuditActor _copy() { AuditActor _x = new AuditActor(); _x.contextPath = contextPath; _x.unmappedFields = unmappedFields.copy(); _x.odataType = odataType; _x.applicationDisplayName = applicationDisplayName; _x.applicationId = applicationId; _x.auditActorType = auditActorType; _x.ipAddress = ipAddress; _x.servicePrincipalName = servicePrincipalName; _x.userId = userId; _x.userPermissions = userPermissions; _x.userPrincipalName = userPrincipalName; return _x; } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("AuditActor["); b.append("applicationDisplayName="); b.append(this.applicationDisplayName); b.append(", "); b.append("applicationId="); b.append(this.applicationId); b.append(", "); b.append("auditActorType="); b.append(this.auditActorType); b.append(", "); b.append("ipAddress="); b.append(this.ipAddress); b.append(", "); b.append("servicePrincipalName="); b.append(this.servicePrincipalName); b.append(", "); b.append("userId="); b.append(this.userId); b.append(", "); b.append("userPermissions="); b.append(this.userPermissions); b.append(", "); b.append("userPrincipalName="); b.append(this.userPrincipalName); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy