Skip to content

Commit c38431b

Browse files
feat: [google-cloud-channel] Add support for primary_admin_email as customer_identity for ImportCustomer (#13126)
BEGIN_COMMIT_OVERRIDE feat: Add support for primary_admin_email as customer_identity for ImportCustomer 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 END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. 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: googleapis/googleapis@b6a27d1 Source-Link: googleapis/googleapis-gen@efd321b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNoYW5uZWwvLk93bEJvdC55YW1sIiwiaCI6ImVmZDMyMWI2OWQ4ZTQwMzJjMjY5MGMxOWU4MTMxZDdiMTcwMmY5NzcifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: ohmayr <omairnaveed@ymail.com>
1 parent 8d79ca8 commit c38431b

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

packages/google-cloud-channel/google/cloud/channel_v1/types/service.py

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,12 @@ class CheckCloudIdentityAccountsExistRequest(proto.Message):
127127
the format: accounts/{account_id}
128128
domain (str):
129129
Required. Domain to fetch for Cloud Identity
130-
account customer.
130+
account customers, including domain and team
131+
customers. For team customers, please use the
132+
domain for their emails.
133+
primary_admin_email (str):
134+
Optional. Primary admin email to fetch for
135+
Cloud Identity account team customer.
131136
"""
132137

133138
parent: str = proto.Field(
@@ -138,6 +143,10 @@ class CheckCloudIdentityAccountsExistRequest(proto.Message):
138143
proto.STRING,
139144
number=2,
140145
)
146+
primary_admin_email: str = proto.Field(
147+
proto.STRING,
148+
number=4,
149+
)
141150

142151

143152
class CloudIdentityCustomerAccount(proto.Message):
@@ -159,6 +168,11 @@ class CloudIdentityCustomerAccount(proto.Message):
159168
customer_cloud_identity_id (str):
160169
If existing = true, the Cloud Identity ID of
161170
the customer.
171+
customer_type (google.cloud.channel_v1.types.CloudIdentityInfo.CustomerType):
172+
If existing = true, the type of the customer.
173+
channel_partner_cloud_identity_id (str):
174+
If existing = true, and is 2-tier customer,
175+
the channel partner of the customer.
162176
"""
163177

164178
existing: bool = proto.Field(
@@ -177,6 +191,15 @@ class CloudIdentityCustomerAccount(proto.Message):
177191
proto.STRING,
178192
number=4,
179193
)
194+
customer_type: common.CloudIdentityInfo.CustomerType = proto.Field(
195+
proto.ENUM,
196+
number=5,
197+
enum=common.CloudIdentityInfo.CustomerType,
198+
)
199+
channel_partner_cloud_identity_id: str = proto.Field(
200+
proto.STRING,
201+
number=6,
202+
)
180203

181204

182205
class CheckCloudIdentityAccountsExistResponse(proto.Message):
@@ -373,6 +396,10 @@ class ImportCustomerRequest(proto.Message):
373396
cloud_identity_id (str):
374397
Required. Customer's Cloud Identity ID
375398
399+
This field is a member of `oneof`_ ``customer_identity``.
400+
primary_admin_email (str):
401+
Required. Customer's primary admin email.
402+
376403
This field is a member of `oneof`_ ``customer_identity``.
377404
parent (str):
378405
Required. The resource name of the reseller's account.
@@ -413,6 +440,11 @@ class ImportCustomerRequest(proto.Message):
413440
number=3,
414441
oneof="customer_identity",
415442
)
443+
primary_admin_email: str = proto.Field(
444+
proto.STRING,
445+
number=8,
446+
oneof="customer_identity",
447+
)
416448
parent: str = proto.Field(
417449
proto.STRING,
418450
number=1,

packages/google-cloud-channel/scripts/fixup_channel_v1_keywords.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class channelCallTransformer(cst.CSTTransformer):
4444
'change_offer': ('name', 'offer', 'parameters', 'purchase_order_id', 'request_id', 'billing_account', ),
4545
'change_parameters': ('name', 'parameters', 'request_id', 'purchase_order_id', ),
4646
'change_renewal_settings': ('name', 'renewal_settings', 'request_id', ),
47-
'check_cloud_identity_accounts_exist': ('parent', 'domain', ),
47+
'check_cloud_identity_accounts_exist': ('parent', 'domain', 'primary_admin_email', ),
4848
'create_channel_partner_link': ('parent', 'channel_partner_link', ),
4949
'create_channel_partner_repricing_config': ('parent', 'channel_partner_repricing_config', ),
5050
'create_customer': ('parent', 'customer', ),
@@ -59,7 +59,7 @@ class channelCallTransformer(cst.CSTTransformer):
5959
'get_customer': ('name', ),
6060
'get_customer_repricing_config': ('name', ),
6161
'get_entitlement': ('name', ),
62-
'import_customer': ('domain', 'cloud_identity_id', 'parent', 'overwrite_if_exists', 'auth_token', 'channel_partner_id', 'customer', ),
62+
'import_customer': ('domain', 'cloud_identity_id', 'primary_admin_email', 'parent', 'overwrite_if_exists', 'auth_token', 'channel_partner_id', 'customer', ),
6363
'list_channel_partner_links': ('parent', 'page_size', 'page_token', 'view', ),
6464
'list_channel_partner_repricing_configs': ('parent', 'page_size', 'page_token', 'filter', ),
6565
'list_customer_repricing_configs': ('parent', 'page_size', 'page_token', 'filter', ),

packages/google-cloud-channel/tests/unit/gapic/channel_v1/test_cloud_channel_service.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,6 +2110,7 @@ def test_check_cloud_identity_accounts_exist_non_empty_request_with_auto_populat
21102110
request = service.CheckCloudIdentityAccountsExistRequest(
21112111
parent="parent_value",
21122112
domain="domain_value",
2113+
primary_admin_email="primary_admin_email_value",
21132114
)
21142115

21152116
# Mock the actual call within the gRPC stub, and fake the request.
@@ -2125,6 +2126,7 @@ def test_check_cloud_identity_accounts_exist_non_empty_request_with_auto_populat
21252126
assert args[0] == service.CheckCloudIdentityAccountsExistRequest(
21262127
parent="parent_value",
21272128
domain="domain_value",
2129+
primary_admin_email="primary_admin_email_value",
21282130
)
21292131

21302132

@@ -3397,6 +3399,7 @@ def test_import_customer_non_empty_request_with_auto_populated_field():
33973399
request = service.ImportCustomerRequest(
33983400
domain="domain_value",
33993401
cloud_identity_id="cloud_identity_id_value",
3402+
primary_admin_email="primary_admin_email_value",
34003403
parent="parent_value",
34013404
auth_token="auth_token_value",
34023405
channel_partner_id="channel_partner_id_value",
@@ -3414,6 +3417,7 @@ def test_import_customer_non_empty_request_with_auto_populated_field():
34143417
assert args[0] == service.ImportCustomerRequest(
34153418
domain="domain_value",
34163419
cloud_identity_id="cloud_identity_id_value",
3420+
primary_admin_email="primary_admin_email_value",
34173421
parent="parent_value",
34183422
auth_token="auth_token_value",
34193423
channel_partner_id="channel_partner_id_value",

0 commit comments

Comments
 (0)