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

odata.msgraph.client.beta.entity.AndroidWorkProfileVpnConfiguration Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
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.NavigationProperty;
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.Integer;
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.AppListItem;
import odata.msgraph.client.beta.complex.DeviceManagementApplicabilityRuleDeviceMode;
import odata.msgraph.client.beta.complex.DeviceManagementApplicabilityRuleOsEdition;
import odata.msgraph.client.beta.complex.DeviceManagementApplicabilityRuleOsVersion;
import odata.msgraph.client.beta.complex.KeyValue;
import odata.msgraph.client.beta.complex.KeyValuePair;
import odata.msgraph.client.beta.complex.VpnProxyServer;
import odata.msgraph.client.beta.complex.VpnServer;
import odata.msgraph.client.beta.entity.request.AndroidWorkProfileCertificateProfileBaseRequest;
import odata.msgraph.client.beta.enums.AndroidWorkProfileVpnConnectionType;
import odata.msgraph.client.beta.enums.VpnAuthenticationMethod;


/**
 * “By providing the configurations in this profile you can instruct the Android
 * Work Profile device to connect to desired VPN endpoint. By specifying the
 * authentication method and security types expected by VPN endpoint you can make
 * the VPN connection seamless for end user.”
 */@JsonPropertyOrder({
    "@odata.type", 
    "alwaysOn", 
    "alwaysOnLockdown", 
    "authenticationMethod", 
    "connectionName", 
    "connectionType", 
    "customData", 
    "customKeyValueData", 
    "fingerprint", 
    "microsoftTunnelSiteId", 
    "proxyServer", 
    "realm", 
    "role", 
    "servers", 
    "targetedMobileApps", 
    "targetedPackageIds"})
@JsonInclude(Include.NON_NULL)
public class AndroidWorkProfileVpnConfiguration extends DeviceConfiguration implements ODataEntityType {

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

    @JsonProperty("alwaysOn")
    protected Boolean alwaysOn;

    @JsonProperty("alwaysOnLockdown")
    protected Boolean alwaysOnLockdown;

    @JsonProperty("authenticationMethod")
    protected VpnAuthenticationMethod authenticationMethod;

    @JsonProperty("connectionName")
    protected String connectionName;

    @JsonProperty("connectionType")
    protected AndroidWorkProfileVpnConnectionType connectionType;

    @JsonProperty("customData")
    protected List customData;

    @JsonProperty("customData@nextLink")
    protected String customDataNextLink;

    @JsonProperty("customKeyValueData")
    protected List customKeyValueData;

    @JsonProperty("customKeyValueData@nextLink")
    protected String customKeyValueDataNextLink;

    @JsonProperty("fingerprint")
    protected String fingerprint;

    @JsonProperty("microsoftTunnelSiteId")
    protected String microsoftTunnelSiteId;

    @JsonProperty("proxyServer")
    protected VpnProxyServer proxyServer;

    @JsonProperty("realm")
    protected String realm;

    @JsonProperty("role")
    protected String role;

    @JsonProperty("servers")
    protected List servers;

    @JsonProperty("servers@nextLink")
    protected String serversNextLink;

    @JsonProperty("targetedMobileApps")
    protected List targetedMobileApps;

    @JsonProperty("targetedMobileApps@nextLink")
    protected String targetedMobileAppsNextLink;

    @JsonProperty("targetedPackageIds")
    protected List targetedPackageIds;

    @JsonProperty("targetedPackageIds@nextLink")
    protected String targetedPackageIdsNextLink;

    protected AndroidWorkProfileVpnConfiguration() {
        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 builderAndroidWorkProfileVpnConfiguration() {
        return new Builder();
    }

    public static final class Builder {
        private String id;
        private OffsetDateTime createdDateTime;
        private String description;
        private DeviceManagementApplicabilityRuleDeviceMode deviceManagementApplicabilityRuleDeviceMode;
        private DeviceManagementApplicabilityRuleOsEdition deviceManagementApplicabilityRuleOsEdition;
        private DeviceManagementApplicabilityRuleOsVersion deviceManagementApplicabilityRuleOsVersion;
        private String displayName;
        private OffsetDateTime lastModifiedDateTime;
        private List roleScopeTagIds;
        private String roleScopeTagIdsNextLink;
        private Boolean supportsScopeTags;
        private Integer version;
        private Boolean alwaysOn;
        private Boolean alwaysOnLockdown;
        private VpnAuthenticationMethod authenticationMethod;
        private String connectionName;
        private AndroidWorkProfileVpnConnectionType connectionType;
        private List customData;
        private String customDataNextLink;
        private List customKeyValueData;
        private String customKeyValueDataNextLink;
        private String fingerprint;
        private String microsoftTunnelSiteId;
        private VpnProxyServer proxyServer;
        private String realm;
        private String role;
        private List servers;
        private String serversNextLink;
        private List targetedMobileApps;
        private String targetedMobileAppsNextLink;
        private List targetedPackageIds;
        private String targetedPackageIdsNextLink;
        private ChangedFields changedFields = ChangedFields.EMPTY;

        Builder() {
            // prevent instantiation
        }

        public Builder id(String id) {
            this.id = id;
            this.changedFields = changedFields.add("id");
            return this;
        }

        public Builder createdDateTime(OffsetDateTime createdDateTime) {
            this.createdDateTime = createdDateTime;
            this.changedFields = changedFields.add("createdDateTime");
            return this;
        }

        public Builder description(String description) {
            this.description = description;
            this.changedFields = changedFields.add("description");
            return this;
        }

        public Builder deviceManagementApplicabilityRuleDeviceMode(DeviceManagementApplicabilityRuleDeviceMode deviceManagementApplicabilityRuleDeviceMode) {
            this.deviceManagementApplicabilityRuleDeviceMode = deviceManagementApplicabilityRuleDeviceMode;
            this.changedFields = changedFields.add("deviceManagementApplicabilityRuleDeviceMode");
            return this;
        }

        public Builder deviceManagementApplicabilityRuleOsEdition(DeviceManagementApplicabilityRuleOsEdition deviceManagementApplicabilityRuleOsEdition) {
            this.deviceManagementApplicabilityRuleOsEdition = deviceManagementApplicabilityRuleOsEdition;
            this.changedFields = changedFields.add("deviceManagementApplicabilityRuleOsEdition");
            return this;
        }

        public Builder deviceManagementApplicabilityRuleOsVersion(DeviceManagementApplicabilityRuleOsVersion deviceManagementApplicabilityRuleOsVersion) {
            this.deviceManagementApplicabilityRuleOsVersion = deviceManagementApplicabilityRuleOsVersion;
            this.changedFields = changedFields.add("deviceManagementApplicabilityRuleOsVersion");
            return this;
        }

        public Builder displayName(String displayName) {
            this.displayName = displayName;
            this.changedFields = changedFields.add("displayName");
            return this;
        }

        public Builder lastModifiedDateTime(OffsetDateTime lastModifiedDateTime) {
            this.lastModifiedDateTime = lastModifiedDateTime;
            this.changedFields = changedFields.add("lastModifiedDateTime");
            return this;
        }

        public Builder roleScopeTagIds(List roleScopeTagIds) {
            this.roleScopeTagIds = roleScopeTagIds;
            this.changedFields = changedFields.add("roleScopeTagIds");
            return this;
        }

        public Builder roleScopeTagIds(String... roleScopeTagIds) {
            return roleScopeTagIds(Arrays.asList(roleScopeTagIds));
        }

        public Builder roleScopeTagIdsNextLink(String roleScopeTagIdsNextLink) {
            this.roleScopeTagIdsNextLink = roleScopeTagIdsNextLink;
            this.changedFields = changedFields.add("roleScopeTagIds");
            return this;
        }

        public Builder supportsScopeTags(Boolean supportsScopeTags) {
            this.supportsScopeTags = supportsScopeTags;
            this.changedFields = changedFields.add("supportsScopeTags");
            return this;
        }

        public Builder version(Integer version) {
            this.version = version;
            this.changedFields = changedFields.add("version");
            return this;
        }

        /**
         * “Whether or not to enable always-on VPN connection.”
         * 
         * @param alwaysOn
         *            value of {@code alwaysOn} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder alwaysOn(Boolean alwaysOn) {
            this.alwaysOn = alwaysOn;
            this.changedFields = changedFields.add("alwaysOn");
            return this;
        }

        /**
         * “If always-on VPN connection is enabled, whether or not to lock network traffic
         * when that VPN is disconnected.”
         * 
         * @param alwaysOnLockdown
         *            value of {@code alwaysOnLockdown} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder alwaysOnLockdown(Boolean alwaysOnLockdown) {
            this.alwaysOnLockdown = alwaysOnLockdown;
            this.changedFields = changedFields.add("alwaysOnLockdown");
            return this;
        }

        /**
         * “Authentication method.”
         * 
         * @param authenticationMethod
         *            value of {@code authenticationMethod} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder authenticationMethod(VpnAuthenticationMethod authenticationMethod) {
            this.authenticationMethod = authenticationMethod;
            this.changedFields = changedFields.add("authenticationMethod");
            return this;
        }

        /**
         * “Connection name displayed to the user.”
         * 
         * @param connectionName
         *            value of {@code connectionName} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder connectionName(String connectionName) {
            this.connectionName = connectionName;
            this.changedFields = changedFields.add("connectionName");
            return this;
        }

        /**
         * “Connection type.”
         * 
         * @param connectionType
         *            value of {@code connectionType} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder connectionType(AndroidWorkProfileVpnConnectionType connectionType) {
            this.connectionType = connectionType;
            this.changedFields = changedFields.add("connectionType");
            return this;
        }

        /**
         * “Custom data when connection type is set to Citrix. This collection can contain a
         * maximum of 25 elements.”
         * 
         * @param customData
         *            value of {@code customData} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder customData(List customData) {
            this.customData = customData;
            this.changedFields = changedFields.add("customData");
            return this;
        }

        /**
         * “Custom data when connection type is set to Citrix. This collection can contain a
         * maximum of 25 elements.”
         * 
         * @param customData
         *            value of {@code customData} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder customData(KeyValue... customData) {
            return customData(Arrays.asList(customData));
        }

        /**
         * “Custom data when connection type is set to Citrix. This collection can contain a
         * maximum of 25 elements.”
         * 
         * @param customDataNextLink
         *            value of {@code customData@nextLink} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder customDataNextLink(String customDataNextLink) {
            this.customDataNextLink = customDataNextLink;
            this.changedFields = changedFields.add("customData");
            return this;
        }

        /**
         * “Custom data when connection type is set to Citrix. This collection can contain a
         * maximum of 25 elements.”
         * 
         * @param customKeyValueData
         *            value of {@code customKeyValueData} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder customKeyValueData(List customKeyValueData) {
            this.customKeyValueData = customKeyValueData;
            this.changedFields = changedFields.add("customKeyValueData");
            return this;
        }

        /**
         * “Custom data when connection type is set to Citrix. This collection can contain a
         * maximum of 25 elements.”
         * 
         * @param customKeyValueData
         *            value of {@code customKeyValueData} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder customKeyValueData(KeyValuePair... customKeyValueData) {
            return customKeyValueData(Arrays.asList(customKeyValueData));
        }

        /**
         * “Custom data when connection type is set to Citrix. This collection can contain a
         * maximum of 25 elements.”
         * 
         * @param customKeyValueDataNextLink
         *            value of {@code customKeyValueData@nextLink} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder customKeyValueDataNextLink(String customKeyValueDataNextLink) {
            this.customKeyValueDataNextLink = customKeyValueDataNextLink;
            this.changedFields = changedFields.add("customKeyValueData");
            return this;
        }

        /**
         * “Fingerprint is a string that will be used to verify the VPN server can be
         * trusted, which is only applicable when connection type is Check Point Capsule
         * VPN.”
         * 
         * @param fingerprint
         *            value of {@code fingerprint} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder fingerprint(String fingerprint) {
            this.fingerprint = fingerprint;
            this.changedFields = changedFields.add("fingerprint");
            return this;
        }

        /**
         * “Microsoft Tunnel site ID.”
         * 
         * @param microsoftTunnelSiteId
         *            value of {@code microsoftTunnelSiteId} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder microsoftTunnelSiteId(String microsoftTunnelSiteId) {
            this.microsoftTunnelSiteId = microsoftTunnelSiteId;
            this.changedFields = changedFields.add("microsoftTunnelSiteId");
            return this;
        }

        /**
         * “Proxy server.”
         * 
         * @param proxyServer
         *            value of {@code proxyServer} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder proxyServer(VpnProxyServer proxyServer) {
            this.proxyServer = proxyServer;
            this.changedFields = changedFields.add("proxyServer");
            return this;
        }

        /**
         * “Realm when connection type is set to Pulse Secure.”
         * 
         * @param realm
         *            value of {@code realm} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder realm(String realm) {
            this.realm = realm;
            this.changedFields = changedFields.add("realm");
            return this;
        }

        /**
         * “Role when connection type is set to Pulse Secure.”
         * 
         * @param role
         *            value of {@code role} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder role(String role) {
            this.role = role;
            this.changedFields = changedFields.add("role");
            return this;
        }

        /**
         * “List of VPN Servers on the network. Make sure end users can access these network
         * locations. This collection can contain a maximum of 500 elements.”
         * 
         * @param servers
         *            value of {@code servers} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder servers(List servers) {
            this.servers = servers;
            this.changedFields = changedFields.add("servers");
            return this;
        }

        /**
         * “List of VPN Servers on the network. Make sure end users can access these network
         * locations. This collection can contain a maximum of 500 elements.”
         * 
         * @param servers
         *            value of {@code servers} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder servers(VpnServer... servers) {
            return servers(Arrays.asList(servers));
        }

        /**
         * “List of VPN Servers on the network. Make sure end users can access these network
         * locations. This collection can contain a maximum of 500 elements.”
         * 
         * @param serversNextLink
         *            value of {@code servers@nextLink} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder serversNextLink(String serversNextLink) {
            this.serversNextLink = serversNextLink;
            this.changedFields = changedFields.add("servers");
            return this;
        }

        /**
         * “Targeted mobile apps. This collection can contain a maximum of 500 elements.”
         * 
         * @param targetedMobileApps
         *            value of {@code targetedMobileApps} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder targetedMobileApps(List targetedMobileApps) {
            this.targetedMobileApps = targetedMobileApps;
            this.changedFields = changedFields.add("targetedMobileApps");
            return this;
        }

        /**
         * “Targeted mobile apps. This collection can contain a maximum of 500 elements.”
         * 
         * @param targetedMobileApps
         *            value of {@code targetedMobileApps} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder targetedMobileApps(AppListItem... targetedMobileApps) {
            return targetedMobileApps(Arrays.asList(targetedMobileApps));
        }

        /**
         * “Targeted mobile apps. This collection can contain a maximum of 500 elements.”
         * 
         * @param targetedMobileAppsNextLink
         *            value of {@code targetedMobileApps@nextLink} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder targetedMobileAppsNextLink(String targetedMobileAppsNextLink) {
            this.targetedMobileAppsNextLink = targetedMobileAppsNextLink;
            this.changedFields = changedFields.add("targetedMobileApps");
            return this;
        }

        /**
         * “Targeted App package IDs.”
         * 
         * @param targetedPackageIds
         *            value of {@code targetedPackageIds} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder targetedPackageIds(List targetedPackageIds) {
            this.targetedPackageIds = targetedPackageIds;
            this.changedFields = changedFields.add("targetedPackageIds");
            return this;
        }

        /**
         * “Targeted App package IDs.”
         * 
         * @param targetedPackageIds
         *            value of {@code targetedPackageIds} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder targetedPackageIds(String... targetedPackageIds) {
            return targetedPackageIds(Arrays.asList(targetedPackageIds));
        }

        /**
         * “Targeted App package IDs.”
         * 
         * @param targetedPackageIdsNextLink
         *            value of {@code targetedPackageIds@nextLink} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder targetedPackageIdsNextLink(String targetedPackageIdsNextLink) {
            this.targetedPackageIdsNextLink = targetedPackageIdsNextLink;
            this.changedFields = changedFields.add("targetedPackageIds");
            return this;
        }

        public AndroidWorkProfileVpnConfiguration build() {
            AndroidWorkProfileVpnConfiguration _x = new AndroidWorkProfileVpnConfiguration();
            _x.contextPath = null;
            _x.changedFields = changedFields;
            _x.unmappedFields = new UnmappedFieldsImpl();
            _x.odataType = "microsoft.graph.androidWorkProfileVpnConfiguration";
            _x.id = id;
            _x.createdDateTime = createdDateTime;
            _x.description = description;
            _x.deviceManagementApplicabilityRuleDeviceMode = deviceManagementApplicabilityRuleDeviceMode;
            _x.deviceManagementApplicabilityRuleOsEdition = deviceManagementApplicabilityRuleOsEdition;
            _x.deviceManagementApplicabilityRuleOsVersion = deviceManagementApplicabilityRuleOsVersion;
            _x.displayName = displayName;
            _x.lastModifiedDateTime = lastModifiedDateTime;
            _x.roleScopeTagIds = roleScopeTagIds;
            _x.roleScopeTagIdsNextLink = roleScopeTagIdsNextLink;
            _x.supportsScopeTags = supportsScopeTags;
            _x.version = version;
            _x.alwaysOn = alwaysOn;
            _x.alwaysOnLockdown = alwaysOnLockdown;
            _x.authenticationMethod = authenticationMethod;
            _x.connectionName = connectionName;
            _x.connectionType = connectionType;
            _x.customData = customData;
            _x.customDataNextLink = customDataNextLink;
            _x.customKeyValueData = customKeyValueData;
            _x.customKeyValueDataNextLink = customKeyValueDataNextLink;
            _x.fingerprint = fingerprint;
            _x.microsoftTunnelSiteId = microsoftTunnelSiteId;
            _x.proxyServer = proxyServer;
            _x.realm = realm;
            _x.role = role;
            _x.servers = servers;
            _x.serversNextLink = serversNextLink;
            _x.targetedMobileApps = targetedMobileApps;
            _x.targetedMobileAppsNextLink = targetedMobileAppsNextLink;
            _x.targetedPackageIds = targetedPackageIds;
            _x.targetedPackageIdsNextLink = targetedPackageIdsNextLink;
            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()));
        }
    }

    /**
     * “Whether or not to enable always-on VPN connection.”
     * 
     * @return property alwaysOn
     */
    @Property(name="alwaysOn")
    @JsonIgnore
    public Optional getAlwaysOn() {
        return Optional.ofNullable(alwaysOn);
    }

    /**
     * Returns an immutable copy of {@code this} with just the {@code alwaysOn} 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 or not to enable always-on VPN connection.” * * @param alwaysOn * new value of {@code alwaysOn} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code alwaysOn} field changed */ public AndroidWorkProfileVpnConfiguration withAlwaysOn(Boolean alwaysOn) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("alwaysOn"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.alwaysOn = alwaysOn; return _x; } /** * “If always-on VPN connection is enabled, whether or not to lock network traffic * when that VPN is disconnected.” * * @return property alwaysOnLockdown */ @Property(name="alwaysOnLockdown") @JsonIgnore public Optional getAlwaysOnLockdown() { return Optional.ofNullable(alwaysOnLockdown); } /** * Returns an immutable copy of {@code this} with just the {@code alwaysOnLockdown} * 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. *

* “If always-on VPN connection is enabled, whether or not to lock network traffic * when that VPN is disconnected.” * * @param alwaysOnLockdown * new value of {@code alwaysOnLockdown} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code alwaysOnLockdown} field changed */ public AndroidWorkProfileVpnConfiguration withAlwaysOnLockdown(Boolean alwaysOnLockdown) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("alwaysOnLockdown"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.alwaysOnLockdown = alwaysOnLockdown; return _x; } /** * “Authentication method.” * * @return property authenticationMethod */ @Property(name="authenticationMethod") @JsonIgnore public Optional getAuthenticationMethod() { return Optional.ofNullable(authenticationMethod); } /** * Returns an immutable copy of {@code this} with just the {@code * authenticationMethod} 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. *

* “Authentication method.” * * @param authenticationMethod * new value of {@code authenticationMethod} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code authenticationMethod} field changed */ public AndroidWorkProfileVpnConfiguration withAuthenticationMethod(VpnAuthenticationMethod authenticationMethod) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("authenticationMethod"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.authenticationMethod = authenticationMethod; return _x; } /** * “Connection name displayed to the user.” * * @return property connectionName */ @Property(name="connectionName") @JsonIgnore public Optional getConnectionName() { return Optional.ofNullable(connectionName); } /** * Returns an immutable copy of {@code this} with just the {@code connectionName} * 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. *

* “Connection name displayed to the user.” * * @param connectionName * new value of {@code connectionName} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code connectionName} field changed */ public AndroidWorkProfileVpnConfiguration withConnectionName(String connectionName) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("connectionName"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.connectionName = connectionName; return _x; } /** * “Connection type.” * * @return property connectionType */ @Property(name="connectionType") @JsonIgnore public Optional getConnectionType() { return Optional.ofNullable(connectionType); } /** * Returns an immutable copy of {@code this} with just the {@code connectionType} * 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. *

* “Connection type.” * * @param connectionType * new value of {@code connectionType} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code connectionType} field changed */ public AndroidWorkProfileVpnConfiguration withConnectionType(AndroidWorkProfileVpnConnectionType connectionType) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("connectionType"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.connectionType = connectionType; return _x; } /** * “Custom data when connection type is set to Citrix. This collection can contain a * maximum of 25 elements.” * * @return property customData */ @Property(name="customData") @JsonIgnore public CollectionPage getCustomData() { return new CollectionPage(contextPath, KeyValue.class, this.customData, Optional.ofNullable(customDataNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY); } /** * Returns an immutable copy of {@code this} with just the {@code customData} 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. *

* “Custom data when connection type is set to Citrix. This collection can contain a * maximum of 25 elements.” * * @param customData * new value of {@code customData} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code customData} field changed */ public AndroidWorkProfileVpnConfiguration withCustomData(List customData) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("customData"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.customData = customData; return _x; } /** * “Custom data when connection type is set to Citrix. This collection can contain a * maximum of 25 elements.” * * @param options * specify connect and read timeouts * @return property customData */ @Property(name="customData") @JsonIgnore public CollectionPage getCustomData(HttpRequestOptions options) { return new CollectionPage(contextPath, KeyValue.class, this.customData, Optional.ofNullable(customDataNextLink), Collections.emptyList(), options); } /** * “Custom data when connection type is set to Citrix. This collection can contain a * maximum of 25 elements.” * * @return property customKeyValueData */ @Property(name="customKeyValueData") @JsonIgnore public CollectionPage getCustomKeyValueData() { return new CollectionPage(contextPath, KeyValuePair.class, this.customKeyValueData, Optional.ofNullable(customKeyValueDataNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY); } /** * Returns an immutable copy of {@code this} with just the {@code * customKeyValueData} 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. *

* “Custom data when connection type is set to Citrix. This collection can contain a * maximum of 25 elements.” * * @param customKeyValueData * new value of {@code customKeyValueData} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code customKeyValueData} field changed */ public AndroidWorkProfileVpnConfiguration withCustomKeyValueData(List customKeyValueData) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("customKeyValueData"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.customKeyValueData = customKeyValueData; return _x; } /** * “Custom data when connection type is set to Citrix. This collection can contain a * maximum of 25 elements.” * * @param options * specify connect and read timeouts * @return property customKeyValueData */ @Property(name="customKeyValueData") @JsonIgnore public CollectionPage getCustomKeyValueData(HttpRequestOptions options) { return new CollectionPage(contextPath, KeyValuePair.class, this.customKeyValueData, Optional.ofNullable(customKeyValueDataNextLink), Collections.emptyList(), options); } /** * “Fingerprint is a string that will be used to verify the VPN server can be * trusted, which is only applicable when connection type is Check Point Capsule * VPN.” * * @return property fingerprint */ @Property(name="fingerprint") @JsonIgnore public Optional getFingerprint() { return Optional.ofNullable(fingerprint); } /** * Returns an immutable copy of {@code this} with just the {@code fingerprint} * 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. *

* “Fingerprint is a string that will be used to verify the VPN server can be * trusted, which is only applicable when connection type is Check Point Capsule * VPN.” * * @param fingerprint * new value of {@code fingerprint} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code fingerprint} field changed */ public AndroidWorkProfileVpnConfiguration withFingerprint(String fingerprint) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("fingerprint"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.fingerprint = fingerprint; return _x; } /** * “Microsoft Tunnel site ID.” * * @return property microsoftTunnelSiteId */ @Property(name="microsoftTunnelSiteId") @JsonIgnore public Optional getMicrosoftTunnelSiteId() { return Optional.ofNullable(microsoftTunnelSiteId); } /** * Returns an immutable copy of {@code this} with just the {@code * microsoftTunnelSiteId} 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. *

* “Microsoft Tunnel site ID.” * * @param microsoftTunnelSiteId * new value of {@code microsoftTunnelSiteId} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code microsoftTunnelSiteId} field changed */ public AndroidWorkProfileVpnConfiguration withMicrosoftTunnelSiteId(String microsoftTunnelSiteId) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("microsoftTunnelSiteId"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.microsoftTunnelSiteId = microsoftTunnelSiteId; return _x; } /** * “Proxy server.” * * @return property proxyServer */ @Property(name="proxyServer") @JsonIgnore public Optional getProxyServer() { return Optional.ofNullable(proxyServer); } /** * Returns an immutable copy of {@code this} with just the {@code proxyServer} * 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. *

* “Proxy server.” * * @param proxyServer * new value of {@code proxyServer} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code proxyServer} field changed */ public AndroidWorkProfileVpnConfiguration withProxyServer(VpnProxyServer proxyServer) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("proxyServer"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.proxyServer = proxyServer; return _x; } /** * “Realm when connection type is set to Pulse Secure.” * * @return property realm */ @Property(name="realm") @JsonIgnore public Optional getRealm() { return Optional.ofNullable(realm); } /** * Returns an immutable copy of {@code this} with just the {@code realm} 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. *

* “Realm when connection type is set to Pulse Secure.” * * @param realm * new value of {@code realm} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code realm} field changed */ public AndroidWorkProfileVpnConfiguration withRealm(String realm) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("realm"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.realm = realm; return _x; } /** * “Role when connection type is set to Pulse Secure.” * * @return property role */ @Property(name="role") @JsonIgnore public Optional getRole() { return Optional.ofNullable(role); } /** * Returns an immutable copy of {@code this} with just the {@code role} 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. *

* “Role when connection type is set to Pulse Secure.” * * @param role * new value of {@code role} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code role} field changed */ public AndroidWorkProfileVpnConfiguration withRole(String role) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("role"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.role = role; return _x; } /** * “List of VPN Servers on the network. Make sure end users can access these network * locations. This collection can contain a maximum of 500 elements.” * * @return property servers */ @Property(name="servers") @JsonIgnore public CollectionPage getServers() { return new CollectionPage(contextPath, VpnServer.class, this.servers, Optional.ofNullable(serversNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY); } /** * Returns an immutable copy of {@code this} with just the {@code servers} 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. *

* “List of VPN Servers on the network. Make sure end users can access these network * locations. This collection can contain a maximum of 500 elements.” * * @param servers * new value of {@code servers} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code servers} field changed */ public AndroidWorkProfileVpnConfiguration withServers(List servers) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("servers"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.servers = servers; return _x; } /** * “List of VPN Servers on the network. Make sure end users can access these network * locations. This collection can contain a maximum of 500 elements.” * * @param options * specify connect and read timeouts * @return property servers */ @Property(name="servers") @JsonIgnore public CollectionPage getServers(HttpRequestOptions options) { return new CollectionPage(contextPath, VpnServer.class, this.servers, Optional.ofNullable(serversNextLink), Collections.emptyList(), options); } /** * “Targeted mobile apps. This collection can contain a maximum of 500 elements.” * * @return property targetedMobileApps */ @Property(name="targetedMobileApps") @JsonIgnore public CollectionPage getTargetedMobileApps() { return new CollectionPage(contextPath, AppListItem.class, this.targetedMobileApps, Optional.ofNullable(targetedMobileAppsNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY); } /** * Returns an immutable copy of {@code this} with just the {@code * targetedMobileApps} 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. *

* “Targeted mobile apps. This collection can contain a maximum of 500 elements.” * * @param targetedMobileApps * new value of {@code targetedMobileApps} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code targetedMobileApps} field changed */ public AndroidWorkProfileVpnConfiguration withTargetedMobileApps(List targetedMobileApps) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("targetedMobileApps"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.targetedMobileApps = targetedMobileApps; return _x; } /** * “Targeted mobile apps. This collection can contain a maximum of 500 elements.” * * @param options * specify connect and read timeouts * @return property targetedMobileApps */ @Property(name="targetedMobileApps") @JsonIgnore public CollectionPage getTargetedMobileApps(HttpRequestOptions options) { return new CollectionPage(contextPath, AppListItem.class, this.targetedMobileApps, Optional.ofNullable(targetedMobileAppsNextLink), Collections.emptyList(), options); } /** * “Targeted App package IDs.” * * @return property targetedPackageIds */ @Property(name="targetedPackageIds") @JsonIgnore public CollectionPage getTargetedPackageIds() { return new CollectionPage(contextPath, String.class, this.targetedPackageIds, Optional.ofNullable(targetedPackageIdsNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY); } /** * Returns an immutable copy of {@code this} with just the {@code * targetedPackageIds} 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. *

* “Targeted App package IDs.” * * @param targetedPackageIds * new value of {@code targetedPackageIds} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code targetedPackageIds} field changed */ public AndroidWorkProfileVpnConfiguration withTargetedPackageIds(List targetedPackageIds) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = changedFields.add("targetedPackageIds"); _x.odataType = Util.nvl(odataType, "microsoft.graph.androidWorkProfileVpnConfiguration"); _x.targetedPackageIds = targetedPackageIds; return _x; } /** * “Targeted App package IDs.” * * @param options * specify connect and read timeouts * @return property targetedPackageIds */ @Property(name="targetedPackageIds") @JsonIgnore public CollectionPage getTargetedPackageIds(HttpRequestOptions options) { return new CollectionPage(contextPath, String.class, this.targetedPackageIds, Optional.ofNullable(targetedPackageIdsNextLink), Collections.emptyList(), options); } public AndroidWorkProfileVpnConfiguration withUnmappedField(String name, String value) { AndroidWorkProfileVpnConfiguration _x = _copy(); _x.setUnmappedField(name, value); return _x; } /** * “Identity certificate for client authentication when authentication method is * certificate.” * * @return navigational property identityCertificate */ @NavigationProperty(name="identityCertificate") @JsonIgnore public AndroidWorkProfileCertificateProfileBaseRequest getIdentityCertificate() { return new AndroidWorkProfileCertificateProfileBaseRequest(contextPath.addSegment("identityCertificate"), RequestHelper.getValue(unmappedFields, "identityCertificate")); } @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 AndroidWorkProfileVpnConfiguration patch() { RequestHelper.patch(this, contextPath, RequestOptions.EMPTY); AndroidWorkProfileVpnConfiguration _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 AndroidWorkProfileVpnConfiguration put() { RequestHelper.put(this, contextPath, RequestOptions.EMPTY); AndroidWorkProfileVpnConfiguration _x = _copy(); _x.changedFields = null; return _x; } private AndroidWorkProfileVpnConfiguration _copy() { AndroidWorkProfileVpnConfiguration _x = new AndroidWorkProfileVpnConfiguration(); _x.contextPath = contextPath; _x.changedFields = changedFields; _x.unmappedFields = unmappedFields.copy(); _x.odataType = odataType; _x.id = id; _x.createdDateTime = createdDateTime; _x.description = description; _x.deviceManagementApplicabilityRuleDeviceMode = deviceManagementApplicabilityRuleDeviceMode; _x.deviceManagementApplicabilityRuleOsEdition = deviceManagementApplicabilityRuleOsEdition; _x.deviceManagementApplicabilityRuleOsVersion = deviceManagementApplicabilityRuleOsVersion; _x.displayName = displayName; _x.lastModifiedDateTime = lastModifiedDateTime; _x.roleScopeTagIds = roleScopeTagIds; _x.supportsScopeTags = supportsScopeTags; _x.version = version; _x.alwaysOn = alwaysOn; _x.alwaysOnLockdown = alwaysOnLockdown; _x.authenticationMethod = authenticationMethod; _x.connectionName = connectionName; _x.connectionType = connectionType; _x.customData = customData; _x.customKeyValueData = customKeyValueData; _x.fingerprint = fingerprint; _x.microsoftTunnelSiteId = microsoftTunnelSiteId; _x.proxyServer = proxyServer; _x.realm = realm; _x.role = role; _x.servers = servers; _x.targetedMobileApps = targetedMobileApps; _x.targetedPackageIds = targetedPackageIds; return _x; } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("AndroidWorkProfileVpnConfiguration["); b.append("id="); b.append(this.id); b.append(", "); b.append("createdDateTime="); b.append(this.createdDateTime); b.append(", "); b.append("description="); b.append(this.description); b.append(", "); b.append("deviceManagementApplicabilityRuleDeviceMode="); b.append(this.deviceManagementApplicabilityRuleDeviceMode); b.append(", "); b.append("deviceManagementApplicabilityRuleOsEdition="); b.append(this.deviceManagementApplicabilityRuleOsEdition); b.append(", "); b.append("deviceManagementApplicabilityRuleOsVersion="); b.append(this.deviceManagementApplicabilityRuleOsVersion); b.append(", "); b.append("displayName="); b.append(this.displayName); b.append(", "); b.append("lastModifiedDateTime="); b.append(this.lastModifiedDateTime); b.append(", "); b.append("roleScopeTagIds="); b.append(this.roleScopeTagIds); b.append(", "); b.append("supportsScopeTags="); b.append(this.supportsScopeTags); b.append(", "); b.append("version="); b.append(this.version); b.append(", "); b.append("alwaysOn="); b.append(this.alwaysOn); b.append(", "); b.append("alwaysOnLockdown="); b.append(this.alwaysOnLockdown); b.append(", "); b.append("authenticationMethod="); b.append(this.authenticationMethod); b.append(", "); b.append("connectionName="); b.append(this.connectionName); b.append(", "); b.append("connectionType="); b.append(this.connectionType); b.append(", "); b.append("customData="); b.append(this.customData); b.append(", "); b.append("customKeyValueData="); b.append(this.customKeyValueData); b.append(", "); b.append("fingerprint="); b.append(this.fingerprint); b.append(", "); b.append("microsoftTunnelSiteId="); b.append(this.microsoftTunnelSiteId); b.append(", "); b.append("proxyServer="); b.append(this.proxyServer); b.append(", "); b.append("realm="); b.append(this.realm); b.append(", "); b.append("role="); b.append(this.role); b.append(", "); b.append("servers="); b.append(this.servers); b.append(", "); b.append("targetedMobileApps="); b.append(this.targetedMobileApps); b.append(", "); b.append("targetedPackageIds="); b.append(this.targetedPackageIds); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy