Skip to content

Commit bf57b2c

Browse files
Google APIscopybara-github
authored andcommitted
feat: add API ImportCustomer for Cloud Channel API
docs: update comments for a few fields PiperOrigin-RevId: 394721709
1 parent 5d91687 commit bf57b2c

3 files changed

Lines changed: 85 additions & 4 deletions

File tree

google/cloud/channel/v1/cloudchannel_v1.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ types:
1313
- name: google.cloud.channel.v1.SubscriberEvent
1414
- name: google.cloud.channel.v1.TransferEntitlementsResponse
1515

16+
documentation:
17+
summary: |-
18+
The Cloud Channel API enables Google Cloud partners to have a single
19+
unified resale platform and APIs across all of Google Cloud including GCP,
20+
Workspace, Maps and Chrome.
21+
1622
http:
1723
rules:
1824
- selector: google.longrunning.Operations.CancelOperation

google/cloud/channel/v1/customers.proto

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ message Customer {
5454
// Secondary contact email. You need to provide an alternate email to create
5555
// different domains if a primary contact email already exists. Users will
5656
// receive a notification with credentials when you create an admin.google.com
57-
// account. Secondary emails are also recovery email addresses.
57+
// account. Secondary emails are also recovery email addresses. Alternate
58+
// emails are optional when you create Team customers.
5859
string alternate_email = 5;
5960

6061
// Required. The customer's primary domain. Must match the primary contact
@@ -87,10 +88,10 @@ message Customer {
8788

8889
// Contact information for a customer account.
8990
message ContactInfo {
90-
// The customer account contact's first name.
91+
// The customer account contact's first name. Optional for Team customers.
9192
string first_name = 1;
9293

93-
// The customer account contact's last name.
94+
// The customer account contact's last name. Optional for Team customers.
9495
string last_name = 2;
9596

9697
// Output only. The customer account contact's display name, formatted as a
@@ -99,7 +100,7 @@ message ContactInfo {
99100

100101
// The customer account's contact email. Required for entitlements that create
101102
// admin.google.com accounts, and serves as the customer's username for those
102-
// accounts.
103+
// accounts. Use this email to invite Team customers.
103104
string email = 5;
104105

105106
// Optional. The customer account contact's job title.

google/cloud/channel/v1/service.proto

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,34 @@ service CloudChannelService {
188188
option (google.api.method_signature) = "name";
189189
}
190190

191+
// Imports a [Customer][google.cloud.channel.v1.Customer] from the Cloud Identity associated with the provided
192+
// Cloud Identity ID or domain before a TransferEntitlements call. If a
193+
// linked Customer already exists and overwrite_if_exists is true, it will
194+
// update that Customer's data.
195+
//
196+
// Possible error codes:
197+
//
198+
// * PERMISSION_DENIED: The reseller account making the request is different
199+
// from the reseller account in the API request.
200+
// * NOT_FOUND: Cloud Identity doesn't exist or was deleted.
201+
// * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is
202+
// expired or invalid.
203+
// * ALREADY_EXISTS: A customer already exists and has conflicting critical
204+
// fields. Requires an overwrite.
205+
//
206+
// Return value:
207+
// The [Customer][google.cloud.channel.v1.Customer].
208+
rpc ImportCustomer(ImportCustomerRequest) returns (Customer) {
209+
option (google.api.http) = {
210+
post: "/v1/{parent=accounts/*}/customers:import"
211+
body: "*"
212+
additional_bindings {
213+
post: "/v1/{parent=accounts/*/channelPartnerLinks/*}/customers:import"
214+
body: "*"
215+
}
216+
};
217+
}
218+
191219
// Creates a Cloud Identity for the given customer using the customer's
192220
// information, or the information provided here.
193221
//
@@ -1026,6 +1054,52 @@ message DeleteCustomerRequest {
10261054
];
10271055
}
10281056

1057+
// Request message for [CloudChannelService.ImportCustomer][google.cloud.channel.v1.CloudChannelService.ImportCustomer]
1058+
message ImportCustomerRequest {
1059+
// Specifies the identity of the transfer customer.
1060+
// A customer's cloud_identity_id or domain is required to look up the
1061+
// customer's Cloud Identity. For Team customers, only the cloud_identity_id
1062+
// option is valid.
1063+
oneof customer_identity {
1064+
// Required. Customer domain.
1065+
string domain = 2 [(google.api.field_behavior) = REQUIRED];
1066+
1067+
// Required. Customer's Cloud Identity ID
1068+
string cloud_identity_id = 3 [(google.api.field_behavior) = REQUIRED];
1069+
}
1070+
1071+
// Required. The resource name of the reseller's account.
1072+
// Parent takes the format: accounts/{account_id} or
1073+
// accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
1074+
string parent = 1 [(google.api.field_behavior) = REQUIRED];
1075+
1076+
// Optional. The super admin of the resold customer generates this token to
1077+
// authorize a reseller to access their Cloud Identity and purchase
1078+
// entitlements on their behalf. You can omit this token after authorization.
1079+
// See https://support.google.com/a/answer/7643790 for more details.
1080+
string auth_token = 4 [(google.api.field_behavior) = OPTIONAL];
1081+
1082+
// Required. Choose to overwrite an existing customer if found.
1083+
// This must be set to true if there is an existing customer with a
1084+
// conflicting region code or domain.
1085+
bool overwrite_if_exists = 5 [(google.api.field_behavior) = REQUIRED];
1086+
1087+
// Optional. Cloud Identity ID of a channel partner who will be the direct reseller for
1088+
// the customer's order. This field is required for 2-tier transfer scenarios
1089+
// and can be provided via the request Parent binding as well.
1090+
string channel_partner_id = 6 [(google.api.field_behavior) = OPTIONAL];
1091+
1092+
// Optional. Specifies the customer that will receive imported Cloud Identity
1093+
// information.
1094+
// Format: accounts/{account_id}/customers/{customer_id}
1095+
string customer = 7 [
1096+
(google.api.field_behavior) = OPTIONAL,
1097+
(google.api.resource_reference) = {
1098+
type: "cloudchannel.googleapis.com/Customer"
1099+
}
1100+
];
1101+
}
1102+
10291103
// Request message for [CloudChannelService.ProvisionCloudIdentity][google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity]
10301104
message ProvisionCloudIdentityRequest {
10311105
// Required. Resource name of the customer.

0 commit comments

Comments
 (0)