From aa62991dc2d9b7df26abbb19306564fabdffdee9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 17:39:55 -0700 Subject: [PATCH] feat: Add support for primary_admin_email as customer_identity for ImportCustomer (#7727) feat: Add support for importing team customer from a different reseller feat: Add support to look up team customer Cloud Identity information docs: Clarify the expected value of the domain field for team type customers PiperOrigin-RevId: 682051698 Source-Link: https://github.com/googleapis/googleapis/commit/b6a27d13a2f0223051ef720e4e9d0d52323560e6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/efd321b69d8e4032c2690c19e8131d7b1702f977 Copy-Tag: eyJwIjoiQ2hhbm5lbC8uT3dsQm90LnlhbWwiLCJoIjoiZWZkMzIxYjY5ZDhlNDAzMmMyNjkwYzE5ZTgxMzFkN2IxNzAyZjk3NyJ9 --- Channel/metadata/V1/Service.php | Bin 24151 -> 24345 bytes .../check_cloud_identity_accounts_exist.php | 4 +- ...CheckCloudIdentityAccountsExistRequest.php | 54 ++++++++++++- .../src/V1/CloudIdentityCustomerAccount.php | 72 ++++++++++++++++++ Channel/src/V1/ImportCustomerRequest.php | 33 ++++++++ 5 files changed, 158 insertions(+), 5 deletions(-) diff --git a/Channel/metadata/V1/Service.php b/Channel/metadata/V1/Service.php index 71319ee1a15dbad3afaf2751feef1f276169fc1b..7e02d5f6bc992a865e762c134476649dee8c976b 100644 GIT binary patch delta 200 zcmcb`vj>{DLPx5CCl5Ltp>^ delta 53 zcmV-50LuTFz5&;~0kA3t1=_Cx3MG?K2pF?R29^Q=Qj^{YQUW4+lT`_Nvq}o}0s)qj LKn+r}whd!Z^du5L diff --git a/Channel/samples/V1/CloudChannelServiceClient/check_cloud_identity_accounts_exist.php b/Channel/samples/V1/CloudChannelServiceClient/check_cloud_identity_accounts_exist.php index 4397b7e99b51..4485be4347b3 100644 --- a/Channel/samples/V1/CloudChannelServiceClient/check_cloud_identity_accounts_exist.php +++ b/Channel/samples/V1/CloudChannelServiceClient/check_cloud_identity_accounts_exist.php @@ -51,7 +51,9 @@ * * @param string $parent The reseller account's resource name. * Parent uses the format: accounts/{account_id} - * @param string $domain Domain to fetch for Cloud Identity account customer. + * @param string $domain Domain to fetch for Cloud Identity account customers, including + * domain and team customers. For team customers, please use the domain for + * their emails. */ function check_cloud_identity_accounts_exist_sample(string $parent, string $domain): void { diff --git a/Channel/src/V1/CheckCloudIdentityAccountsExistRequest.php b/Channel/src/V1/CheckCloudIdentityAccountsExistRequest.php index 519cdf4fcaed..39dde78e6f22 100644 --- a/Channel/src/V1/CheckCloudIdentityAccountsExistRequest.php +++ b/Channel/src/V1/CheckCloudIdentityAccountsExistRequest.php @@ -24,11 +24,20 @@ class CheckCloudIdentityAccountsExistRequest extends \Google\Protobuf\Internal\M */ protected $parent = ''; /** - * Required. Domain to fetch for Cloud Identity account customer. + * Required. Domain to fetch for Cloud Identity account customers, including + * domain and team customers. For team customers, please use the domain for + * their emails. * * Generated from protobuf field string domain = 2 [(.google.api.field_behavior) = REQUIRED]; */ protected $domain = ''; + /** + * Optional. Primary admin email to fetch for Cloud Identity account team + * customer. + * + * Generated from protobuf field string primary_admin_email = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $primary_admin_email = ''; /** * Constructor. @@ -40,7 +49,12 @@ class CheckCloudIdentityAccountsExistRequest extends \Google\Protobuf\Internal\M * Required. The reseller account's resource name. * Parent uses the format: accounts/{account_id} * @type string $domain - * Required. Domain to fetch for Cloud Identity account customer. + * Required. Domain to fetch for Cloud Identity account customers, including + * domain and team customers. For team customers, please use the domain for + * their emails. + * @type string $primary_admin_email + * Optional. Primary admin email to fetch for Cloud Identity account team + * customer. * } */ public function __construct($data = NULL) { @@ -77,7 +91,9 @@ public function setParent($var) } /** - * Required. Domain to fetch for Cloud Identity account customer. + * Required. Domain to fetch for Cloud Identity account customers, including + * domain and team customers. For team customers, please use the domain for + * their emails. * * Generated from protobuf field string domain = 2 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -88,7 +104,9 @@ public function getDomain() } /** - * Required. Domain to fetch for Cloud Identity account customer. + * Required. Domain to fetch for Cloud Identity account customers, including + * domain and team customers. For team customers, please use the domain for + * their emails. * * Generated from protobuf field string domain = 2 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -102,5 +120,33 @@ public function setDomain($var) return $this; } + /** + * Optional. Primary admin email to fetch for Cloud Identity account team + * customer. + * + * Generated from protobuf field string primary_admin_email = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrimaryAdminEmail() + { + return $this->primary_admin_email; + } + + /** + * Optional. Primary admin email to fetch for Cloud Identity account team + * customer. + * + * Generated from protobuf field string primary_admin_email = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrimaryAdminEmail($var) + { + GPBUtil::checkString($var, True); + $this->primary_admin_email = $var; + + return $this; + } + } diff --git a/Channel/src/V1/CloudIdentityCustomerAccount.php b/Channel/src/V1/CloudIdentityCustomerAccount.php index a49e1dea73ac..d0826c87fe24 100644 --- a/Channel/src/V1/CloudIdentityCustomerAccount.php +++ b/Channel/src/V1/CloudIdentityCustomerAccount.php @@ -44,6 +44,19 @@ class CloudIdentityCustomerAccount extends \Google\Protobuf\Internal\Message * Generated from protobuf field string customer_cloud_identity_id = 4; */ protected $customer_cloud_identity_id = ''; + /** + * If existing = true, the type of the customer. + * + * Generated from protobuf field .google.cloud.channel.v1.CloudIdentityInfo.CustomerType customer_type = 5; + */ + protected $customer_type = 0; + /** + * If existing = true, and is 2-tier customer, the channel partner of the + * customer. + * + * Generated from protobuf field string channel_partner_cloud_identity_id = 6; + */ + protected $channel_partner_cloud_identity_id = ''; /** * Constructor. @@ -63,6 +76,11 @@ class CloudIdentityCustomerAccount extends \Google\Protobuf\Internal\Message * accounts/{account_id}/customers/{customer_id} * @type string $customer_cloud_identity_id * If existing = true, the Cloud Identity ID of the customer. + * @type int $customer_type + * If existing = true, the type of the customer. + * @type string $channel_partner_cloud_identity_id + * If existing = true, and is 2-tier customer, the channel partner of the + * customer. * } */ public function __construct($data = NULL) { @@ -182,5 +200,59 @@ public function setCustomerCloudIdentityId($var) return $this; } + /** + * If existing = true, the type of the customer. + * + * Generated from protobuf field .google.cloud.channel.v1.CloudIdentityInfo.CustomerType customer_type = 5; + * @return int + */ + public function getCustomerType() + { + return $this->customer_type; + } + + /** + * If existing = true, the type of the customer. + * + * Generated from protobuf field .google.cloud.channel.v1.CloudIdentityInfo.CustomerType customer_type = 5; + * @param int $var + * @return $this + */ + public function setCustomerType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Channel\V1\CloudIdentityInfo\CustomerType::class); + $this->customer_type = $var; + + return $this; + } + + /** + * If existing = true, and is 2-tier customer, the channel partner of the + * customer. + * + * Generated from protobuf field string channel_partner_cloud_identity_id = 6; + * @return string + */ + public function getChannelPartnerCloudIdentityId() + { + return $this->channel_partner_cloud_identity_id; + } + + /** + * If existing = true, and is 2-tier customer, the channel partner of the + * customer. + * + * Generated from protobuf field string channel_partner_cloud_identity_id = 6; + * @param string $var + * @return $this + */ + public function setChannelPartnerCloudIdentityId($var) + { + GPBUtil::checkString($var, True); + $this->channel_partner_cloud_identity_id = $var; + + return $this; + } + } diff --git a/Channel/src/V1/ImportCustomerRequest.php b/Channel/src/V1/ImportCustomerRequest.php index b33687134d58..66b9c2eb6a15 100644 --- a/Channel/src/V1/ImportCustomerRequest.php +++ b/Channel/src/V1/ImportCustomerRequest.php @@ -70,6 +70,8 @@ class ImportCustomerRequest extends \Google\Protobuf\Internal\Message * Required. Customer domain. * @type string $cloud_identity_id * Required. Customer's Cloud Identity ID + * @type string $primary_admin_email + * Required. Customer's primary admin email. * @type string $parent * Required. The resource name of the reseller's account. * Parent takes the format: accounts/{account_id} or @@ -161,6 +163,37 @@ public function setCloudIdentityId($var) return $this; } + /** + * Required. Customer's primary admin email. + * + * Generated from protobuf field string primary_admin_email = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrimaryAdminEmail() + { + return $this->readOneof(8); + } + + public function hasPrimaryAdminEmail() + { + return $this->hasOneof(8); + } + + /** + * Required. Customer's primary admin email. + * + * Generated from protobuf field string primary_admin_email = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrimaryAdminEmail($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(8, $var); + + return $this; + } + /** * Required. The resource name of the reseller's account. * Parent takes the format: accounts/{account_id} or