|
| 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\DeveloperConnect; |
| 19 | + |
| 20 | +class CustomOAuthConfig extends \Google\Collection |
| 21 | +{ |
| 22 | + /** |
| 23 | + * The SCM is not specified or BYO Account Connector is not an SCM. |
| 24 | + */ |
| 25 | + public const SCM_PROVIDER_SCM_PROVIDER_UNKNOWN = 'SCM_PROVIDER_UNKNOWN'; |
| 26 | + /** |
| 27 | + * BYO Account Connector is an instance of GitHub Enterprise. |
| 28 | + */ |
| 29 | + public const SCM_PROVIDER_GITHUB_ENTERPRISE = 'GITHUB_ENTERPRISE'; |
| 30 | + /** |
| 31 | + * BYO Account Connector is an instance of GitLab Enterprise. |
| 32 | + */ |
| 33 | + public const SCM_PROVIDER_GITLAB_ENTERPRISE = 'GITLAB_ENTERPRISE'; |
| 34 | + /** |
| 35 | + * BYO Account Connector is an instance of Bitbucket Data Center. |
| 36 | + */ |
| 37 | + public const SCM_PROVIDER_BITBUCKET_DATA_CENTER = 'BITBUCKET_DATA_CENTER'; |
| 38 | + protected $collection_key = 'scopes'; |
| 39 | + /** |
| 40 | + * Required. Immutable. The OAuth2 authorization server URL. |
| 41 | + * |
| 42 | + * @var string |
| 43 | + */ |
| 44 | + public $authUri; |
| 45 | + /** |
| 46 | + * Required. The client ID of the OAuth application. |
| 47 | + * |
| 48 | + * @var string |
| 49 | + */ |
| 50 | + public $clientId; |
| 51 | + /** |
| 52 | + * Required. Input only. The client secret of the OAuth application. It will |
| 53 | + * be provided as plain text, but encrypted and stored in developer connect. |
| 54 | + * As INPUT_ONLY field, it will not be included in the output. |
| 55 | + * |
| 56 | + * @var string |
| 57 | + */ |
| 58 | + public $clientSecret; |
| 59 | + /** |
| 60 | + * Required. The host URI of the OAuth application. |
| 61 | + * |
| 62 | + * @var string |
| 63 | + */ |
| 64 | + public $hostUri; |
| 65 | + /** |
| 66 | + * Optional. Disable PKCE for this OAuth config. PKCE is enabled by default. |
| 67 | + * |
| 68 | + * @var bool |
| 69 | + */ |
| 70 | + public $pkceDisabled; |
| 71 | + /** |
| 72 | + * Required. The type of the SCM provider. |
| 73 | + * |
| 74 | + * @var string |
| 75 | + */ |
| 76 | + public $scmProvider; |
| 77 | + /** |
| 78 | + * Required. The scopes to be requested during OAuth. |
| 79 | + * |
| 80 | + * @var string[] |
| 81 | + */ |
| 82 | + public $scopes; |
| 83 | + /** |
| 84 | + * Output only. SCM server version installed at the host URI. |
| 85 | + * |
| 86 | + * @var string |
| 87 | + */ |
| 88 | + public $serverVersion; |
| 89 | + protected $serviceDirectoryConfigType = ServiceDirectoryConfig::class; |
| 90 | + protected $serviceDirectoryConfigDataType = ''; |
| 91 | + /** |
| 92 | + * Optional. SSL certificate to use for requests to a private service. |
| 93 | + * |
| 94 | + * @var string |
| 95 | + */ |
| 96 | + public $sslCaCertificate; |
| 97 | + /** |
| 98 | + * Required. Immutable. The OAuth2 token request URL. |
| 99 | + * |
| 100 | + * @var string |
| 101 | + */ |
| 102 | + public $tokenUri; |
| 103 | + |
| 104 | + /** |
| 105 | + * Required. Immutable. The OAuth2 authorization server URL. |
| 106 | + * |
| 107 | + * @param string $authUri |
| 108 | + */ |
| 109 | + public function setAuthUri($authUri) |
| 110 | + { |
| 111 | + $this->authUri = $authUri; |
| 112 | + } |
| 113 | + /** |
| 114 | + * @return string |
| 115 | + */ |
| 116 | + public function getAuthUri() |
| 117 | + { |
| 118 | + return $this->authUri; |
| 119 | + } |
| 120 | + /** |
| 121 | + * Required. The client ID of the OAuth application. |
| 122 | + * |
| 123 | + * @param string $clientId |
| 124 | + */ |
| 125 | + public function setClientId($clientId) |
| 126 | + { |
| 127 | + $this->clientId = $clientId; |
| 128 | + } |
| 129 | + /** |
| 130 | + * @return string |
| 131 | + */ |
| 132 | + public function getClientId() |
| 133 | + { |
| 134 | + return $this->clientId; |
| 135 | + } |
| 136 | + /** |
| 137 | + * Required. Input only. The client secret of the OAuth application. It will |
| 138 | + * be provided as plain text, but encrypted and stored in developer connect. |
| 139 | + * As INPUT_ONLY field, it will not be included in the output. |
| 140 | + * |
| 141 | + * @param string $clientSecret |
| 142 | + */ |
| 143 | + public function setClientSecret($clientSecret) |
| 144 | + { |
| 145 | + $this->clientSecret = $clientSecret; |
| 146 | + } |
| 147 | + /** |
| 148 | + * @return string |
| 149 | + */ |
| 150 | + public function getClientSecret() |
| 151 | + { |
| 152 | + return $this->clientSecret; |
| 153 | + } |
| 154 | + /** |
| 155 | + * Required. The host URI of the OAuth application. |
| 156 | + * |
| 157 | + * @param string $hostUri |
| 158 | + */ |
| 159 | + public function setHostUri($hostUri) |
| 160 | + { |
| 161 | + $this->hostUri = $hostUri; |
| 162 | + } |
| 163 | + /** |
| 164 | + * @return string |
| 165 | + */ |
| 166 | + public function getHostUri() |
| 167 | + { |
| 168 | + return $this->hostUri; |
| 169 | + } |
| 170 | + /** |
| 171 | + * Optional. Disable PKCE for this OAuth config. PKCE is enabled by default. |
| 172 | + * |
| 173 | + * @param bool $pkceDisabled |
| 174 | + */ |
| 175 | + public function setPkceDisabled($pkceDisabled) |
| 176 | + { |
| 177 | + $this->pkceDisabled = $pkceDisabled; |
| 178 | + } |
| 179 | + /** |
| 180 | + * @return bool |
| 181 | + */ |
| 182 | + public function getPkceDisabled() |
| 183 | + { |
| 184 | + return $this->pkceDisabled; |
| 185 | + } |
| 186 | + /** |
| 187 | + * Required. The type of the SCM provider. |
| 188 | + * |
| 189 | + * Accepted values: SCM_PROVIDER_UNKNOWN, GITHUB_ENTERPRISE, |
| 190 | + * GITLAB_ENTERPRISE, BITBUCKET_DATA_CENTER |
| 191 | + * |
| 192 | + * @param self::SCM_PROVIDER_* $scmProvider |
| 193 | + */ |
| 194 | + public function setScmProvider($scmProvider) |
| 195 | + { |
| 196 | + $this->scmProvider = $scmProvider; |
| 197 | + } |
| 198 | + /** |
| 199 | + * @return self::SCM_PROVIDER_* |
| 200 | + */ |
| 201 | + public function getScmProvider() |
| 202 | + { |
| 203 | + return $this->scmProvider; |
| 204 | + } |
| 205 | + /** |
| 206 | + * Required. The scopes to be requested during OAuth. |
| 207 | + * |
| 208 | + * @param string[] $scopes |
| 209 | + */ |
| 210 | + public function setScopes($scopes) |
| 211 | + { |
| 212 | + $this->scopes = $scopes; |
| 213 | + } |
| 214 | + /** |
| 215 | + * @return string[] |
| 216 | + */ |
| 217 | + public function getScopes() |
| 218 | + { |
| 219 | + return $this->scopes; |
| 220 | + } |
| 221 | + /** |
| 222 | + * Output only. SCM server version installed at the host URI. |
| 223 | + * |
| 224 | + * @param string $serverVersion |
| 225 | + */ |
| 226 | + public function setServerVersion($serverVersion) |
| 227 | + { |
| 228 | + $this->serverVersion = $serverVersion; |
| 229 | + } |
| 230 | + /** |
| 231 | + * @return string |
| 232 | + */ |
| 233 | + public function getServerVersion() |
| 234 | + { |
| 235 | + return $this->serverVersion; |
| 236 | + } |
| 237 | + /** |
| 238 | + * Optional. Configuration for using Service Directory to connect to a private |
| 239 | + * service. |
| 240 | + * |
| 241 | + * @param ServiceDirectoryConfig $serviceDirectoryConfig |
| 242 | + */ |
| 243 | + public function setServiceDirectoryConfig(ServiceDirectoryConfig $serviceDirectoryConfig) |
| 244 | + { |
| 245 | + $this->serviceDirectoryConfig = $serviceDirectoryConfig; |
| 246 | + } |
| 247 | + /** |
| 248 | + * @return ServiceDirectoryConfig |
| 249 | + */ |
| 250 | + public function getServiceDirectoryConfig() |
| 251 | + { |
| 252 | + return $this->serviceDirectoryConfig; |
| 253 | + } |
| 254 | + /** |
| 255 | + * Optional. SSL certificate to use for requests to a private service. |
| 256 | + * |
| 257 | + * @param string $sslCaCertificate |
| 258 | + */ |
| 259 | + public function setSslCaCertificate($sslCaCertificate) |
| 260 | + { |
| 261 | + $this->sslCaCertificate = $sslCaCertificate; |
| 262 | + } |
| 263 | + /** |
| 264 | + * @return string |
| 265 | + */ |
| 266 | + public function getSslCaCertificate() |
| 267 | + { |
| 268 | + return $this->sslCaCertificate; |
| 269 | + } |
| 270 | + /** |
| 271 | + * Required. Immutable. The OAuth2 token request URL. |
| 272 | + * |
| 273 | + * @param string $tokenUri |
| 274 | + */ |
| 275 | + public function setTokenUri($tokenUri) |
| 276 | + { |
| 277 | + $this->tokenUri = $tokenUri; |
| 278 | + } |
| 279 | + /** |
| 280 | + * @return string |
| 281 | + */ |
| 282 | + public function getTokenUri() |
| 283 | + { |
| 284 | + return $this->tokenUri; |
| 285 | + } |
| 286 | +} |
| 287 | + |
| 288 | +// Adding a class alias for backwards compatibility with the previous class name. |
| 289 | +class_alias(CustomOAuthConfig::class, 'Google_Service_DeveloperConnect_CustomOAuthConfig'); |
0 commit comments