# Class OsConfigServiceClient (2.95.0)

2.95.0 (latest) 2.93.0 2.90.0 2.89.0 2.87.0 2.85.0 2.84.0 2.82.0 2.80.0 2.78.0 2.77.0 2.76.0 2.75.0 2.74.0 2.72.0 2.70.0 2.69.0 2.66.0 2.65.0 2.64.0 2.62.0 2.61.0 2.60.0 2.59.0 2.58.0 2.57.0 2.56.0 2.55.0 2.54.0 2.53.0 2.51.0 2.50.0 2.49.0 2.48.0 2.47.0 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.26.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.6 2.4.3 2.3.2

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

|---|---|
| [GitHub Repository](https://github.com/googleapis/google-cloud-java/tree/main/java-os-config/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java) | [Product Reference](https://cloud.google.com/compute/docs/os-patch-management) |

Service Description: OS Config API

The OS Config service is a server-side component that you can use to manage package
installations and patch jobs for virtual machine instances.

This class provides the ability to make remote calls to the backing service through method
calls that map to API methods. Sample code to get started:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.ExecutePatchJobRequest request =
           PatchJobs.ExecutePatchJobRequest.newBuilder()
               .setParent("parent-995424086")
               .setDescription("description-1724546052")
               .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build())
               .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build())
               .setDuration(Duration.newBuilder().build())
               .setDryRun(true)
               .setDisplayName("displayName1714148973")
               .setRollout(PatchJobs.PatchRollout.newBuilder().build())
               .build();
       PatchJobs.PatchJob response = osConfigServiceClient.executePatchJob(request);
     }
     
Note: close() needs to be called on the OsConfigServiceClient object to clean up resources
such as threads. In the example above, try-with-resources is used, which automatically calls
close().

| Method | Description | Method Variants |
|---|---|---|
| ExecutePatchJob | Patch VM instances by creating and running a patch job. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - executePatchJob(PatchJobs.ExecutePatchJobRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - executePatchJobCallable() |
| GetPatchJob | Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getPatchJob(PatchJobs.GetPatchJobRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getPatchJobCallable() |
| CancelPatchJob | Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - cancelPatchJob(PatchJobs.CancelPatchJobRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - cancelPatchJobCallable() |
| ListPatchJobs | Get a list of patch jobs. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listPatchJobs(PatchJobs.ListPatchJobsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listPatchJobsPagedCallable() - listPatchJobsCallable() |
| ListPatchJobInstanceDetails | Get a list of instance details for a given patch job. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listPatchJobInstanceDetails(PatchJobs.ListPatchJobInstanceDetailsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listPatchJobInstanceDetails(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listPatchJobInstanceDetailsPagedCallable() - listPatchJobInstanceDetailsCallable() |
| CreatePatchDeployment | Create an OS Config patch deployment. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createPatchDeployment(PatchDeployments.CreatePatchDeploymentRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createPatchDeploymentCallable() |
| GetPatchDeployment | Get an OS Config patch deployment. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getPatchDeployment(PatchDeployments.GetPatchDeploymentRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getPatchDeploymentCallable() |
| ListPatchDeployments | Get a page of OS Config patch deployments. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listPatchDeployments(PatchDeployments.ListPatchDeploymentsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listPatchDeploymentsPagedCallable() - listPatchDeploymentsCallable() |
| DeletePatchDeployment | Delete an OS Config patch deployment. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deletePatchDeployment(PatchDeployments.DeletePatchDeploymentRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deletePatchDeploymentCallable() |
| UpdatePatchDeployment | Update an OS Config patch deployment. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updatePatchDeployment(PatchDeployments.UpdatePatchDeploymentRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - updatePatchDeployment(PatchDeployments.PatchDeployment patchDeployment, FieldMask updateMask) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updatePatchDeploymentCallable() |
| PausePatchDeployment | Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate patch jobs. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - pausePatchDeployment(PatchDeployments.PausePatchDeploymentRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - pausePatchDeployment(PatchDeploymentName name) - pausePatchDeployment(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - pausePatchDeploymentCallable() |
| ResumePatchDeployment | Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues to generate patch jobs. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - resumePatchDeployment(PatchDeployments.ResumePatchDeploymentRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - resumePatchDeployment(PatchDeploymentName name) - resumePatchDeployment(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - resumePatchDeploymentCallable() |
| CreateGuestPolicy | Create an OS Config guest policy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createGuestPolicy(GuestPolicies.CreateGuestPolicyRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - createGuestPolicy(ProjectName parent, GuestPolicies.GuestPolicy guestPolicy) - createGuestPolicy(String parent, GuestPolicies.GuestPolicy guestPolicy) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createGuestPolicyCallable() |
| GetGuestPolicy | Get an OS Config guest policy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getGuestPolicy(GuestPolicies.GetGuestPolicyRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getGuestPolicy(GuestPolicyName name) - getGuestPolicy(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getGuestPolicyCallable() |
| ListGuestPolicies | Get a page of OS Config guest policies. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listGuestPolicies(GuestPolicies.ListGuestPoliciesRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listGuestPolicies(ProjectName parent) - listGuestPolicies(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listGuestPoliciesPagedCallable() - listGuestPoliciesCallable() |
| UpdateGuestPolicy | Update an OS Config guest policy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateGuestPolicy(GuestPolicies.UpdateGuestPolicyRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - updateGuestPolicy(GuestPolicies.GuestPolicy guestPolicy, FieldMask updateMask) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updateGuestPolicyCallable() |
| DeleteGuestPolicy | Delete an OS Config guest policy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteGuestPolicy(GuestPolicies.DeleteGuestPolicyRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - deleteGuestPolicy(GuestPolicyName name) - deleteGuestPolicy(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteGuestPolicyCallable() |
| LookupEffectiveGuestPolicy | Lookup the effective guest policy that applies to a VM instance. This lookup merges all policies that are assigned to the instance ancestry. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - lookupEffectiveGuestPolicy(GuestPolicies.LookupEffectiveGuestPolicyRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - lookupEffectiveGuestPolicyCallable() |
[Methods]

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with
these names, this class includes a format method for each type of name, and additionally a parse
method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of OsConfigServiceSettings to
create(). For example:

To customize credentials:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     OsConfigServiceSettings osConfigServiceSettings =
         OsConfigServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     OsConfigServiceClient osConfigServiceClient =
         OsConfigServiceClient.create(osConfigServiceSettings);
     
To customize the endpoint:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     OsConfigServiceSettings osConfigServiceSettings =
         OsConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     OsConfigServiceClient osConfigServiceClient =
         OsConfigServiceClient.create(osConfigServiceSettings);
     
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
the wire:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     OsConfigServiceSettings osConfigServiceSettings =
         OsConfigServiceSettings.newHttpJsonBuilder().build();
     OsConfigServiceClient osConfigServiceClient =
         OsConfigServiceClient.create(osConfigServiceSettings);
     
Please refer to the GitHub repository's samples for more quickstart code snippets.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> OsConfigServiceClient

## Static Methods

### create()

    public static final OsConfigServiceClient create()

Constructs an instance of OsConfigServiceClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(OsConfigServiceSettings settings)

    public static final OsConfigServiceClient create(OsConfigServiceSettings settings)

Constructs an instance of OsConfigServiceClient, using the given settings. The channels are
created based on the settings passed in, or defaults for any settings that are not set.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(OsConfigServiceStub stub)

    public static final OsConfigServiceClient create(OsConfigServiceStub stub)

Constructs an instance of OsConfigServiceClient, using the given stub for making calls. This is
for advanced usage - prefer using create(OsConfigServiceSettings).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.stub.OsConfigServiceStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient` |   |

## Constructors

### OsConfigServiceClient(OsConfigServiceSettings settings)

    protected OsConfigServiceClient(OsConfigServiceSettings settings)

Constructs an instance of OsConfigServiceClient, using the given settings. This is protected so
that it is easy to make a subclass, but otherwise, the static factory methods should be
preferred.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceSettings` |

### OsConfigServiceClient(OsConfigServiceStub stub)

    protected OsConfigServiceClient(OsConfigServiceStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.stub.OsConfigServiceStub` |

## Methods

### awaitTermination(long duration, TimeUnit unit)

    public boolean awaitTermination(long duration, TimeUnit unit)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `duration` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `unit` | `https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html` |   |

### cancelPatchJob(PatchJobs.CancelPatchJobRequest request)

    public final PatchJobs.PatchJob cancelPatchJob(PatchJobs.CancelPatchJobRequest request)

Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.CancelPatchJobRequest request =
           PatchJobs.CancelPatchJobRequest.newBuilder().setName("name3373707").build();
       PatchJobs.PatchJob response = osConfigServiceClient.cancelPatchJob(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob` |   |

### cancelPatchJobCallable()

    public final UnaryCallable<PatchJobs.CancelPatchJobRequest,PatchJobs.PatchJob> cancelPatchJobCallable()

Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.CancelPatchJobRequest request =
           PatchJobs.CancelPatchJobRequest.newBuilder().setName("name3373707").build();
       ApiFuture<PatchJobs.PatchJob> future =
           osConfigServiceClient.cancelPatchJobCallable().futureCall(request);
       // Do something.
       PatchJobs.PatchJob response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob>` |   |

### close()

    public final void close()

### createGuestPolicy(GuestPolicies.CreateGuestPolicyRequest request)

    public final GuestPolicies.GuestPolicy createGuestPolicy(GuestPolicies.CreateGuestPolicyRequest request)

Create an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.CreateGuestPolicyRequest request =
           GuestPolicies.CreateGuestPolicyRequest.newBuilder()
               .setParent(ProjectName.of("[PROJECT]").toString())
               .setGuestPolicyId("guestPolicyId1234592741")
               .setGuestPolicy(GuestPolicies.GuestPolicy.newBuilder().build())
               .build();
       GuestPolicies.GuestPolicy response = osConfigServiceClient.createGuestPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy` |   |

### createGuestPolicy(ProjectName parent, GuestPolicies.GuestPolicy guestPolicy)

    public final GuestPolicies.GuestPolicy createGuestPolicy(ProjectName parent, GuestPolicies.GuestPolicy guestPolicy)

Create an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       ProjectName parent = ProjectName.of("[PROJECT]");
       GuestPolicies.GuestPolicy guestPolicy = GuestPolicies.GuestPolicy.newBuilder().build();
       GuestPolicies.GuestPolicy response =
           osConfigServiceClient.createGuestPolicy(parent, guestPolicy);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.ProjectName` Required. The resource name of the parent using one of the following forms: `projects/{project_number}`. |
| `guestPolicy` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy` Required. The GuestPolicy to create. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy` |   |

### createGuestPolicy(String parent, GuestPolicies.GuestPolicy guestPolicy)

    public final GuestPolicies.GuestPolicy createGuestPolicy(String parent, GuestPolicies.GuestPolicy guestPolicy)

Create an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       String parent = ProjectName.of("[PROJECT]").toString();
       GuestPolicies.GuestPolicy guestPolicy = GuestPolicies.GuestPolicy.newBuilder().build();
       GuestPolicies.GuestPolicy response =
           osConfigServiceClient.createGuestPolicy(parent, guestPolicy);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the parent using one of the following forms: `projects/{project_number}`. |
| `guestPolicy` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy` Required. The GuestPolicy to create. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy` |   |

### createGuestPolicyCallable()

    public final UnaryCallable<GuestPolicies.CreateGuestPolicyRequest,GuestPolicies.GuestPolicy> createGuestPolicyCallable()

Create an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.CreateGuestPolicyRequest request =
           GuestPolicies.CreateGuestPolicyRequest.newBuilder()
               .setParent(ProjectName.of("[PROJECT]").toString())
               .setGuestPolicyId("guestPolicyId1234592741")
               .setGuestPolicy(GuestPolicies.GuestPolicy.newBuilder().build())
               .build();
       ApiFuture<GuestPolicies.GuestPolicy> future =
           osConfigServiceClient.createGuestPolicyCallable().futureCall(request);
       // Do something.
       GuestPolicies.GuestPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy>` |   |

### createPatchDeployment(PatchDeployments.CreatePatchDeploymentRequest request)

    public final PatchDeployments.PatchDeployment createPatchDeployment(PatchDeployments.CreatePatchDeploymentRequest request)

Create an OS Config patch deployment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.CreatePatchDeploymentRequest request =
           PatchDeployments.CreatePatchDeploymentRequest.newBuilder()
               .setParent("parent-995424086")
               .setPatchDeploymentId("patchDeploymentId-1180405976")
               .setPatchDeployment(PatchDeployments.PatchDeployment.newBuilder().build())
               .build();
       PatchDeployments.PatchDeployment response =
           osConfigServiceClient.createPatchDeployment(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment` |   |

### createPatchDeploymentCallable()

    public final UnaryCallable<PatchDeployments.CreatePatchDeploymentRequest,PatchDeployments.PatchDeployment> createPatchDeploymentCallable()

Create an OS Config patch deployment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.CreatePatchDeploymentRequest request =
           PatchDeployments.CreatePatchDeploymentRequest.newBuilder()
               .setParent("parent-995424086")
               .setPatchDeploymentId("patchDeploymentId-1180405976")
               .setPatchDeployment(PatchDeployments.PatchDeployment.newBuilder().build())
               .build();
       ApiFuture<PatchDeployments.PatchDeployment> future =
           osConfigServiceClient.createPatchDeploymentCallable().futureCall(request);
       // Do something.
       PatchDeployments.PatchDeployment response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>` |   |

### deleteGuestPolicy(GuestPolicies.DeleteGuestPolicyRequest request)

    public final void deleteGuestPolicy(GuestPolicies.DeleteGuestPolicyRequest request)

Delete an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.DeleteGuestPolicyRequest request =
           GuestPolicies.DeleteGuestPolicyRequest.newBuilder()
               .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
               .build();
       osConfigServiceClient.deleteGuestPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest` The request object containing all of the parameters for the API call. |

### deleteGuestPolicy(GuestPolicyName name)

    public final void deleteGuestPolicy(GuestPolicyName name)

Delete an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicyName name = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]");
       osConfigServiceClient.deleteGuestPolicy(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicyName` Required. The resource name of the guest policy using one of the following forms: `projects/{project_number}/guestPolicies/{guest_policy_id}`. |

### deleteGuestPolicy(String name)

    public final void deleteGuestPolicy(String name)

Delete an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       String name = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString();
       osConfigServiceClient.deleteGuestPolicy(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the guest policy using one of the following forms: `projects/{project_number}/guestPolicies/{guest_policy_id}`. |

### deleteGuestPolicyCallable()

    public final UnaryCallable<GuestPolicies.DeleteGuestPolicyRequest,Empty> deleteGuestPolicyCallable()

Delete an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.DeleteGuestPolicyRequest request =
           GuestPolicies.DeleteGuestPolicyRequest.newBuilder()
               .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
               .build();
       ApiFuture<Empty> future =
           osConfigServiceClient.deleteGuestPolicyCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### deletePatchDeployment(PatchDeployments.DeletePatchDeploymentRequest request)

    public final void deletePatchDeployment(PatchDeployments.DeletePatchDeploymentRequest request)

Delete an OS Config patch deployment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.DeletePatchDeploymentRequest request =
           PatchDeployments.DeletePatchDeploymentRequest.newBuilder().setName("name3373707").build();
       osConfigServiceClient.deletePatchDeployment(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest` The request object containing all of the parameters for the API call. |

### deletePatchDeploymentCallable()

    public final UnaryCallable<PatchDeployments.DeletePatchDeploymentRequest,Empty> deletePatchDeploymentCallable()

Delete an OS Config patch deployment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.DeletePatchDeploymentRequest request =
           PatchDeployments.DeletePatchDeploymentRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Empty> future =
           osConfigServiceClient.deletePatchDeploymentCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### executePatchJob(PatchJobs.ExecutePatchJobRequest request)

    public final PatchJobs.PatchJob executePatchJob(PatchJobs.ExecutePatchJobRequest request)

Patch VM instances by creating and running a patch job.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.ExecutePatchJobRequest request =
           PatchJobs.ExecutePatchJobRequest.newBuilder()
               .setParent("parent-995424086")
               .setDescription("description-1724546052")
               .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build())
               .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build())
               .setDuration(Duration.newBuilder().build())
               .setDryRun(true)
               .setDisplayName("displayName1714148973")
               .setRollout(PatchJobs.PatchRollout.newBuilder().build())
               .build();
       PatchJobs.PatchJob response = osConfigServiceClient.executePatchJob(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob` |   |

### executePatchJobCallable()

    public final UnaryCallable<PatchJobs.ExecutePatchJobRequest,PatchJobs.PatchJob> executePatchJobCallable()

Patch VM instances by creating and running a patch job.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.ExecutePatchJobRequest request =
           PatchJobs.ExecutePatchJobRequest.newBuilder()
               .setParent("parent-995424086")
               .setDescription("description-1724546052")
               .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build())
               .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build())
               .setDuration(Duration.newBuilder().build())
               .setDryRun(true)
               .setDisplayName("displayName1714148973")
               .setRollout(PatchJobs.PatchRollout.newBuilder().build())
               .build();
       ApiFuture<PatchJobs.PatchJob> future =
           osConfigServiceClient.executePatchJobCallable().futureCall(request);
       // Do something.
       PatchJobs.PatchJob response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob>` |   |

### getGuestPolicy(GuestPolicies.GetGuestPolicyRequest request)

    public final GuestPolicies.GuestPolicy getGuestPolicy(GuestPolicies.GetGuestPolicyRequest request)

Get an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.GetGuestPolicyRequest request =
           GuestPolicies.GetGuestPolicyRequest.newBuilder()
               .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
               .build();
       GuestPolicies.GuestPolicy response = osConfigServiceClient.getGuestPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy` |   |

### getGuestPolicy(GuestPolicyName name)

    public final GuestPolicies.GuestPolicy getGuestPolicy(GuestPolicyName name)

Get an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicyName name = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]");
       GuestPolicies.GuestPolicy response = osConfigServiceClient.getGuestPolicy(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicyName` Required. The resource name of the guest policy using one of the following forms: `projects/{project_number}/guestPolicies/{guest_policy_id}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy` |   |

### getGuestPolicy(String name)

    public final GuestPolicies.GuestPolicy getGuestPolicy(String name)

Get an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       String name = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString();
       GuestPolicies.GuestPolicy response = osConfigServiceClient.getGuestPolicy(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the guest policy using one of the following forms: `projects/{project_number}/guestPolicies/{guest_policy_id}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy` |   |

### getGuestPolicyCallable()

    public final UnaryCallable<GuestPolicies.GetGuestPolicyRequest,GuestPolicies.GuestPolicy> getGuestPolicyCallable()

Get an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.GetGuestPolicyRequest request =
           GuestPolicies.GetGuestPolicyRequest.newBuilder()
               .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
               .build();
       ApiFuture<GuestPolicies.GuestPolicy> future =
           osConfigServiceClient.getGuestPolicyCallable().futureCall(request);
       // Do something.
       GuestPolicies.GuestPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy>` |   |

### getPatchDeployment(PatchDeployments.GetPatchDeploymentRequest request)

    public final PatchDeployments.PatchDeployment getPatchDeployment(PatchDeployments.GetPatchDeploymentRequest request)

Get an OS Config patch deployment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.GetPatchDeploymentRequest request =
           PatchDeployments.GetPatchDeploymentRequest.newBuilder().setName("name3373707").build();
       PatchDeployments.PatchDeployment response = osConfigServiceClient.getPatchDeployment(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment` |   |

### getPatchDeploymentCallable()

    public final UnaryCallable<PatchDeployments.GetPatchDeploymentRequest,PatchDeployments.PatchDeployment> getPatchDeploymentCallable()

Get an OS Config patch deployment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.GetPatchDeploymentRequest request =
           PatchDeployments.GetPatchDeploymentRequest.newBuilder().setName("name3373707").build();
       ApiFuture<PatchDeployments.PatchDeployment> future =
           osConfigServiceClient.getPatchDeploymentCallable().futureCall(request);
       // Do something.
       PatchDeployments.PatchDeployment response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>` |   |

### getPatchJob(PatchJobs.GetPatchJobRequest request)

    public final PatchJobs.PatchJob getPatchJob(PatchJobs.GetPatchJobRequest request)

Get the patch job. This can be used to track the progress of an ongoing patch job or review the
details of completed jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.GetPatchJobRequest request =
           PatchJobs.GetPatchJobRequest.newBuilder().setName("name3373707").build();
       PatchJobs.PatchJob response = osConfigServiceClient.getPatchJob(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob` |   |

### getPatchJobCallable()

    public final UnaryCallable<PatchJobs.GetPatchJobRequest,PatchJobs.PatchJob> getPatchJobCallable()

Get the patch job. This can be used to track the progress of an ongoing patch job or review the
details of completed jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.GetPatchJobRequest request =
           PatchJobs.GetPatchJobRequest.newBuilder().setName("name3373707").build();
       ApiFuture<PatchJobs.PatchJob> future =
           osConfigServiceClient.getPatchJobCallable().futureCall(request);
       // Do something.
       PatchJobs.PatchJob response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob>` |   |

### getSettings()

    public final OsConfigServiceSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceSettings` |   |

### getStub()

    public OsConfigServiceStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.stub.OsConfigServiceStub` |   |

### isShutdown()

    public boolean isShutdown()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### isTerminated()

    public boolean isTerminated()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### listGuestPolicies(GuestPolicies.ListGuestPoliciesRequest request)

    public final OsConfigServiceClient.ListGuestPoliciesPagedResponse listGuestPolicies(GuestPolicies.ListGuestPoliciesRequest request)

Get a page of OS Config guest policies.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.ListGuestPoliciesRequest request =
           GuestPolicies.ListGuestPoliciesRequest.newBuilder()
               .setParent(ProjectName.of("[PROJECT]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (GuestPolicies.GuestPolicy element :
           osConfigServiceClient.listGuestPolicies(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListGuestPoliciesPagedResponse` |   |

### listGuestPolicies(ProjectName parent)

    public final OsConfigServiceClient.ListGuestPoliciesPagedResponse listGuestPolicies(ProjectName parent)

Get a page of OS Config guest policies.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       ProjectName parent = ProjectName.of("[PROJECT]");
       for (GuestPolicies.GuestPolicy element :
           osConfigServiceClient.listGuestPolicies(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.ProjectName` Required. The resource name of the parent using one of the following forms: `projects/{project_number}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListGuestPoliciesPagedResponse` |   |

### listGuestPolicies(String parent)

    public final OsConfigServiceClient.ListGuestPoliciesPagedResponse listGuestPolicies(String parent)

Get a page of OS Config guest policies.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       String parent = ProjectName.of("[PROJECT]").toString();
       for (GuestPolicies.GuestPolicy element :
           osConfigServiceClient.listGuestPolicies(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the parent using one of the following forms: `projects/{project_number}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListGuestPoliciesPagedResponse` |   |

### listGuestPoliciesCallable()

    public final UnaryCallable<GuestPolicies.ListGuestPoliciesRequest,GuestPolicies.ListGuestPoliciesResponse> listGuestPoliciesCallable()

Get a page of OS Config guest policies.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.ListGuestPoliciesRequest request =
           GuestPolicies.ListGuestPoliciesRequest.newBuilder()
               .setParent(ProjectName.of("[PROJECT]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         GuestPolicies.ListGuestPoliciesResponse response =
             osConfigServiceClient.listGuestPoliciesCallable().call(request);
         for (GuestPolicies.GuestPolicy element : response.getGuestPoliciesList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse>` |   |

### listGuestPoliciesPagedCallable()

    public final UnaryCallable<GuestPolicies.ListGuestPoliciesRequest,OsConfigServiceClient.ListGuestPoliciesPagedResponse> listGuestPoliciesPagedCallable()

Get a page of OS Config guest policies.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.ListGuestPoliciesRequest request =
           GuestPolicies.ListGuestPoliciesRequest.newBuilder()
               .setParent(ProjectName.of("[PROJECT]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<GuestPolicies.GuestPolicy> future =
           osConfigServiceClient.listGuestPoliciesPagedCallable().futureCall(request);
       // Do something.
       for (GuestPolicies.GuestPolicy element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListGuestPoliciesPagedResponse>` |   |

### listPatchDeployments(PatchDeployments.ListPatchDeploymentsRequest request)

    public final OsConfigServiceClient.ListPatchDeploymentsPagedResponse listPatchDeployments(PatchDeployments.ListPatchDeploymentsRequest request)

Get a page of OS Config patch deployments.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.ListPatchDeploymentsRequest request =
           PatchDeployments.ListPatchDeploymentsRequest.newBuilder()
               .setParent("parent-995424086")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (PatchDeployments.PatchDeployment element :
           osConfigServiceClient.listPatchDeployments(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchDeploymentsPagedResponse` |   |

### listPatchDeploymentsCallable()

    public final UnaryCallable<PatchDeployments.ListPatchDeploymentsRequest,PatchDeployments.ListPatchDeploymentsResponse> listPatchDeploymentsCallable()

Get a page of OS Config patch deployments.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.ListPatchDeploymentsRequest request =
           PatchDeployments.ListPatchDeploymentsRequest.newBuilder()
               .setParent("parent-995424086")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         PatchDeployments.ListPatchDeploymentsResponse response =
             osConfigServiceClient.listPatchDeploymentsCallable().call(request);
         for (PatchDeployments.PatchDeployment element : response.getPatchDeploymentsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse>` |   |

### listPatchDeploymentsPagedCallable()

    public final UnaryCallable<PatchDeployments.ListPatchDeploymentsRequest,OsConfigServiceClient.ListPatchDeploymentsPagedResponse> listPatchDeploymentsPagedCallable()

Get a page of OS Config patch deployments.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.ListPatchDeploymentsRequest request =
           PatchDeployments.ListPatchDeploymentsRequest.newBuilder()
               .setParent("parent-995424086")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<PatchDeployments.PatchDeployment> future =
           osConfigServiceClient.listPatchDeploymentsPagedCallable().futureCall(request);
       // Do something.
       for (PatchDeployments.PatchDeployment element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchDeploymentsPagedResponse>` |   |

### listPatchJobInstanceDetails(PatchJobs.ListPatchJobInstanceDetailsRequest request)

    public final OsConfigServiceClient.ListPatchJobInstanceDetailsPagedResponse listPatchJobInstanceDetails(PatchJobs.ListPatchJobInstanceDetailsRequest request)

Get a list of instance details for a given patch job.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.ListPatchJobInstanceDetailsRequest request =
           PatchJobs.ListPatchJobInstanceDetailsRequest.newBuilder()
               .setParent("parent-995424086")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       for (PatchJobs.PatchJobInstanceDetails element :
           osConfigServiceClient.listPatchJobInstanceDetails(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobInstanceDetailsPagedResponse` |   |

### listPatchJobInstanceDetails(String parent)

    public final OsConfigServiceClient.ListPatchJobInstanceDetailsPagedResponse listPatchJobInstanceDetails(String parent)

Get a list of instance details for a given patch job.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       String parent = "parent-995424086";
       for (PatchJobs.PatchJobInstanceDetails element :
           osConfigServiceClient.listPatchJobInstanceDetails(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent for the instances are in the form of `projects/*/patchJobs/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobInstanceDetailsPagedResponse` |   |

### listPatchJobInstanceDetailsCallable()

    public final UnaryCallable<PatchJobs.ListPatchJobInstanceDetailsRequest,PatchJobs.ListPatchJobInstanceDetailsResponse> listPatchJobInstanceDetailsCallable()

Get a list of instance details for a given patch job.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.ListPatchJobInstanceDetailsRequest request =
           PatchJobs.ListPatchJobInstanceDetailsRequest.newBuilder()
               .setParent("parent-995424086")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       while (true) {
         PatchJobs.ListPatchJobInstanceDetailsResponse response =
             osConfigServiceClient.listPatchJobInstanceDetailsCallable().call(request);
         for (PatchJobs.PatchJobInstanceDetails element :
             response.getPatchJobInstanceDetailsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse>` |   |

### listPatchJobInstanceDetailsPagedCallable()

    public final UnaryCallable<PatchJobs.ListPatchJobInstanceDetailsRequest,OsConfigServiceClient.ListPatchJobInstanceDetailsPagedResponse> listPatchJobInstanceDetailsPagedCallable()

Get a list of instance details for a given patch job.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.ListPatchJobInstanceDetailsRequest request =
           PatchJobs.ListPatchJobInstanceDetailsRequest.newBuilder()
               .setParent("parent-995424086")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       ApiFuture<PatchJobs.PatchJobInstanceDetails> future =
           osConfigServiceClient.listPatchJobInstanceDetailsPagedCallable().futureCall(request);
       // Do something.
       for (PatchJobs.PatchJobInstanceDetails element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobInstanceDetailsPagedResponse>` |   |

### listPatchJobs(PatchJobs.ListPatchJobsRequest request)

    public final OsConfigServiceClient.ListPatchJobsPagedResponse listPatchJobs(PatchJobs.ListPatchJobsRequest request)

Get a list of patch jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.ListPatchJobsRequest request =
           PatchJobs.ListPatchJobsRequest.newBuilder()
               .setParent("parent-995424086")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       for (PatchJobs.PatchJob element : osConfigServiceClient.listPatchJobs(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobsPagedResponse` |   |

### listPatchJobsCallable()

    public final UnaryCallable<PatchJobs.ListPatchJobsRequest,PatchJobs.ListPatchJobsResponse> listPatchJobsCallable()

Get a list of patch jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.ListPatchJobsRequest request =
           PatchJobs.ListPatchJobsRequest.newBuilder()
               .setParent("parent-995424086")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       while (true) {
         PatchJobs.ListPatchJobsResponse response =
             osConfigServiceClient.listPatchJobsCallable().call(request);
         for (PatchJobs.PatchJob element : response.getPatchJobsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse>` |   |

### listPatchJobsPagedCallable()

    public final UnaryCallable<PatchJobs.ListPatchJobsRequest,OsConfigServiceClient.ListPatchJobsPagedResponse> listPatchJobsPagedCallable()

Get a list of patch jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchJobs.ListPatchJobsRequest request =
           PatchJobs.ListPatchJobsRequest.newBuilder()
               .setParent("parent-995424086")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       ApiFuture<PatchJobs.PatchJob> future =
           osConfigServiceClient.listPatchJobsPagedCallable().futureCall(request);
       // Do something.
       for (PatchJobs.PatchJob element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobsPagedResponse>` |   |

### lookupEffectiveGuestPolicy(GuestPolicies.LookupEffectiveGuestPolicyRequest request)

    public final GuestPolicies.EffectiveGuestPolicy lookupEffectiveGuestPolicy(GuestPolicies.LookupEffectiveGuestPolicyRequest request)

Lookup the effective guest policy that applies to a VM instance. This lookup merges all
policies that are assigned to the instance ancestry.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.LookupEffectiveGuestPolicyRequest request =
           GuestPolicies.LookupEffectiveGuestPolicyRequest.newBuilder()
               .setInstance("instance555127957")
               .setOsShortName("osShortName1253394339")
               .setOsVersion("osVersion1812004436")
               .setOsArchitecture("osArchitecture1339954519")
               .build();
       GuestPolicies.EffectiveGuestPolicy response =
           osConfigServiceClient.lookupEffectiveGuestPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy` |   |

### lookupEffectiveGuestPolicyCallable()

    public final UnaryCallable<GuestPolicies.LookupEffectiveGuestPolicyRequest,GuestPolicies.EffectiveGuestPolicy> lookupEffectiveGuestPolicyCallable()

Lookup the effective guest policy that applies to a VM instance. This lookup merges all
policies that are assigned to the instance ancestry.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.LookupEffectiveGuestPolicyRequest request =
           GuestPolicies.LookupEffectiveGuestPolicyRequest.newBuilder()
               .setInstance("instance555127957")
               .setOsShortName("osShortName1253394339")
               .setOsVersion("osVersion1812004436")
               .setOsArchitecture("osArchitecture1339954519")
               .build();
       ApiFuture<GuestPolicies.EffectiveGuestPolicy> future =
           osConfigServiceClient.lookupEffectiveGuestPolicyCallable().futureCall(request);
       // Do something.
       GuestPolicies.EffectiveGuestPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy>` |   |

### pausePatchDeployment(PatchDeploymentName name)

    public final PatchDeployments.PatchDeployment pausePatchDeployment(PatchDeploymentName name)

Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate
patch jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeploymentName name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]");
       PatchDeployments.PatchDeployment response = osConfigServiceClient.pausePatchDeployment(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeploymentName` Required. The resource name of the patch deployment in the form `projects/*/patchDeployments/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment` |   |

### pausePatchDeployment(PatchDeployments.PausePatchDeploymentRequest request)

    public final PatchDeployments.PatchDeployment pausePatchDeployment(PatchDeployments.PausePatchDeploymentRequest request)

Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate
patch jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.PausePatchDeploymentRequest request =
           PatchDeployments.PausePatchDeploymentRequest.newBuilder()
               .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString())
               .build();
       PatchDeployments.PatchDeployment response =
           osConfigServiceClient.pausePatchDeployment(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment` |   |

### pausePatchDeployment(String name)

    public final PatchDeployments.PatchDeployment pausePatchDeployment(String name)

Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate
patch jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       String name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString();
       PatchDeployments.PatchDeployment response = osConfigServiceClient.pausePatchDeployment(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the patch deployment in the form `projects/*/patchDeployments/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment` |   |

### pausePatchDeploymentCallable()

    public final UnaryCallable<PatchDeployments.PausePatchDeploymentRequest,PatchDeployments.PatchDeployment> pausePatchDeploymentCallable()

Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate
patch jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.PausePatchDeploymentRequest request =
           PatchDeployments.PausePatchDeploymentRequest.newBuilder()
               .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString())
               .build();
       ApiFuture<PatchDeployments.PatchDeployment> future =
           osConfigServiceClient.pausePatchDeploymentCallable().futureCall(request);
       // Do something.
       PatchDeployments.PatchDeployment response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>` |   |

### resumePatchDeployment(PatchDeploymentName name)

    public final PatchDeployments.PatchDeployment resumePatchDeployment(PatchDeploymentName name)

Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues
to generate patch jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeploymentName name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]");
       PatchDeployments.PatchDeployment response = osConfigServiceClient.resumePatchDeployment(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeploymentName` Required. The resource name of the patch deployment in the form `projects/*/patchDeployments/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment` |   |

### resumePatchDeployment(PatchDeployments.ResumePatchDeploymentRequest request)

    public final PatchDeployments.PatchDeployment resumePatchDeployment(PatchDeployments.ResumePatchDeploymentRequest request)

Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues
to generate patch jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.ResumePatchDeploymentRequest request =
           PatchDeployments.ResumePatchDeploymentRequest.newBuilder()
               .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString())
               .build();
       PatchDeployments.PatchDeployment response =
           osConfigServiceClient.resumePatchDeployment(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment` |   |

### resumePatchDeployment(String name)

    public final PatchDeployments.PatchDeployment resumePatchDeployment(String name)

Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues
to generate patch jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       String name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString();
       PatchDeployments.PatchDeployment response = osConfigServiceClient.resumePatchDeployment(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the patch deployment in the form `projects/*/patchDeployments/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment` |   |

### resumePatchDeploymentCallable()

    public final UnaryCallable<PatchDeployments.ResumePatchDeploymentRequest,PatchDeployments.PatchDeployment> resumePatchDeploymentCallable()

Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues
to generate patch jobs.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.ResumePatchDeploymentRequest request =
           PatchDeployments.ResumePatchDeploymentRequest.newBuilder()
               .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString())
               .build();
       ApiFuture<PatchDeployments.PatchDeployment> future =
           osConfigServiceClient.resumePatchDeploymentCallable().futureCall(request);
       // Do something.
       PatchDeployments.PatchDeployment response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()

### updateGuestPolicy(GuestPolicies.GuestPolicy guestPolicy, FieldMask updateMask)

    public final GuestPolicies.GuestPolicy updateGuestPolicy(GuestPolicies.GuestPolicy guestPolicy, FieldMask updateMask)

Update an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.GuestPolicy guestPolicy = GuestPolicies.GuestPolicy.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       GuestPolicies.GuestPolicy response =
           osConfigServiceClient.updateGuestPolicy(guestPolicy, updateMask);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `guestPolicy` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy` Required. The updated GuestPolicy. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Field mask that controls which fields of the guest policy should be updated. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy` |   |

### updateGuestPolicy(GuestPolicies.UpdateGuestPolicyRequest request)

    public final GuestPolicies.GuestPolicy updateGuestPolicy(GuestPolicies.UpdateGuestPolicyRequest request)

Update an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.UpdateGuestPolicyRequest request =
           GuestPolicies.UpdateGuestPolicyRequest.newBuilder()
               .setGuestPolicy(GuestPolicies.GuestPolicy.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       GuestPolicies.GuestPolicy response = osConfigServiceClient.updateGuestPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy` |   |

### updateGuestPolicyCallable()

    public final UnaryCallable<GuestPolicies.UpdateGuestPolicyRequest,GuestPolicies.GuestPolicy> updateGuestPolicyCallable()

Update an OS Config guest policy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       GuestPolicies.UpdateGuestPolicyRequest request =
           GuestPolicies.UpdateGuestPolicyRequest.newBuilder()
               .setGuestPolicy(GuestPolicies.GuestPolicy.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<GuestPolicies.GuestPolicy> future =
           osConfigServiceClient.updateGuestPolicyCallable().futureCall(request);
       // Do something.
       GuestPolicies.GuestPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy>` |   |

### updatePatchDeployment(PatchDeployments.PatchDeployment patchDeployment, FieldMask updateMask)

    public final PatchDeployments.PatchDeployment updatePatchDeployment(PatchDeployments.PatchDeployment patchDeployment, FieldMask updateMask)

Update an OS Config patch deployment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.PatchDeployment patchDeployment =
           PatchDeployments.PatchDeployment.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       PatchDeployments.PatchDeployment response =
           osConfigServiceClient.updatePatchDeployment(patchDeployment, updateMask);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `patchDeployment` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment` Required. The patch deployment to Update. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Optional. Field mask that controls which fields of the patch deployment should be updated. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment` |   |

### updatePatchDeployment(PatchDeployments.UpdatePatchDeploymentRequest request)

    public final PatchDeployments.PatchDeployment updatePatchDeployment(PatchDeployments.UpdatePatchDeploymentRequest request)

Update an OS Config patch deployment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.UpdatePatchDeploymentRequest request =
           PatchDeployments.UpdatePatchDeploymentRequest.newBuilder()
               .setPatchDeployment(PatchDeployments.PatchDeployment.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       PatchDeployments.PatchDeployment response =
           osConfigServiceClient.updatePatchDeployment(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment` |   |

### updatePatchDeploymentCallable()

    public final UnaryCallable<PatchDeployments.UpdatePatchDeploymentRequest,PatchDeployments.PatchDeployment> updatePatchDeploymentCallable()

Update an OS Config patch deployment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
       PatchDeployments.UpdatePatchDeploymentRequest request =
           PatchDeployments.UpdatePatchDeploymentRequest.newBuilder()
               .setPatchDeployment(PatchDeployments.PatchDeployment.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<PatchDeployments.PatchDeployment> future =
           osConfigServiceClient.updatePatchDeploymentCallable().futureCall(request);
       // Do something.
       PatchDeployments.PatchDeployment response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-os-config/latest/com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>` |   |