|
| 1 | +<?php |
| 2 | +/* |
| 3 | + * Copyright 2014 Google Inc. |
| 4 | + * |
| 5 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 6 | + * use this file except in compliance with the License. You may obtain a copy of |
| 7 | + * the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 13 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 14 | + * License for the specific language governing permissions and limitations under |
| 15 | + * the License. |
| 16 | + */ |
| 17 | + |
| 18 | +namespace Google\Service\AndroidManagement; |
| 19 | + |
| 20 | +class PrivateDnsSettings extends \Google\Model |
| 21 | +{ |
| 22 | + /** |
| 23 | + * Unspecified. Defaults to PRIVATE_DNS_USER_CHOICE. |
| 24 | + */ |
| 25 | + public const PRIVATE_DNS_MODE_PRIVATE_DNS_MODE_UNSPECIFIED = 'PRIVATE_DNS_MODE_UNSPECIFIED'; |
| 26 | + /** |
| 27 | + * The user is allowed to configure private DNS. |
| 28 | + */ |
| 29 | + public const PRIVATE_DNS_MODE_PRIVATE_DNS_USER_CHOICE = 'PRIVATE_DNS_USER_CHOICE'; |
| 30 | + /** |
| 31 | + * Automatic private DNS mode. The device tries to use the network-provided |
| 32 | + * DNS server over an encrypted connection before resorting to cleartext. The |
| 33 | + * user is not allowed to modify this setting. Supported on Android 10 and |
| 34 | + * above on fully managed devices and work profiles on company-owned devices. |
| 35 | + * A NonComplianceDetail with MANAGEMENT_MODE is reported on other management |
| 36 | + * modes. A NonComplianceDetail with API_LEVEL is reported if the Android |
| 37 | + * version is less than 10. A NonComplianceReason with INVALID_VALUE is |
| 38 | + * reported if setting this fails for any other reason.Note: For work profiles |
| 39 | + * on company-owned devices, setting this mode prevents the user from changing |
| 40 | + * the setting, but the active private DNS setting is not modified. A |
| 41 | + * NonComplianceDetail with MANAGEMENT_MODE is reported in this case. |
| 42 | + */ |
| 43 | + public const PRIVATE_DNS_MODE_PRIVATE_DNS_AUTOMATIC = 'PRIVATE_DNS_AUTOMATIC'; |
| 44 | + /** |
| 45 | + * The device only uses the DNS server specified in private_dns_host. The user |
| 46 | + * is not allowed to modify this setting. If this is set, then |
| 47 | + * private_dns_host must be set. Supported on Android 10 and above on fully |
| 48 | + * managed devices. A NonComplianceDetail with MANAGEMENT_MODE is reported on |
| 49 | + * other management modes. A NonComplianceDetail with API_LEVEL is reported if |
| 50 | + * the Android version is less than 10. |
| 51 | + */ |
| 52 | + public const PRIVATE_DNS_MODE_PRIVATE_DNS_SPECIFIED_HOST = 'PRIVATE_DNS_SPECIFIED_HOST'; |
| 53 | + /** |
| 54 | + * Optional. The hostname of the DNS server. This must be set if and only if |
| 55 | + * private_dns_mode is set to PRIVATE_DNS_SPECIFIED_HOST. Supported on Android |
| 56 | + * 10 and above on fully managed devices. A NonComplianceDetail with |
| 57 | + * MANAGEMENT_MODE is reported on other management modes. A |
| 58 | + * NonComplianceDetail with API_LEVEL is reported if the Android version is |
| 59 | + * less than 10. A NonComplianceDetail with PENDING is reported if the device |
| 60 | + * is not connected to a network. A NonComplianceDetail with |
| 61 | + * nonComplianceReason INVALID_VALUE and specificNonComplianceReason |
| 62 | + * PRIVATE_DNS_HOST_NOT_SERVING is reported if the specified host is not a DNS |
| 63 | + * server or not supported on Android. A NonComplianceReason with |
| 64 | + * nonComplianceReason INVALID_VALUE is reported if applying this setting |
| 65 | + * fails for any other reason. |
| 66 | + * |
| 67 | + * @var string |
| 68 | + */ |
| 69 | + public $privateDnsHost; |
| 70 | + /** |
| 71 | + * Optional. The configuration mode for device's global private DNS settings. |
| 72 | + * If this is set to PRIVATE_DNS_SPECIFIED_HOST, then private_dns_host must be |
| 73 | + * set. |
| 74 | + * |
| 75 | + * @var string |
| 76 | + */ |
| 77 | + public $privateDnsMode; |
| 78 | + |
| 79 | + /** |
| 80 | + * Optional. The hostname of the DNS server. This must be set if and only if |
| 81 | + * private_dns_mode is set to PRIVATE_DNS_SPECIFIED_HOST. Supported on Android |
| 82 | + * 10 and above on fully managed devices. A NonComplianceDetail with |
| 83 | + * MANAGEMENT_MODE is reported on other management modes. A |
| 84 | + * NonComplianceDetail with API_LEVEL is reported if the Android version is |
| 85 | + * less than 10. A NonComplianceDetail with PENDING is reported if the device |
| 86 | + * is not connected to a network. A NonComplianceDetail with |
| 87 | + * nonComplianceReason INVALID_VALUE and specificNonComplianceReason |
| 88 | + * PRIVATE_DNS_HOST_NOT_SERVING is reported if the specified host is not a DNS |
| 89 | + * server or not supported on Android. A NonComplianceReason with |
| 90 | + * nonComplianceReason INVALID_VALUE is reported if applying this setting |
| 91 | + * fails for any other reason. |
| 92 | + * |
| 93 | + * @param string $privateDnsHost |
| 94 | + */ |
| 95 | + public function setPrivateDnsHost($privateDnsHost) |
| 96 | + { |
| 97 | + $this->privateDnsHost = $privateDnsHost; |
| 98 | + } |
| 99 | + /** |
| 100 | + * @return string |
| 101 | + */ |
| 102 | + public function getPrivateDnsHost() |
| 103 | + { |
| 104 | + return $this->privateDnsHost; |
| 105 | + } |
| 106 | + /** |
| 107 | + * Optional. The configuration mode for device's global private DNS settings. |
| 108 | + * If this is set to PRIVATE_DNS_SPECIFIED_HOST, then private_dns_host must be |
| 109 | + * set. |
| 110 | + * |
| 111 | + * Accepted values: PRIVATE_DNS_MODE_UNSPECIFIED, PRIVATE_DNS_USER_CHOICE, |
| 112 | + * PRIVATE_DNS_AUTOMATIC, PRIVATE_DNS_SPECIFIED_HOST |
| 113 | + * |
| 114 | + * @param self::PRIVATE_DNS_MODE_* $privateDnsMode |
| 115 | + */ |
| 116 | + public function setPrivateDnsMode($privateDnsMode) |
| 117 | + { |
| 118 | + $this->privateDnsMode = $privateDnsMode; |
| 119 | + } |
| 120 | + /** |
| 121 | + * @return self::PRIVATE_DNS_MODE_* |
| 122 | + */ |
| 123 | + public function getPrivateDnsMode() |
| 124 | + { |
| 125 | + return $this->privateDnsMode; |
| 126 | + } |
| 127 | +} |
| 128 | + |
| 129 | +// Adding a class alias for backwards compatibility with the previous class name. |
| 130 | +class_alias(PrivateDnsSettings::class, 'Google_Service_AndroidManagement_PrivateDnsSettings'); |
0 commit comments