• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 OS Config API
19  *
20  * <p>The interfaces provided are listed below, along with usage samples.
21  *
22  * <p>======================= OsConfigServiceClient =======================
23  *
24  * <p>Service Description: OS Config API
25  *
26  * <p>The OS Config service is a server-side component that you can use to manage package
27  * installations and patch jobs for virtual machine instances.
28  *
29  * <p>Sample for OsConfigServiceClient:
30  *
31  * <pre>{@code
32  * // This snippet has been automatically generated and should be regarded as a code template only.
33  * // It will require modifications to work:
34  * // - It may require correct/in-range values for request initialization.
35  * // - It may require specifying regional endpoints when creating the service client as shown in
36  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
37  * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
38  *   PatchJobs.ExecutePatchJobRequest request =
39  *       PatchJobs.ExecutePatchJobRequest.newBuilder()
40  *           .setParent(ProjectName.of("[PROJECT]").toString())
41  *           .setDescription("description-1724546052")
42  *           .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build())
43  *           .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build())
44  *           .setDuration(Duration.newBuilder().build())
45  *           .setDryRun(true)
46  *           .setDisplayName("displayName1714148973")
47  *           .setRollout(PatchJobs.PatchRollout.newBuilder().build())
48  *           .build();
49  *   PatchJobs.PatchJob response = osConfigServiceClient.executePatchJob(request);
50  * }
51  * }</pre>
52  *
53  * <p>======================= OsConfigZonalServiceClient =======================
54  *
55  * <p>Service Description: Zonal OS Config API
56  *
57  * <p>The OS Config service is the server-side component that allows users to manage package
58  * installations and patch jobs for Compute Engine VM instances.
59  *
60  * <p>Sample for OsConfigZonalServiceClient:
61  *
62  * <pre>{@code
63  * // This snippet has been automatically generated and should be regarded as a code template only.
64  * // It will require modifications to work:
65  * // - It may require correct/in-range values for request initialization.
66  * // - It may require specifying regional endpoints when creating the service client as shown in
67  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
68  * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
69  *     OsConfigZonalServiceClient.create()) {
70  *   OSPolicyAssignmentName name =
71  *       OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]");
72  *   OSPolicyAssignment response = osConfigZonalServiceClient.getOSPolicyAssignment(name);
73  * }
74  * }</pre>
75  */
76 @Generated("by gapic-generator-java")
77 package com.google.cloud.osconfig.v1;
78 
79 import javax.annotation.Generated;
80