1 /* 2 * Copyright 2022 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /** 18 * A client to Cloud Profiler API 19 * 20 * <p>The interfaces provided are listed below, along with usage samples. 21 * 22 * <p>======================= ProfilerServiceClient ======================= 23 * 24 * <p>Service Description: Manage the collection of continuous profiling data provided by profiling 25 * agents running in the cloud or by an offline provider of profiling data. 26 * 27 * <p>General guidelines: 28 * 29 * <ul> 30 * <li>Profiles for a single deployment must be created in ascending time order. 31 * <li>Profiles can be created in either online or offline mode, see below. 32 * </ul> 33 * 34 * <p>Sample for ProfilerServiceClient: 35 * 36 * <pre>{@code 37 * // This snippet has been automatically generated and should be regarded as a code template only. 38 * // It will require modifications to work: 39 * // - It may require correct/in-range values for request initialization. 40 * // - It may require specifying regional endpoints when creating the service client as shown in 41 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 42 * try (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) { 43 * CreateProfileRequest request = 44 * CreateProfileRequest.newBuilder() 45 * .setParent(ProjectName.of("[PROJECT]").toString()) 46 * .setDeployment(Deployment.newBuilder().build()) 47 * .addAllProfileType(new ArrayList<ProfileType>()) 48 * .build(); 49 * Profile response = profilerServiceClient.createProfile(request); 50 * } 51 * }</pre> 52 */ 53 @Generated("by gapic-generator-java") 54 package com.google.devtools.cloudprofiler.v2; 55 56 import javax.annotation.Generated; 57