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

odata.msgraph.client.beta.complex.Win32LobAppPowerShellScriptRequirement Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package odata.msgraph.client.beta.complex;

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

import odata.msgraph.client.beta.enums.RunAsAccountType;
import odata.msgraph.client.beta.enums.Win32LobAppDetectionOperator;
import odata.msgraph.client.beta.enums.Win32LobAppPowerShellScriptDetectionType;


/**
 * “Contains PowerShell script properties to detect a Win32 App”
 */@JsonPropertyOrder({
    "@odata.type", 
    "detectionType", 
    "displayName", 
    "enforceSignatureCheck", 
    "runAs32Bit", 
    "runAsAccount", 
    "scriptContent"})
@JsonInclude(Include.NON_NULL)
public class Win32LobAppPowerShellScriptRequirement extends Win32LobAppRequirement implements ODataType {

    @JsonProperty("detectionType")
    protected Win32LobAppPowerShellScriptDetectionType detectionType;

    @JsonProperty("displayName")
    protected String displayName;

    @JsonProperty("enforceSignatureCheck")
    protected Boolean enforceSignatureCheck;

    @JsonProperty("runAs32Bit")
    protected Boolean runAs32Bit;

    @JsonProperty("runAsAccount")
    protected RunAsAccountType runAsAccount;

    @JsonProperty("scriptContent")
    protected String scriptContent;

    protected Win32LobAppPowerShellScriptRequirement() {
        super();
    }

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

    /**
     * “The detection type for script output”
     * 
     * @return property detectionType
     */
    @Property(name="detectionType")
    @JsonIgnore
    public Optional getDetectionType() {
        return Optional.ofNullable(detectionType);
    }

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

* “The detection type for script output” * * @param detectionType * new value of {@code detectionType} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code detectionType} field changed */ public Win32LobAppPowerShellScriptRequirement withDetectionType(Win32LobAppPowerShellScriptDetectionType detectionType) { Win32LobAppPowerShellScriptRequirement _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.win32LobAppPowerShellScriptRequirement"); _x.detectionType = detectionType; return _x; } /** * “The unique display name for this rule” * * @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. *

* “The unique display name for this rule” * * @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 Win32LobAppPowerShellScriptRequirement withDisplayName(String displayName) { Win32LobAppPowerShellScriptRequirement _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.win32LobAppPowerShellScriptRequirement"); _x.displayName = displayName; return _x; } /** * “A value indicating whether signature check is enforced” * * @return property enforceSignatureCheck */ @Property(name="enforceSignatureCheck") @JsonIgnore public Optional getEnforceSignatureCheck() { return Optional.ofNullable(enforceSignatureCheck); } /** * Returns an immutable copy of {@code this} with just the {@code * enforceSignatureCheck} 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. *

* “A value indicating whether signature check is enforced” * * @param enforceSignatureCheck * new value of {@code enforceSignatureCheck} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code enforceSignatureCheck} field changed */ public Win32LobAppPowerShellScriptRequirement withEnforceSignatureCheck(Boolean enforceSignatureCheck) { Win32LobAppPowerShellScriptRequirement _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.win32LobAppPowerShellScriptRequirement"); _x.enforceSignatureCheck = enforceSignatureCheck; return _x; } /** * “A value indicating whether this script should run as 32-bit” * * @return property runAs32Bit */ @Property(name="runAs32Bit") @JsonIgnore public Optional getRunAs32Bit() { return Optional.ofNullable(runAs32Bit); } /** * Returns an immutable copy of {@code this} with just the {@code runAs32Bit} 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. *

* “A value indicating whether this script should run as 32-bit” * * @param runAs32Bit * new value of {@code runAs32Bit} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code runAs32Bit} field changed */ public Win32LobAppPowerShellScriptRequirement withRunAs32Bit(Boolean runAs32Bit) { Win32LobAppPowerShellScriptRequirement _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.win32LobAppPowerShellScriptRequirement"); _x.runAs32Bit = runAs32Bit; return _x; } /** * “Indicates the type of execution context the script runs in.” * * @return property runAsAccount */ @Property(name="runAsAccount") @JsonIgnore public Optional getRunAsAccount() { return Optional.ofNullable(runAsAccount); } /** * Returns an immutable copy of {@code this} with just the {@code runAsAccount} * 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. *

* “Indicates the type of execution context the script runs in.” * * @param runAsAccount * new value of {@code runAsAccount} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code runAsAccount} field changed */ public Win32LobAppPowerShellScriptRequirement withRunAsAccount(RunAsAccountType runAsAccount) { Win32LobAppPowerShellScriptRequirement _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.win32LobAppPowerShellScriptRequirement"); _x.runAsAccount = runAsAccount; return _x; } /** * “The base64 encoded script content to detect Win32 Line of Business (LoB) app” * * @return property scriptContent */ @Property(name="scriptContent") @JsonIgnore public Optional getScriptContent() { return Optional.ofNullable(scriptContent); } /** * Returns an immutable copy of {@code this} with just the {@code scriptContent} * 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. *

* “The base64 encoded script content to detect Win32 Line of Business (LoB) app” * * @param scriptContent * new value of {@code scriptContent} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code scriptContent} field changed */ public Win32LobAppPowerShellScriptRequirement withScriptContent(String scriptContent) { Win32LobAppPowerShellScriptRequirement _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.win32LobAppPowerShellScriptRequirement"); _x.scriptContent = scriptContent; return _x; } public Win32LobAppPowerShellScriptRequirement withUnmappedField(String name, String value) { Win32LobAppPowerShellScriptRequirement _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 builderWin32LobAppPowerShellScriptRequirement() { return new Builder(); } public static final class Builder { private String detectionValue; private Win32LobAppDetectionOperator operator; private Win32LobAppPowerShellScriptDetectionType detectionType; private String displayName; private Boolean enforceSignatureCheck; private Boolean runAs32Bit; private RunAsAccountType runAsAccount; private String scriptContent; private ChangedFields changedFields = ChangedFields.EMPTY; Builder() { // prevent instantiation } public Builder detectionValue(String detectionValue) { this.detectionValue = detectionValue; this.changedFields = changedFields.add("detectionValue"); return this; } public Builder operator(Win32LobAppDetectionOperator operator) { this.operator = operator; this.changedFields = changedFields.add("operator"); return this; } /** * “The detection type for script output” * * @param detectionType * value of {@code detectionType} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder detectionType(Win32LobAppPowerShellScriptDetectionType detectionType) { this.detectionType = detectionType; this.changedFields = changedFields.add("detectionType"); return this; } /** * “The unique display name for this rule” * * @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; } /** * “A value indicating whether signature check is enforced” * * @param enforceSignatureCheck * value of {@code enforceSignatureCheck} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder enforceSignatureCheck(Boolean enforceSignatureCheck) { this.enforceSignatureCheck = enforceSignatureCheck; this.changedFields = changedFields.add("enforceSignatureCheck"); return this; } /** * “A value indicating whether this script should run as 32-bit” * * @param runAs32Bit * value of {@code runAs32Bit} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder runAs32Bit(Boolean runAs32Bit) { this.runAs32Bit = runAs32Bit; this.changedFields = changedFields.add("runAs32Bit"); return this; } /** * “Indicates the type of execution context the script runs in.” * * @param runAsAccount * value of {@code runAsAccount} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder runAsAccount(RunAsAccountType runAsAccount) { this.runAsAccount = runAsAccount; this.changedFields = changedFields.add("runAsAccount"); return this; } /** * “The base64 encoded script content to detect Win32 Line of Business (LoB) app” * * @param scriptContent * value of {@code scriptContent} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder scriptContent(String scriptContent) { this.scriptContent = scriptContent; this.changedFields = changedFields.add("scriptContent"); return this; } public Win32LobAppPowerShellScriptRequirement build() { Win32LobAppPowerShellScriptRequirement _x = new Win32LobAppPowerShellScriptRequirement(); _x.contextPath = null; _x.unmappedFields = new UnmappedFieldsImpl(); _x.odataType = "microsoft.graph.win32LobAppPowerShellScriptRequirement"; _x.detectionValue = detectionValue; _x.operator = operator; _x.detectionType = detectionType; _x.displayName = displayName; _x.enforceSignatureCheck = enforceSignatureCheck; _x.runAs32Bit = runAs32Bit; _x.runAsAccount = runAsAccount; _x.scriptContent = scriptContent; return _x; } } private Win32LobAppPowerShellScriptRequirement _copy() { Win32LobAppPowerShellScriptRequirement _x = new Win32LobAppPowerShellScriptRequirement(); _x.contextPath = contextPath; _x.unmappedFields = unmappedFields.copy(); _x.odataType = odataType; _x.detectionValue = detectionValue; _x.operator = operator; _x.detectionType = detectionType; _x.displayName = displayName; _x.enforceSignatureCheck = enforceSignatureCheck; _x.runAs32Bit = runAs32Bit; _x.runAsAccount = runAsAccount; _x.scriptContent = scriptContent; return _x; } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("Win32LobAppPowerShellScriptRequirement["); b.append("detectionValue="); b.append(this.detectionValue); b.append(", "); b.append("operator="); b.append(this.operator); b.append(", "); b.append("detectionType="); b.append(this.detectionType); b.append(", "); b.append("displayName="); b.append(this.displayName); b.append(", "); b.append("enforceSignatureCheck="); b.append(this.enforceSignatureCheck); b.append(", "); b.append("runAs32Bit="); b.append(this.runAs32Bit); b.append(", "); b.append("runAsAccount="); b.append(this.runAsAccount); b.append(", "); b.append("scriptContent="); b.append(this.scriptContent); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy