xref: /aosp_15_r20/external/googleapis/google/cloud/cloudcontrolspartner/v1/customers.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.cloudcontrolspartner.v1;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/cloud/cloudcontrolspartner/v1/completion_state.proto";
22import "google/protobuf/timestamp.proto";
23
24option csharp_namespace = "Google.Cloud.CloudControlsPartner.V1";
25option go_package = "cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb";
26option java_multiple_files = true;
27option java_outer_classname = "CustomersProto";
28option java_package = "com.google.cloud.cloudcontrolspartner.v1";
29option php_namespace = "Google\\Cloud\\CloudControlsPartner\\V1";
30option ruby_package = "Google::Cloud::CloudControlsPartner::V1";
31
32// Contains metadata around a Cloud Controls Partner Customer
33message Customer {
34  option (google.api.resource) = {
35    type: "cloudcontrolspartner.googleapis.com/Customer"
36    pattern: "organizations/{organization}/locations/{location}/customers/{customer}"
37    plural: "customers"
38    singular: "customer"
39  };
40
41  // Identifier. Format:
42  // `organizations/{organization}/locations/{location}/customers/{customer}`
43  string name = 1 [(google.api.field_behavior) = IDENTIFIER];
44
45  // The customer organization's display name. E.g. "google.com".
46  string display_name = 2;
47
48  // Container for customer onboarding steps
49  CustomerOnboardingState customer_onboarding_state = 3;
50
51  // Indicates whether a customer is fully onboarded
52  bool is_onboarded = 4;
53}
54
55// Request to list customers
56message ListCustomersRequest {
57  // Required. Parent resource
58  // Format: `organizations/{organization}/locations/{location}`
59  string parent = 1 [
60    (google.api.field_behavior) = REQUIRED,
61    (google.api.resource_reference) = {
62      child_type: "cloudcontrolspartner.googleapis.com/Customer"
63    }
64  ];
65
66  // The maximum number of Customers to return. The service may return fewer
67  // than this value. If unspecified, at most 500 Customers will be returned.
68  int32 page_size = 2;
69
70  // A page token, received from a previous `ListCustomers` call.
71  // Provide this to retrieve the subsequent page.
72  string page_token = 3;
73
74  // Optional. Filtering results
75  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
76
77  // Optional. Hint for how to order the results
78  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
79}
80
81// Response message for list customer Customers requests
82message ListCustomersResponse {
83  // List of customers
84  repeated Customer customers = 1;
85
86  // A token that can be sent as `page_token` to retrieve the next page.
87  // If this field is omitted, there are no subsequent pages.
88  string next_page_token = 2;
89
90  // Locations that could not be reached.
91  repeated string unreachable = 3;
92}
93
94// Message for getting a customer
95message GetCustomerRequest {
96  // Required. Format:
97  // `organizations/{organization}/locations/{location}/customers/{customer}`
98  string name = 1 [
99    (google.api.field_behavior) = REQUIRED,
100    (google.api.resource_reference) = {
101      type: "cloudcontrolspartner.googleapis.com/Customer"
102    }
103  ];
104}
105
106// Container for customer onboarding steps
107message CustomerOnboardingState {
108  // List of customer onboarding steps
109  repeated CustomerOnboardingStep onboarding_steps = 1;
110}
111
112// Container for customer onboarding information
113message CustomerOnboardingStep {
114  // Enum for possible onboarding steps
115  enum Step {
116    // Unspecified step
117    STEP_UNSPECIFIED = 0;
118
119    // KAJ Enrollment
120    KAJ_ENROLLMENT = 1;
121
122    // Customer Environment
123    CUSTOMER_ENVIRONMENT = 2;
124  }
125
126  // The onboarding step
127  Step step = 1;
128
129  // The starting time of the onboarding step
130  google.protobuf.Timestamp start_time = 2;
131
132  // The completion time of the onboarding step
133  google.protobuf.Timestamp completion_time = 3;
134
135  // Output only. Current state of the step
136  CompletionState completion_state = 4
137      [(google.api.field_behavior) = OUTPUT_ONLY];
138}
139