-
Notifications
You must be signed in to change notification settings - Fork 461
Expand file tree
/
Copy pathOAuthCredential.php
More file actions
106 lines (94 loc) · 3.37 KB
/
OAuthCredential.php
File metadata and controls
106 lines (94 loc) · 3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/devtools/cloudbuild/v2/repositories.proto
namespace Google\Cloud\Build\V2;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;
/**
* Represents an OAuth token of the account that authorized the Connection,
* and associated metadata.
*
* Generated from protobuf message <code>google.devtools.cloudbuild.v2.OAuthCredential</code>
*/
class OAuthCredential extends \Google\Protobuf\Internal\Message
{
/**
* A SecretManager resource containing the OAuth token that authorizes
* the Cloud Build connection. Format: `projects/{@*}secrets/{@*}versions/*`.
*
* Generated from protobuf field <code>string oauth_token_secret_version = 1 [(.google.api.resource_reference) = {</code>
*/
protected $oauth_token_secret_version = '';
/**
* Output only. The username associated to this token.
*
* Generated from protobuf field <code>string username = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $username = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $oauth_token_secret_version
* A SecretManager resource containing the OAuth token that authorizes
* the Cloud Build connection. Format: `projects/{@*}secrets/{@*}versions/*`.
* @type string $username
* Output only. The username associated to this token.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Devtools\Cloudbuild\V2\Repositories::initOnce();
parent::__construct($data);
}
/**
* A SecretManager resource containing the OAuth token that authorizes
* the Cloud Build connection. Format: `projects/{@*}secrets/{@*}versions/*`.
*
* Generated from protobuf field <code>string oauth_token_secret_version = 1 [(.google.api.resource_reference) = {</code>
* @return string
*/
public function getOauthTokenSecretVersion()
{
return $this->oauth_token_secret_version;
}
/**
* A SecretManager resource containing the OAuth token that authorizes
* the Cloud Build connection. Format: `projects/{@*}secrets/{@*}versions/*`.
*
* Generated from protobuf field <code>string oauth_token_secret_version = 1 [(.google.api.resource_reference) = {</code>
* @param string $var
* @return $this
*/
public function setOauthTokenSecretVersion($var)
{
GPBUtil::checkString($var, True);
$this->oauth_token_secret_version = $var;
return $this;
}
/**
* Output only. The username associated to this token.
*
* Generated from protobuf field <code>string username = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return string
*/
public function getUsername()
{
return $this->username;
}
/**
* Output only. The username associated to this token.
*
* Generated from protobuf field <code>string username = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param string $var
* @return $this
*/
public function setUsername($var)
{
GPBUtil::checkString($var, True);
$this->username = $var;
return $this;
}
}