xref: /aosp_15_r20/external/googleapis/google/devtools/cloudprofiler/v2/profiler.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage google.devtools.cloudprofiler.v2;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workerimport "google/api/annotations.proto";
20*d5c09012SAndroid Build Coastguard Workerimport "google/api/client.proto";
21*d5c09012SAndroid Build Coastguard Workerimport "google/api/field_behavior.proto";
22*d5c09012SAndroid Build Coastguard Workerimport "google/api/resource.proto";
23*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/duration.proto";
24*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/field_mask.proto";
25*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto";
26*d5c09012SAndroid Build Coastguard Worker
27*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.Profiler.V2";
28*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/cloudprofiler/apiv2/cloudprofilerpb;cloudprofilerpb";
29*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
30*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "ProfilerProto";
31*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.devtools.cloudprofiler.v2";
32*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\Profiler\\V2";
33*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::Profiler::V2";
34*d5c09012SAndroid Build Coastguard Worker
35*d5c09012SAndroid Build Coastguard Worker// Manage the collection of continuous profiling data provided by profiling
36*d5c09012SAndroid Build Coastguard Worker// agents running in the cloud or by an offline provider of profiling data.
37*d5c09012SAndroid Build Coastguard Worker//
38*d5c09012SAndroid Build Coastguard Worker// __The APIs listed in this service are intended for use within our profiler
39*d5c09012SAndroid Build Coastguard Worker// agents only.__
40*d5c09012SAndroid Build Coastguard Workerservice ProfilerService {
41*d5c09012SAndroid Build Coastguard Worker  option (google.api.default_host) = "cloudprofiler.googleapis.com";
42*d5c09012SAndroid Build Coastguard Worker  option (google.api.oauth_scopes) =
43*d5c09012SAndroid Build Coastguard Worker      "https://www.googleapis.com/auth/cloud-platform,"
44*d5c09012SAndroid Build Coastguard Worker      "https://www.googleapis.com/auth/monitoring,"
45*d5c09012SAndroid Build Coastguard Worker      "https://www.googleapis.com/auth/monitoring.write";
46*d5c09012SAndroid Build Coastguard Worker
47*d5c09012SAndroid Build Coastguard Worker  // CreateProfile creates a new profile resource in the online mode.
48*d5c09012SAndroid Build Coastguard Worker  //
49*d5c09012SAndroid Build Coastguard Worker  // _Direct use of this API is discouraged, please use a [supported
50*d5c09012SAndroid Build Coastguard Worker  // profiler
51*d5c09012SAndroid Build Coastguard Worker  // agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
52*d5c09012SAndroid Build Coastguard Worker  // instead for profile collection._
53*d5c09012SAndroid Build Coastguard Worker  //
54*d5c09012SAndroid Build Coastguard Worker  // The server ensures that the new profiles are created at a constant rate per
55*d5c09012SAndroid Build Coastguard Worker  // deployment, so the creation request may hang for some time until the next
56*d5c09012SAndroid Build Coastguard Worker  // profile session is available.
57*d5c09012SAndroid Build Coastguard Worker  //
58*d5c09012SAndroid Build Coastguard Worker  // The request may fail with ABORTED error if the creation is not available
59*d5c09012SAndroid Build Coastguard Worker  // within ~1m, the response will indicate the duration of the backoff the
60*d5c09012SAndroid Build Coastguard Worker  // client should take before attempting creating a profile again. The backoff
61*d5c09012SAndroid Build Coastguard Worker  // duration is returned in google.rpc.RetryInfo extension on the response
62*d5c09012SAndroid Build Coastguard Worker  // status. To a gRPC client, the extension will be return as a
63*d5c09012SAndroid Build Coastguard Worker  // binary-serialized proto in the trailing metadata item named
64*d5c09012SAndroid Build Coastguard Worker  // "google.rpc.retryinfo-bin".
65*d5c09012SAndroid Build Coastguard Worker  //
66*d5c09012SAndroid Build Coastguard Worker  rpc CreateProfile(CreateProfileRequest) returns (Profile) {
67*d5c09012SAndroid Build Coastguard Worker    option (google.api.http) = {
68*d5c09012SAndroid Build Coastguard Worker      post: "/v2/{parent=projects/*}/profiles"
69*d5c09012SAndroid Build Coastguard Worker      body: "*"
70*d5c09012SAndroid Build Coastguard Worker    };
71*d5c09012SAndroid Build Coastguard Worker  }
72*d5c09012SAndroid Build Coastguard Worker
73*d5c09012SAndroid Build Coastguard Worker  // CreateOfflineProfile creates a new profile resource in the offline
74*d5c09012SAndroid Build Coastguard Worker  // mode. The client provides the profile to create along with the profile
75*d5c09012SAndroid Build Coastguard Worker  // bytes, the server records it.
76*d5c09012SAndroid Build Coastguard Worker  //
77*d5c09012SAndroid Build Coastguard Worker  // _Direct use of this API is discouraged, please use a [supported
78*d5c09012SAndroid Build Coastguard Worker  // profiler
79*d5c09012SAndroid Build Coastguard Worker  // agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
80*d5c09012SAndroid Build Coastguard Worker  // instead for profile collection._
81*d5c09012SAndroid Build Coastguard Worker  rpc CreateOfflineProfile(CreateOfflineProfileRequest) returns (Profile) {
82*d5c09012SAndroid Build Coastguard Worker    option (google.api.http) = {
83*d5c09012SAndroid Build Coastguard Worker      post: "/v2/{parent=projects/*}/profiles:createOffline"
84*d5c09012SAndroid Build Coastguard Worker      body: "profile"
85*d5c09012SAndroid Build Coastguard Worker    };
86*d5c09012SAndroid Build Coastguard Worker    option (google.api.method_signature) = "parent,profile";
87*d5c09012SAndroid Build Coastguard Worker  }
88*d5c09012SAndroid Build Coastguard Worker
89*d5c09012SAndroid Build Coastguard Worker  // UpdateProfile updates the profile bytes and labels on the profile resource
90*d5c09012SAndroid Build Coastguard Worker  // created in the online mode. Updating the bytes for profiles created in the
91*d5c09012SAndroid Build Coastguard Worker  // offline mode is currently not supported: the profile content must be
92*d5c09012SAndroid Build Coastguard Worker  // provided at the time of the profile creation.
93*d5c09012SAndroid Build Coastguard Worker  //
94*d5c09012SAndroid Build Coastguard Worker  // _Direct use of this API is discouraged, please use a [supported
95*d5c09012SAndroid Build Coastguard Worker  // profiler
96*d5c09012SAndroid Build Coastguard Worker  // agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
97*d5c09012SAndroid Build Coastguard Worker  // instead for profile collection._
98*d5c09012SAndroid Build Coastguard Worker  rpc UpdateProfile(UpdateProfileRequest) returns (Profile) {
99*d5c09012SAndroid Build Coastguard Worker    option (google.api.http) = {
100*d5c09012SAndroid Build Coastguard Worker      patch: "/v2/{profile.name=projects/*/profiles/*}"
101*d5c09012SAndroid Build Coastguard Worker      body: "profile"
102*d5c09012SAndroid Build Coastguard Worker    };
103*d5c09012SAndroid Build Coastguard Worker    option (google.api.method_signature) = "profile,update_mask";
104*d5c09012SAndroid Build Coastguard Worker  }
105*d5c09012SAndroid Build Coastguard Worker}
106*d5c09012SAndroid Build Coastguard Worker
107*d5c09012SAndroid Build Coastguard Worker// Service allows existing Cloud Profiler customers to export their profile data
108*d5c09012SAndroid Build Coastguard Worker// out of Google Cloud.
109*d5c09012SAndroid Build Coastguard Workerservice ExportService {
110*d5c09012SAndroid Build Coastguard Worker  option (google.api.default_host) = "cloudprofiler.googleapis.com";
111*d5c09012SAndroid Build Coastguard Worker  option (google.api.oauth_scopes) =
112*d5c09012SAndroid Build Coastguard Worker      "https://www.googleapis.com/auth/cloud-platform,"
113*d5c09012SAndroid Build Coastguard Worker      "https://www.googleapis.com/auth/monitoring,"
114*d5c09012SAndroid Build Coastguard Worker      "https://www.googleapis.com/auth/monitoring.write";
115*d5c09012SAndroid Build Coastguard Worker
116*d5c09012SAndroid Build Coastguard Worker  // Lists profiles which have been collected so far and for which the caller
117*d5c09012SAndroid Build Coastguard Worker  // has permission to view.
118*d5c09012SAndroid Build Coastguard Worker  rpc ListProfiles(ListProfilesRequest) returns (ListProfilesResponse) {
119*d5c09012SAndroid Build Coastguard Worker    option (google.api.http) = {
120*d5c09012SAndroid Build Coastguard Worker      get: "/v2/{parent=projects/*}/profiles"
121*d5c09012SAndroid Build Coastguard Worker    };
122*d5c09012SAndroid Build Coastguard Worker    option (google.api.method_signature) = "parent";
123*d5c09012SAndroid Build Coastguard Worker  }
124*d5c09012SAndroid Build Coastguard Worker}
125*d5c09012SAndroid Build Coastguard Worker
126*d5c09012SAndroid Build Coastguard Worker// CreateProfileRequest describes a profile resource online creation request.
127*d5c09012SAndroid Build Coastguard Worker// The deployment field must be populated. The profile_type specifies the list
128*d5c09012SAndroid Build Coastguard Worker// of profile types supported by the agent. The creation call will hang until a
129*d5c09012SAndroid Build Coastguard Worker// profile of one of these types needs to be collected.
130*d5c09012SAndroid Build Coastguard Worker//
131*d5c09012SAndroid Build Coastguard Workermessage CreateProfileRequest {
132*d5c09012SAndroid Build Coastguard Worker  // Parent project to create the profile in.
133*d5c09012SAndroid Build Coastguard Worker  string parent = 4 [(google.api.resource_reference) = {
134*d5c09012SAndroid Build Coastguard Worker    type: "cloudresourcemanager.googleapis.com/Project"
135*d5c09012SAndroid Build Coastguard Worker  }];
136*d5c09012SAndroid Build Coastguard Worker
137*d5c09012SAndroid Build Coastguard Worker  // Deployment details.
138*d5c09012SAndroid Build Coastguard Worker  Deployment deployment = 1;
139*d5c09012SAndroid Build Coastguard Worker
140*d5c09012SAndroid Build Coastguard Worker  // One or more profile types that the agent is capable of providing.
141*d5c09012SAndroid Build Coastguard Worker  repeated ProfileType profile_type = 2;
142*d5c09012SAndroid Build Coastguard Worker}
143*d5c09012SAndroid Build Coastguard Worker
144*d5c09012SAndroid Build Coastguard Worker// CreateOfflineProfileRequest describes a profile resource offline creation
145*d5c09012SAndroid Build Coastguard Worker// request.
146*d5c09012SAndroid Build Coastguard Workermessage CreateOfflineProfileRequest {
147*d5c09012SAndroid Build Coastguard Worker  // Parent project to create the profile in.
148*d5c09012SAndroid Build Coastguard Worker  string parent = 1 [(google.api.resource_reference) = {
149*d5c09012SAndroid Build Coastguard Worker    type: "cloudresourcemanager.googleapis.com/Project"
150*d5c09012SAndroid Build Coastguard Worker  }];
151*d5c09012SAndroid Build Coastguard Worker
152*d5c09012SAndroid Build Coastguard Worker  // Contents of the profile to create.
153*d5c09012SAndroid Build Coastguard Worker  Profile profile = 2;
154*d5c09012SAndroid Build Coastguard Worker}
155*d5c09012SAndroid Build Coastguard Worker
156*d5c09012SAndroid Build Coastguard Worker// UpdateProfileRequest contains the profile to update.
157*d5c09012SAndroid Build Coastguard Workermessage UpdateProfileRequest {
158*d5c09012SAndroid Build Coastguard Worker  // Profile to update.
159*d5c09012SAndroid Build Coastguard Worker  Profile profile = 1;
160*d5c09012SAndroid Build Coastguard Worker
161*d5c09012SAndroid Build Coastguard Worker  // Field mask used to specify the fields to be overwritten. Currently only
162*d5c09012SAndroid Build Coastguard Worker  // profile_bytes and labels fields are supported by UpdateProfile, so only
163*d5c09012SAndroid Build Coastguard Worker  // those fields can be specified in the mask. When no mask is provided, all
164*d5c09012SAndroid Build Coastguard Worker  // fields are overwritten.
165*d5c09012SAndroid Build Coastguard Worker  google.protobuf.FieldMask update_mask = 2;
166*d5c09012SAndroid Build Coastguard Worker}
167*d5c09012SAndroid Build Coastguard Worker
168*d5c09012SAndroid Build Coastguard Worker// Profile resource.
169*d5c09012SAndroid Build Coastguard Workermessage Profile {
170*d5c09012SAndroid Build Coastguard Worker  option (google.api.resource) = {
171*d5c09012SAndroid Build Coastguard Worker    type: "cloudprofiler.googleapis.com/Profile"
172*d5c09012SAndroid Build Coastguard Worker    pattern: "projects/{project}/profiles/{profile}"
173*d5c09012SAndroid Build Coastguard Worker  };
174*d5c09012SAndroid Build Coastguard Worker
175*d5c09012SAndroid Build Coastguard Worker  // Output only. Opaque, server-assigned, unique ID for this profile.
176*d5c09012SAndroid Build Coastguard Worker  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
177*d5c09012SAndroid Build Coastguard Worker
178*d5c09012SAndroid Build Coastguard Worker  // Type of profile.
179*d5c09012SAndroid Build Coastguard Worker  // For offline mode, this must be specified when creating the profile. For
180*d5c09012SAndroid Build Coastguard Worker  // online mode it is assigned and returned by the server.
181*d5c09012SAndroid Build Coastguard Worker  ProfileType profile_type = 2;
182*d5c09012SAndroid Build Coastguard Worker
183*d5c09012SAndroid Build Coastguard Worker  // Deployment this profile corresponds to.
184*d5c09012SAndroid Build Coastguard Worker  Deployment deployment = 3;
185*d5c09012SAndroid Build Coastguard Worker
186*d5c09012SAndroid Build Coastguard Worker  // Duration of the profiling session.
187*d5c09012SAndroid Build Coastguard Worker  // Input (for the offline mode) or output (for the online mode).
188*d5c09012SAndroid Build Coastguard Worker  // The field represents requested profiling duration. It may slightly differ
189*d5c09012SAndroid Build Coastguard Worker  // from the effective profiling duration, which is recorded in the profile
190*d5c09012SAndroid Build Coastguard Worker  // data, in case the profiling can't be stopped immediately (e.g. in case
191*d5c09012SAndroid Build Coastguard Worker  // stopping the profiling is handled asynchronously).
192*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Duration duration = 4;
193*d5c09012SAndroid Build Coastguard Worker
194*d5c09012SAndroid Build Coastguard Worker  // Input only. Profile bytes, as a gzip compressed serialized proto, the
195*d5c09012SAndroid Build Coastguard Worker  // format is https://github.com/google/pprof/blob/master/proto/profile.proto.
196*d5c09012SAndroid Build Coastguard Worker  bytes profile_bytes = 5 [(google.api.field_behavior) = INPUT_ONLY];
197*d5c09012SAndroid Build Coastguard Worker
198*d5c09012SAndroid Build Coastguard Worker  // Input only. Labels associated to this specific profile. These labels will
199*d5c09012SAndroid Build Coastguard Worker  // get merged with the deployment labels for the final data set. See
200*d5c09012SAndroid Build Coastguard Worker  // documentation on deployment labels for validation rules and limits.
201*d5c09012SAndroid Build Coastguard Worker  map<string, string> labels = 6 [(google.api.field_behavior) = INPUT_ONLY];
202*d5c09012SAndroid Build Coastguard Worker
203*d5c09012SAndroid Build Coastguard Worker  // Output only. Start time for the profile.
204*d5c09012SAndroid Build Coastguard Worker  // This output is only present in response from the ListProfiles method.
205*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Timestamp start_time = 7
206*d5c09012SAndroid Build Coastguard Worker      [(google.api.field_behavior) = OUTPUT_ONLY];
207*d5c09012SAndroid Build Coastguard Worker}
208*d5c09012SAndroid Build Coastguard Worker
209*d5c09012SAndroid Build Coastguard Worker// Deployment contains the deployment identification information.
210*d5c09012SAndroid Build Coastguard Workermessage Deployment {
211*d5c09012SAndroid Build Coastguard Worker  // Project ID is the ID of a cloud project.
212*d5c09012SAndroid Build Coastguard Worker  // Validation regex: `^[a-z][-a-z0-9:.]{4,61}[a-z0-9]$`.
213*d5c09012SAndroid Build Coastguard Worker  string project_id = 1;
214*d5c09012SAndroid Build Coastguard Worker
215*d5c09012SAndroid Build Coastguard Worker  // Target is the service name used to group related deployments:
216*d5c09012SAndroid Build Coastguard Worker  // * Service name for App Engine Flex / Standard.
217*d5c09012SAndroid Build Coastguard Worker  // * Cluster and container name for GKE.
218*d5c09012SAndroid Build Coastguard Worker  // * User-specified string for direct Compute Engine profiling (e.g. Java).
219*d5c09012SAndroid Build Coastguard Worker  // * Job name for Dataflow.
220*d5c09012SAndroid Build Coastguard Worker  // Validation regex: `^[a-z0-9]([-a-z0-9_.]{0,253}[a-z0-9])?$`.
221*d5c09012SAndroid Build Coastguard Worker  string target = 2;
222*d5c09012SAndroid Build Coastguard Worker
223*d5c09012SAndroid Build Coastguard Worker  // Labels identify the deployment within the user universe and same target.
224*d5c09012SAndroid Build Coastguard Worker  // Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
225*d5c09012SAndroid Build Coastguard Worker  // Value for an individual label must be <= 512 bytes, the total
226*d5c09012SAndroid Build Coastguard Worker  // size of all label names and values must be <= 1024 bytes.
227*d5c09012SAndroid Build Coastguard Worker  //
228*d5c09012SAndroid Build Coastguard Worker  // Label named "language" can be used to record the programming language of
229*d5c09012SAndroid Build Coastguard Worker  // the profiled deployment. The standard choices for the value include "java",
230*d5c09012SAndroid Build Coastguard Worker  // "go", "python", "ruby", "nodejs", "php", "dotnet".
231*d5c09012SAndroid Build Coastguard Worker  //
232*d5c09012SAndroid Build Coastguard Worker  // For deployments running on Google Cloud Platform, "zone" or "region" label
233*d5c09012SAndroid Build Coastguard Worker  // should be present describing the deployment location. An example of a zone
234*d5c09012SAndroid Build Coastguard Worker  // is "us-central1-a", an example of a region is "us-central1" or
235*d5c09012SAndroid Build Coastguard Worker  // "us-central".
236*d5c09012SAndroid Build Coastguard Worker  map<string, string> labels = 3;
237*d5c09012SAndroid Build Coastguard Worker}
238*d5c09012SAndroid Build Coastguard Worker
239*d5c09012SAndroid Build Coastguard Worker// ProfileType is type of profiling data.
240*d5c09012SAndroid Build Coastguard Worker// NOTE: the enumeration member names are used (in lowercase) as unique string
241*d5c09012SAndroid Build Coastguard Worker// identifiers of profile types, so they must not be renamed.
242*d5c09012SAndroid Build Coastguard Workerenum ProfileType {
243*d5c09012SAndroid Build Coastguard Worker  // Unspecified profile type.
244*d5c09012SAndroid Build Coastguard Worker  PROFILE_TYPE_UNSPECIFIED = 0;
245*d5c09012SAndroid Build Coastguard Worker
246*d5c09012SAndroid Build Coastguard Worker  // Thread CPU time sampling.
247*d5c09012SAndroid Build Coastguard Worker  CPU = 1;
248*d5c09012SAndroid Build Coastguard Worker
249*d5c09012SAndroid Build Coastguard Worker  // Wallclock time sampling. More expensive as stops all threads.
250*d5c09012SAndroid Build Coastguard Worker  WALL = 2;
251*d5c09012SAndroid Build Coastguard Worker
252*d5c09012SAndroid Build Coastguard Worker  // In-use heap profile. Represents a snapshot of the allocations that are
253*d5c09012SAndroid Build Coastguard Worker  // live at the time of the profiling.
254*d5c09012SAndroid Build Coastguard Worker  HEAP = 3;
255*d5c09012SAndroid Build Coastguard Worker
256*d5c09012SAndroid Build Coastguard Worker  // Single-shot collection of all thread stacks.
257*d5c09012SAndroid Build Coastguard Worker  THREADS = 4;
258*d5c09012SAndroid Build Coastguard Worker
259*d5c09012SAndroid Build Coastguard Worker  // Synchronization contention profile.
260*d5c09012SAndroid Build Coastguard Worker  CONTENTION = 5;
261*d5c09012SAndroid Build Coastguard Worker
262*d5c09012SAndroid Build Coastguard Worker  // Peak heap profile.
263*d5c09012SAndroid Build Coastguard Worker  PEAK_HEAP = 6;
264*d5c09012SAndroid Build Coastguard Worker
265*d5c09012SAndroid Build Coastguard Worker  // Heap allocation profile. It represents the aggregation of all allocations
266*d5c09012SAndroid Build Coastguard Worker  // made over the duration of the profile. All allocations are included,
267*d5c09012SAndroid Build Coastguard Worker  // including those that might have been freed by the end of the profiling
268*d5c09012SAndroid Build Coastguard Worker  // interval. The profile is in particular useful for garbage collecting
269*d5c09012SAndroid Build Coastguard Worker  // languages to understand which parts of the code create most of the garbage
270*d5c09012SAndroid Build Coastguard Worker  // collection pressure to see if those can be optimized.
271*d5c09012SAndroid Build Coastguard Worker  HEAP_ALLOC = 7;
272*d5c09012SAndroid Build Coastguard Worker}
273*d5c09012SAndroid Build Coastguard Worker
274*d5c09012SAndroid Build Coastguard Worker// ListProfilesRequest contains request parameters for listing profiles for
275*d5c09012SAndroid Build Coastguard Worker// deployments in projects which the user has permissions to view.
276*d5c09012SAndroid Build Coastguard Workermessage ListProfilesRequest {
277*d5c09012SAndroid Build Coastguard Worker  // Required. The parent, which owns this collection of profiles.
278*d5c09012SAndroid Build Coastguard Worker  // Format: projects/{user_project_id}
279*d5c09012SAndroid Build Coastguard Worker  string parent = 1 [
280*d5c09012SAndroid Build Coastguard Worker    (google.api.field_behavior) = REQUIRED,
281*d5c09012SAndroid Build Coastguard Worker    (google.api.resource_reference) = {
282*d5c09012SAndroid Build Coastguard Worker      type: "cloudresourcemanager.googleapis.com/Project"
283*d5c09012SAndroid Build Coastguard Worker    }
284*d5c09012SAndroid Build Coastguard Worker  ];
285*d5c09012SAndroid Build Coastguard Worker
286*d5c09012SAndroid Build Coastguard Worker  // The maximum number of items to return.
287*d5c09012SAndroid Build Coastguard Worker  // Default page_size is 1000.
288*d5c09012SAndroid Build Coastguard Worker  // Max limit is 1000.
289*d5c09012SAndroid Build Coastguard Worker  int32 page_size = 2;
290*d5c09012SAndroid Build Coastguard Worker
291*d5c09012SAndroid Build Coastguard Worker  // The token to continue pagination and get profiles from a particular page.
292*d5c09012SAndroid Build Coastguard Worker  // When paginating, all other parameters provided to `ListProfiles` must match
293*d5c09012SAndroid Build Coastguard Worker  // the call that provided the page token.
294*d5c09012SAndroid Build Coastguard Worker  string page_token = 3;
295*d5c09012SAndroid Build Coastguard Worker}
296*d5c09012SAndroid Build Coastguard Worker
297*d5c09012SAndroid Build Coastguard Worker// ListProfileResponse contains the list of collected profiles for deployments
298*d5c09012SAndroid Build Coastguard Worker// in projects which the user has permissions to view.
299*d5c09012SAndroid Build Coastguard Workermessage ListProfilesResponse {
300*d5c09012SAndroid Build Coastguard Worker  // List of profiles fetched.
301*d5c09012SAndroid Build Coastguard Worker  repeated Profile profiles = 1;
302*d5c09012SAndroid Build Coastguard Worker
303*d5c09012SAndroid Build Coastguard Worker  // Token to receive the next page of results.
304*d5c09012SAndroid Build Coastguard Worker  // This field maybe empty if there are no more profiles to fetch.
305*d5c09012SAndroid Build Coastguard Worker  string next_page_token = 2;
306*d5c09012SAndroid Build Coastguard Worker
307*d5c09012SAndroid Build Coastguard Worker  // Number of profiles that were skipped in the current page since they were
308*d5c09012SAndroid Build Coastguard Worker  // not able to be fetched successfully. This should typically be zero. A
309*d5c09012SAndroid Build Coastguard Worker  // non-zero value may indicate a transient failure, in which case if the
310*d5c09012SAndroid Build Coastguard Worker  // number is too high for your use case, the call may be retried.
311*d5c09012SAndroid Build Coastguard Worker  int32 skipped_profiles = 3;
312*d5c09012SAndroid Build Coastguard Worker}
313