diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java index bea51b3b..4fd1566b 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java @@ -1190,7 +1190,9 @@ public final ListOSPolicyAssignmentRevisionsPagedResponse listOSPolicyAssignment *

For `{project}`, either Compute Engine project-number or project-id can be provided. For * `{instance}`, either Compute Engine VM instance-id or instance-name can be provided. * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated This method is deprecated and will be removed in the next major version update. */ + @Deprecated public final InstanceOSPoliciesCompliance getInstanceOSPoliciesCompliance( InstanceOSPoliciesComplianceName name) { GetInstanceOSPoliciesComplianceRequest request = @@ -1222,7 +1224,9 @@ public final InstanceOSPoliciesCompliance getInstanceOSPoliciesCompliance( *

For `{project}`, either Compute Engine project-number or project-id can be provided. For * `{instance}`, either Compute Engine VM instance-id or instance-name can be provided. * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated This method is deprecated and will be removed in the next major version update. */ + @Deprecated public final InstanceOSPoliciesCompliance getInstanceOSPoliciesCompliance(String name) { GetInstanceOSPoliciesComplianceRequest request = GetInstanceOSPoliciesComplianceRequest.newBuilder().setName(name).build(); @@ -1251,7 +1255,9 @@ public final InstanceOSPoliciesCompliance getInstanceOSPoliciesCompliance(String * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated This method is deprecated and will be removed in the next major version update. */ + @Deprecated public final InstanceOSPoliciesCompliance getInstanceOSPoliciesCompliance( GetInstanceOSPoliciesComplianceRequest request) { return getInstanceOSPoliciesComplianceCallable().call(request); @@ -1278,7 +1284,10 @@ public final InstanceOSPoliciesCompliance getInstanceOSPoliciesCompliance( * InstanceOSPoliciesCompliance response = future.get(); * } * } + * + * @deprecated This method is deprecated and will be removed in the next major version update. */ + @Deprecated public final UnaryCallable getInstanceOSPoliciesComplianceCallable() { return stub.getInstanceOSPoliciesComplianceCallable(); @@ -1305,7 +1314,9 @@ public final InstanceOSPoliciesCompliance getInstanceOSPoliciesCompliance( *

Format: `projects/{project}/locations/{location}` *

For `{project}`, either Compute Engine project-number or project-id can be provided. * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated This method is deprecated and will be removed in the next major version update. */ + @Deprecated public final ListInstanceOSPoliciesCompliancesPagedResponse listInstanceOSPoliciesCompliances( LocationName parent) { ListInstanceOSPoliciesCompliancesRequest request = @@ -1336,7 +1347,9 @@ public final ListInstanceOSPoliciesCompliancesPagedResponse listInstanceOSPolici *

Format: `projects/{project}/locations/{location}` *

For `{project}`, either Compute Engine project-number or project-id can be provided. * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated This method is deprecated and will be removed in the next major version update. */ + @Deprecated public final ListInstanceOSPoliciesCompliancesPagedResponse listInstanceOSPoliciesCompliances( String parent) { ListInstanceOSPoliciesCompliancesRequest request = @@ -1369,7 +1382,9 @@ public final ListInstanceOSPoliciesCompliancesPagedResponse listInstanceOSPolici * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated This method is deprecated and will be removed in the next major version update. */ + @Deprecated public final ListInstanceOSPoliciesCompliancesPagedResponse listInstanceOSPoliciesCompliances( ListInstanceOSPoliciesCompliancesRequest request) { return listInstanceOSPoliciesCompliancesPagedCallable().call(request); @@ -1401,7 +1416,10 @@ public final ListInstanceOSPoliciesCompliancesPagedResponse listInstanceOSPolici * } * } * } + * + * @deprecated This method is deprecated and will be removed in the next major version update. */ + @Deprecated public final UnaryCallable< ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesPagedResponse> listInstanceOSPoliciesCompliancesPagedCallable() { @@ -1439,13 +1457,338 @@ public final ListInstanceOSPoliciesCompliancesPagedResponse listInstanceOSPolici * } * } * } + * + * @deprecated This method is deprecated and will be removed in the next major version update. */ + @Deprecated public final UnaryCallable< ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesResponse> listInstanceOSPoliciesCompliancesCallable() { return stub.listInstanceOSPoliciesCompliancesCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the OS policy asssignment report for the specified Compute Engine VM instance. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   OSPolicyAssignmentReportName name =
+   *       OSPolicyAssignmentReportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]");
+   *   OSPolicyAssignmentReport response =
+   *       osConfigZonalServiceClient.getOSPolicyAssignmentReport(name);
+   * }
+   * }
+ * + * @param name Required. API resource name for OS policy assignment report. + *

Format: + * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + *

For `{project}`, either `project-number` or `project-id` can be provided. For + * `{instance_id}`, either Compute Engine `instance-id` or `instance-name` can be provided. + * For `{assignment_id}`, the OSPolicyAssignment id must be provided. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OSPolicyAssignmentReport getOSPolicyAssignmentReport( + OSPolicyAssignmentReportName name) { + GetOSPolicyAssignmentReportRequest request = + GetOSPolicyAssignmentReportRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getOSPolicyAssignmentReport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the OS policy asssignment report for the specified Compute Engine VM instance. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String name =
+   *       OSPolicyAssignmentReportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]")
+   *           .toString();
+   *   OSPolicyAssignmentReport response =
+   *       osConfigZonalServiceClient.getOSPolicyAssignmentReport(name);
+   * }
+   * }
+ * + * @param name Required. API resource name for OS policy assignment report. + *

Format: + * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + *

For `{project}`, either `project-number` or `project-id` can be provided. For + * `{instance_id}`, either Compute Engine `instance-id` or `instance-name` can be provided. + * For `{assignment_id}`, the OSPolicyAssignment id must be provided. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OSPolicyAssignmentReport getOSPolicyAssignmentReport(String name) { + GetOSPolicyAssignmentReportRequest request = + GetOSPolicyAssignmentReportRequest.newBuilder().setName(name).build(); + return getOSPolicyAssignmentReport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the OS policy asssignment report for the specified Compute Engine VM instance. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   GetOSPolicyAssignmentReportRequest request =
+   *       GetOSPolicyAssignmentReportRequest.newBuilder()
+   *           .setName(
+   *               OSPolicyAssignmentReportName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .build();
+   *   OSPolicyAssignmentReport response =
+   *       osConfigZonalServiceClient.getOSPolicyAssignmentReport(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OSPolicyAssignmentReport getOSPolicyAssignmentReport( + GetOSPolicyAssignmentReportRequest request) { + return getOSPolicyAssignmentReportCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the OS policy asssignment report for the specified Compute Engine VM instance. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   GetOSPolicyAssignmentReportRequest request =
+   *       GetOSPolicyAssignmentReportRequest.newBuilder()
+   *           .setName(
+   *               OSPolicyAssignmentReportName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient.getOSPolicyAssignmentReportCallable().futureCall(request);
+   *   // Do something.
+   *   OSPolicyAssignmentReport response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getOSPolicyAssignmentReportCallable() { + return stub.getOSPolicyAssignmentReportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List OS policy asssignment reports for all Compute Engine VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   InstanceOSPolicyAssignmentName parent =
+   *       InstanceOSPolicyAssignmentName.of(
+   *           "[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]");
+   *   for (OSPolicyAssignmentReport element :
+   *       osConfigZonalServiceClient.listOSPolicyAssignmentReports(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + *

Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + *

For `{project}`, either `project-number` or `project-id` can be provided. For + * `{instance}`, either `instance-name`, `instance-id`, or `-` can be provided. If '-' is + * provided, the response will include OSPolicyAssignmentReports for all instances in the + * project/location. For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. Either {instance} or {assignment} must be `-`. + *

For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` returns + * all the reports for all assignments across all instances. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOSPolicyAssignmentReportsPagedResponse listOSPolicyAssignmentReports( + InstanceOSPolicyAssignmentName parent) { + ListOSPolicyAssignmentReportsRequest request = + ListOSPolicyAssignmentReportsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listOSPolicyAssignmentReports(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List OS policy asssignment reports for all Compute Engine VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String parent =
+   *       InstanceOSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]")
+   *           .toString();
+   *   for (OSPolicyAssignmentReport element :
+   *       osConfigZonalServiceClient.listOSPolicyAssignmentReports(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + *

Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + *

For `{project}`, either `project-number` or `project-id` can be provided. For + * `{instance}`, either `instance-name`, `instance-id`, or `-` can be provided. If '-' is + * provided, the response will include OSPolicyAssignmentReports for all instances in the + * project/location. For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. Either {instance} or {assignment} must be `-`. + *

For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` returns + * all the reports for all assignments across all instances. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOSPolicyAssignmentReportsPagedResponse listOSPolicyAssignmentReports( + String parent) { + ListOSPolicyAssignmentReportsRequest request = + ListOSPolicyAssignmentReportsRequest.newBuilder().setParent(parent).build(); + return listOSPolicyAssignmentReports(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List OS policy asssignment reports for all Compute Engine VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListOSPolicyAssignmentReportsRequest request =
+   *       ListOSPolicyAssignmentReportsRequest.newBuilder()
+   *           .setParent(
+   *               InstanceOSPolicyAssignmentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setFilter("filter-1274492040")
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (OSPolicyAssignmentReport element :
+   *       osConfigZonalServiceClient.listOSPolicyAssignmentReports(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOSPolicyAssignmentReportsPagedResponse listOSPolicyAssignmentReports( + ListOSPolicyAssignmentReportsRequest request) { + return listOSPolicyAssignmentReportsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List OS policy asssignment reports for all Compute Engine VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListOSPolicyAssignmentReportsRequest request =
+   *       ListOSPolicyAssignmentReportsRequest.newBuilder()
+   *           .setParent(
+   *               InstanceOSPolicyAssignmentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setFilter("filter-1274492040")
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient
+   *           .listOSPolicyAssignmentReportsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (OSPolicyAssignmentReport element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListOSPolicyAssignmentReportsRequest, ListOSPolicyAssignmentReportsPagedResponse> + listOSPolicyAssignmentReportsPagedCallable() { + return stub.listOSPolicyAssignmentReportsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List OS policy asssignment reports for all Compute Engine VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListOSPolicyAssignmentReportsRequest request =
+   *       ListOSPolicyAssignmentReportsRequest.newBuilder()
+   *           .setParent(
+   *               InstanceOSPolicyAssignmentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setFilter("filter-1274492040")
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListOSPolicyAssignmentReportsResponse response =
+   *         osConfigZonalServiceClient.listOSPolicyAssignmentReportsCallable().call(request);
+   *     for (OSPolicyAssignmentReport element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListOSPolicyAssignmentReportsRequest, ListOSPolicyAssignmentReportsResponse> + listOSPolicyAssignmentReportsCallable() { + return stub.listOSPolicyAssignmentReportsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Get inventory data for the specified VM instance. If the VM has no associated inventory, the @@ -1568,9 +1911,8 @@ public final UnaryCallable getInventoryCallable( * } * * @param parent Required. The parent resource name. - *

Format: `projects/{project}/locations/{location}/instances/{instance}` - *

For `{project}`, either `project-number` or `project-id` can be provided. For - * `{instance}`, only hyphen or dash character is supported to list inventories across VMs. + *

Format: `projects/{project}/locations/{location}/instances/-` + *

For `{project}`, either `project-number` or `project-id` can be provided. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInventoriesPagedResponse listInventories(InstanceName parent) { @@ -1598,9 +1940,8 @@ public final ListInventoriesPagedResponse listInventories(InstanceName parent) { * } * * @param parent Required. The parent resource name. - *

Format: `projects/{project}/locations/{location}/instances/{instance}` - *

For `{project}`, either `project-number` or `project-id` can be provided. For - * `{instance}`, only hyphen or dash character is supported to list inventories across VMs. + *

Format: `projects/{project}/locations/{location}/instances/-` + *

For `{project}`, either `project-number` or `project-id` can be provided. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListInventoriesPagedResponse listInventories(String parent) { @@ -1837,9 +2178,8 @@ public final VulnerabilityReport getVulnerabilityReport(GetVulnerabilityReportRe * } * * @param parent Required. The parent resource name. - *

Format: `projects/{project}/locations/{location}/instances/{instance}` - *

For `{project}`, either `project-number` or `project-id` can be provided. For - * `{instance}`, only `-` character is supported to list vulnerability reports across VMs. + *

Format: `projects/{project}/locations/{location}/instances/-` + *

For `{project}`, either `project-number` or `project-id` can be provided. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListVulnerabilityReportsPagedResponse listVulnerabilityReports(InstanceName parent) { @@ -1868,9 +2208,8 @@ public final ListVulnerabilityReportsPagedResponse listVulnerabilityReports(Inst * } * * @param parent Required. The parent resource name. - *

Format: `projects/{project}/locations/{location}/instances/{instance}` - *

For `{project}`, either `project-number` or `project-id` can be provided. For - * `{instance}`, only `-` character is supported to list vulnerability reports across VMs. + *

Format: `projects/{project}/locations/{location}/instances/-` + *

For `{project}`, either `project-number` or `project-id` can be provided. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListVulnerabilityReportsPagedResponse listVulnerabilityReports(String parent) { @@ -2290,6 +2629,103 @@ protected ListInstanceOSPoliciesCompliancesFixedSizeCollection createCollection( } } + public static class ListOSPolicyAssignmentReportsPagedResponse + extends AbstractPagedListResponse< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + OSPolicyAssignmentReport, + ListOSPolicyAssignmentReportsPage, + ListOSPolicyAssignmentReportsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + OSPolicyAssignmentReport> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListOSPolicyAssignmentReportsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListOSPolicyAssignmentReportsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListOSPolicyAssignmentReportsPagedResponse(ListOSPolicyAssignmentReportsPage page) { + super(page, ListOSPolicyAssignmentReportsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListOSPolicyAssignmentReportsPage + extends AbstractPage< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + OSPolicyAssignmentReport, + ListOSPolicyAssignmentReportsPage> { + + private ListOSPolicyAssignmentReportsPage( + PageContext< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + OSPolicyAssignmentReport> + context, + ListOSPolicyAssignmentReportsResponse response) { + super(context, response); + } + + private static ListOSPolicyAssignmentReportsPage createEmptyPage() { + return new ListOSPolicyAssignmentReportsPage(null, null); + } + + @Override + protected ListOSPolicyAssignmentReportsPage createPage( + PageContext< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + OSPolicyAssignmentReport> + context, + ListOSPolicyAssignmentReportsResponse response) { + return new ListOSPolicyAssignmentReportsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + OSPolicyAssignmentReport> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListOSPolicyAssignmentReportsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + OSPolicyAssignmentReport, + ListOSPolicyAssignmentReportsPage, + ListOSPolicyAssignmentReportsFixedSizeCollection> { + + private ListOSPolicyAssignmentReportsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListOSPolicyAssignmentReportsFixedSizeCollection createEmptyCollection() { + return new ListOSPolicyAssignmentReportsFixedSizeCollection(null, 0); + } + + @Override + protected ListOSPolicyAssignmentReportsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListOSPolicyAssignmentReportsFixedSizeCollection(pages, collectionSize); + } + } + public static class ListInventoriesPagedResponse extends AbstractPagedListResponse< ListInventoriesRequest, diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceSettings.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceSettings.java index 0549ab64..d1f49f04 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceSettings.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceSettings.java @@ -18,6 +18,7 @@ import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInstanceOSPoliciesCompliancesPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInventoriesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentReportsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentRevisionsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListVulnerabilityReportsPagedResponse; @@ -148,14 +149,24 @@ public class OsConfigZonalServiceSettings extends ClientSettings getInstanceOSPoliciesComplianceSettings() { return ((OsConfigZonalServiceStubSettings) getStubSettings()) .getInstanceOSPoliciesComplianceSettings(); } - /** Returns the object with the settings used for calls to listInstanceOSPoliciesCompliances. */ + /** + * Returns the object with the settings used for calls to listInstanceOSPoliciesCompliances. + * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated public PagedCallSettings< ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesResponse, @@ -165,6 +176,23 @@ public class OsConfigZonalServiceSettings extends ClientSettings + getOSPolicyAssignmentReportSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()) + .getOSPolicyAssignmentReportSettings(); + } + + /** Returns the object with the settings used for calls to listOSPolicyAssignmentReports. */ + public PagedCallSettings< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + ListOSPolicyAssignmentReportsPagedResponse> + listOSPolicyAssignmentReportsSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()) + .listOSPolicyAssignmentReportsSettings(); + } + /** Returns the object with the settings used for calls to getInventory. */ public UnaryCallSettings getInventorySettings() { return ((OsConfigZonalServiceStubSettings) getStubSettings()).getInventorySettings(); @@ -358,14 +386,24 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().deleteOSPolicyAssignmentOperationSettings(); } - /** Returns the builder for the settings used for calls to getInstanceOSPoliciesCompliance. */ + /** + * Returns the builder for the settings used for calls to getInstanceOSPoliciesCompliance. + * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated public UnaryCallSettings.Builder< GetInstanceOSPoliciesComplianceRequest, InstanceOSPoliciesCompliance> getInstanceOSPoliciesComplianceSettings() { return getStubSettingsBuilder().getInstanceOSPoliciesComplianceSettings(); } - /** Returns the builder for the settings used for calls to listInstanceOSPoliciesCompliances. */ + /** + * Returns the builder for the settings used for calls to listInstanceOSPoliciesCompliances. + * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated public PagedCallSettings.Builder< ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesResponse, @@ -374,6 +412,21 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().listInstanceOSPoliciesCompliancesSettings(); } + /** Returns the builder for the settings used for calls to getOSPolicyAssignmentReport. */ + public UnaryCallSettings.Builder + getOSPolicyAssignmentReportSettings() { + return getStubSettingsBuilder().getOSPolicyAssignmentReportSettings(); + } + + /** Returns the builder for the settings used for calls to listOSPolicyAssignmentReports. */ + public PagedCallSettings.Builder< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + ListOSPolicyAssignmentReportsPagedResponse> + listOSPolicyAssignmentReportsSettings() { + return getStubSettingsBuilder().listOSPolicyAssignmentReportsSettings(); + } + /** Returns the builder for the settings used for calls to getInventory. */ public UnaryCallSettings.Builder getInventorySettings() { return getStubSettingsBuilder().getInventorySettings(); diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/gapic_metadata.json b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/gapic_metadata.json index 558ddc10..a65275d7 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/gapic_metadata.json +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/gapic_metadata.json @@ -25,6 +25,9 @@ "GetOSPolicyAssignment": { "methods": ["getOSPolicyAssignment", "getOSPolicyAssignment", "getOSPolicyAssignment", "getOSPolicyAssignmentCallable"] }, + "GetOSPolicyAssignmentReport": { + "methods": ["getOSPolicyAssignmentReport", "getOSPolicyAssignmentReport", "getOSPolicyAssignmentReport", "getOSPolicyAssignmentReportCallable"] + }, "GetVulnerabilityReport": { "methods": ["getVulnerabilityReport", "getVulnerabilityReport", "getVulnerabilityReport", "getVulnerabilityReportCallable"] }, @@ -34,6 +37,9 @@ "ListInventories": { "methods": ["listInventories", "listInventories", "listInventories", "listInventoriesPagedCallable", "listInventoriesCallable"] }, + "ListOSPolicyAssignmentReports": { + "methods": ["listOSPolicyAssignmentReports", "listOSPolicyAssignmentReports", "listOSPolicyAssignmentReports", "listOSPolicyAssignmentReportsPagedCallable", "listOSPolicyAssignmentReportsCallable"] + }, "ListOSPolicyAssignmentRevisions": { "methods": ["listOSPolicyAssignmentRevisions", "listOSPolicyAssignmentRevisions", "listOSPolicyAssignmentRevisions", "listOSPolicyAssignmentRevisionsPagedCallable", "listOSPolicyAssignmentRevisionsCallable"] }, diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/package-info.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/package-info.java index c58a50c3..f32f446b 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/package-info.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/package-info.java @@ -15,7 +15,9 @@ */ /** - * The interfaces provided are listed below, along with usage samples. + * A client to OS Config API + * + *

The interfaces provided are listed below, along with usage samples. * *

======================= OsConfigZonalServiceClient ======================= * diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceStub.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceStub.java index eb0ddbe1..a8a3cc04 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceStub.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceStub.java @@ -18,6 +18,7 @@ import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInstanceOSPoliciesCompliancesPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInventoriesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentReportsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentRevisionsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListVulnerabilityReportsPagedResponse; @@ -34,6 +35,7 @@ import com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; import com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; import com.google.cloud.osconfig.v1alpha.GetInventoryRequest; +import com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest; import com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; import com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; import com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; @@ -42,6 +44,8 @@ import com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; import com.google.cloud.osconfig.v1alpha.ListInventoriesRequest; import com.google.cloud.osconfig.v1alpha.ListInventoriesResponse; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse; import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; @@ -50,6 +54,7 @@ import com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; import com.google.cloud.osconfig.v1alpha.OSPolicyAssignment; import com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; +import com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport; import com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; import com.google.cloud.osconfig.v1alpha.VulnerabilityReport; import com.google.common.collect.ImmutableMap; @@ -178,6 +183,35 @@ public class GrpcOsConfigZonalServiceStub extends OsConfigZonalServiceStub { ListInstanceOSPoliciesCompliancesResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor< + GetOSPolicyAssignmentReportRequest, OSPolicyAssignmentReport> + getOSPolicyAssignmentReportMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/GetOSPolicyAssignmentReport") + .setRequestMarshaller( + ProtoUtils.marshaller(GetOSPolicyAssignmentReportRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(OSPolicyAssignmentReport.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListOSPolicyAssignmentReportsRequest, ListOSPolicyAssignmentReportsResponse> + listOSPolicyAssignmentReportsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/ListOSPolicyAssignmentReports") + .setRequestMarshaller( + ProtoUtils.marshaller(ListOSPolicyAssignmentReportsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListOSPolicyAssignmentReportsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor getInventoryMethodDescriptor = MethodDescriptor.newBuilder() @@ -260,6 +294,14 @@ public class GrpcOsConfigZonalServiceStub extends OsConfigZonalServiceStub { private final UnaryCallable< ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesPagedResponse> listInstanceOSPoliciesCompliancesPagedCallable; + private final UnaryCallable + getOSPolicyAssignmentReportCallable; + private final UnaryCallable< + ListOSPolicyAssignmentReportsRequest, ListOSPolicyAssignmentReportsResponse> + listOSPolicyAssignmentReportsCallable; + private final UnaryCallable< + ListOSPolicyAssignmentReportsRequest, ListOSPolicyAssignmentReportsPagedResponse> + listOSPolicyAssignmentReportsPagedCallable; private final UnaryCallable getInventoryCallable; private final UnaryCallable listInventoriesCallable; @@ -416,6 +458,31 @@ protected GrpcOsConfigZonalServiceStub( return params.build(); }) .build(); + GrpcCallSettings + getOSPolicyAssignmentReportTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getOSPolicyAssignmentReportMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listOSPolicyAssignmentReportsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listOSPolicyAssignmentReportsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings getInventoryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getInventoryMethodDescriptor) @@ -534,6 +601,21 @@ protected GrpcOsConfigZonalServiceStub( listInstanceOSPoliciesCompliancesTransportSettings, settings.listInstanceOSPoliciesCompliancesSettings(), clientContext); + this.getOSPolicyAssignmentReportCallable = + callableFactory.createUnaryCallable( + getOSPolicyAssignmentReportTransportSettings, + settings.getOSPolicyAssignmentReportSettings(), + clientContext); + this.listOSPolicyAssignmentReportsCallable = + callableFactory.createUnaryCallable( + listOSPolicyAssignmentReportsTransportSettings, + settings.listOSPolicyAssignmentReportsSettings(), + clientContext); + this.listOSPolicyAssignmentReportsPagedCallable = + callableFactory.createPagedCallable( + listOSPolicyAssignmentReportsTransportSettings, + settings.listOSPolicyAssignmentReportsSettings(), + clientContext); this.getInventoryCallable = callableFactory.createUnaryCallable( getInventoryTransportSettings, settings.getInventorySettings(), clientContext); @@ -658,6 +740,25 @@ public GrpcOperationsStub getOperationsStub() { return listInstanceOSPoliciesCompliancesPagedCallable; } + @Override + public UnaryCallable + getOSPolicyAssignmentReportCallable() { + return getOSPolicyAssignmentReportCallable; + } + + @Override + public UnaryCallable + listOSPolicyAssignmentReportsCallable() { + return listOSPolicyAssignmentReportsCallable; + } + + @Override + public UnaryCallable< + ListOSPolicyAssignmentReportsRequest, ListOSPolicyAssignmentReportsPagedResponse> + listOSPolicyAssignmentReportsPagedCallable() { + return listOSPolicyAssignmentReportsPagedCallable; + } + @Override public UnaryCallable getInventoryCallable() { return getInventoryCallable; diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStub.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStub.java index a4f56fe9..18ff1add 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStub.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStub.java @@ -18,6 +18,7 @@ import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInstanceOSPoliciesCompliancesPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInventoriesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentReportsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentRevisionsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListVulnerabilityReportsPagedResponse; @@ -30,6 +31,7 @@ import com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; import com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; import com.google.cloud.osconfig.v1alpha.GetInventoryRequest; +import com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest; import com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; import com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; import com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; @@ -38,6 +40,8 @@ import com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; import com.google.cloud.osconfig.v1alpha.ListInventoriesRequest; import com.google.cloud.osconfig.v1alpha.ListInventoriesResponse; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse; import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; @@ -46,6 +50,7 @@ import com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; import com.google.cloud.osconfig.v1alpha.OSPolicyAssignment; import com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; +import com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport; import com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; import com.google.cloud.osconfig.v1alpha.VulnerabilityReport; import com.google.longrunning.Operation; @@ -133,12 +138,14 @@ public OperationsStub getOperationsStub() { throw new UnsupportedOperationException("Not implemented: deleteOSPolicyAssignmentCallable()"); } + @Deprecated public UnaryCallable getInstanceOSPoliciesComplianceCallable() { throw new UnsupportedOperationException( "Not implemented: getInstanceOSPoliciesComplianceCallable()"); } + @Deprecated public UnaryCallable< ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesPagedResponse> listInstanceOSPoliciesCompliancesPagedCallable() { @@ -146,6 +153,7 @@ public OperationsStub getOperationsStub() { "Not implemented: listInstanceOSPoliciesCompliancesPagedCallable()"); } + @Deprecated public UnaryCallable< ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesResponse> listInstanceOSPoliciesCompliancesCallable() { @@ -153,6 +161,25 @@ public OperationsStub getOperationsStub() { "Not implemented: listInstanceOSPoliciesCompliancesCallable()"); } + public UnaryCallable + getOSPolicyAssignmentReportCallable() { + throw new UnsupportedOperationException( + "Not implemented: getOSPolicyAssignmentReportCallable()"); + } + + public UnaryCallable< + ListOSPolicyAssignmentReportsRequest, ListOSPolicyAssignmentReportsPagedResponse> + listOSPolicyAssignmentReportsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listOSPolicyAssignmentReportsPagedCallable()"); + } + + public UnaryCallable + listOSPolicyAssignmentReportsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listOSPolicyAssignmentReportsCallable()"); + } + public UnaryCallable getInventoryCallable() { throw new UnsupportedOperationException("Not implemented: getInventoryCallable()"); } diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStubSettings.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStubSettings.java index 57b84cb7..332d0ea4 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStubSettings.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStubSettings.java @@ -18,6 +18,7 @@ import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInstanceOSPoliciesCompliancesPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInventoriesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentReportsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentRevisionsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListVulnerabilityReportsPagedResponse; @@ -52,6 +53,7 @@ import com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; import com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; import com.google.cloud.osconfig.v1alpha.GetInventoryRequest; +import com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest; import com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; import com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; import com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; @@ -60,6 +62,8 @@ import com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; import com.google.cloud.osconfig.v1alpha.ListInventoriesRequest; import com.google.cloud.osconfig.v1alpha.ListInventoriesResponse; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse; import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; @@ -68,6 +72,7 @@ import com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; import com.google.cloud.osconfig.v1alpha.OSPolicyAssignment; import com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; +import com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport; import com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; import com.google.cloud.osconfig.v1alpha.VulnerabilityReport; import com.google.common.collect.ImmutableList; @@ -157,6 +162,13 @@ public class OsConfigZonalServiceStubSettings ListInstanceOSPoliciesCompliancesResponse, ListInstanceOSPoliciesCompliancesPagedResponse> listInstanceOSPoliciesCompliancesSettings; + private final UnaryCallSettings + getOSPolicyAssignmentReportSettings; + private final PagedCallSettings< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + ListOSPolicyAssignmentReportsPagedResponse> + listOSPolicyAssignmentReportsSettings; private final UnaryCallSettings getInventorySettings; private final PagedCallSettings< ListInventoriesRequest, ListInventoriesResponse, ListInventoriesPagedResponse> @@ -312,6 +324,55 @@ public Iterable extractResources( } }; + private static final PagedListDescriptor< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + OSPolicyAssignmentReport> + LIST_O_S_POLICY_ASSIGNMENT_REPORTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + OSPolicyAssignmentReport>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListOSPolicyAssignmentReportsRequest injectToken( + ListOSPolicyAssignmentReportsRequest payload, String token) { + return ListOSPolicyAssignmentReportsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListOSPolicyAssignmentReportsRequest injectPageSize( + ListOSPolicyAssignmentReportsRequest payload, int pageSize) { + return ListOSPolicyAssignmentReportsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListOSPolicyAssignmentReportsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListOSPolicyAssignmentReportsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListOSPolicyAssignmentReportsResponse payload) { + return payload.getOsPolicyAssignmentReportsList() == null + ? ImmutableList.of() + : payload.getOsPolicyAssignmentReportsList(); + } + }; + private static final PagedListDescriptor< ListInventoriesRequest, ListInventoriesResponse, Inventory> LIST_INVENTORIES_PAGE_STR_DESC = @@ -491,6 +552,38 @@ public ApiFuture getFuturePagedR } }; + private static final PagedListResponseFactory< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + ListOSPolicyAssignmentReportsPagedResponse> + LIST_O_S_POLICY_ASSIGNMENT_REPORTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + ListOSPolicyAssignmentReportsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListOSPolicyAssignmentReportsRequest, ListOSPolicyAssignmentReportsResponse> + callable, + ListOSPolicyAssignmentReportsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + OSPolicyAssignmentReport> + pageContext = + PageContext.create( + callable, + LIST_O_S_POLICY_ASSIGNMENT_REPORTS_PAGE_STR_DESC, + request, + context); + return ListOSPolicyAssignmentReportsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListInventoriesRequest, ListInventoriesResponse, ListInventoriesPagedResponse> LIST_INVENTORIES_PAGE_STR_FACT = @@ -598,13 +691,23 @@ public ApiFuture getFuturePagedResponse( return deleteOSPolicyAssignmentOperationSettings; } - /** Returns the object with the settings used for calls to getInstanceOSPoliciesCompliance. */ + /** + * Returns the object with the settings used for calls to getInstanceOSPoliciesCompliance. + * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated public UnaryCallSettings getInstanceOSPoliciesComplianceSettings() { return getInstanceOSPoliciesComplianceSettings; } - /** Returns the object with the settings used for calls to listInstanceOSPoliciesCompliances. */ + /** + * Returns the object with the settings used for calls to listInstanceOSPoliciesCompliances. + * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated public PagedCallSettings< ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesResponse, @@ -613,6 +716,21 @@ public ApiFuture getFuturePagedResponse( return listInstanceOSPoliciesCompliancesSettings; } + /** Returns the object with the settings used for calls to getOSPolicyAssignmentReport. */ + public UnaryCallSettings + getOSPolicyAssignmentReportSettings() { + return getOSPolicyAssignmentReportSettings; + } + + /** Returns the object with the settings used for calls to listOSPolicyAssignmentReports. */ + public PagedCallSettings< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + ListOSPolicyAssignmentReportsPagedResponse> + listOSPolicyAssignmentReportsSettings() { + return listOSPolicyAssignmentReportsSettings; + } + /** Returns the object with the settings used for calls to getInventory. */ public UnaryCallSettings getInventorySettings() { return getInventorySettings; @@ -733,6 +851,10 @@ protected OsConfigZonalServiceStubSettings(Builder settingsBuilder) throws IOExc settingsBuilder.getInstanceOSPoliciesComplianceSettings().build(); listInstanceOSPoliciesCompliancesSettings = settingsBuilder.listInstanceOSPoliciesCompliancesSettings().build(); + getOSPolicyAssignmentReportSettings = + settingsBuilder.getOSPolicyAssignmentReportSettings().build(); + listOSPolicyAssignmentReportsSettings = + settingsBuilder.listOSPolicyAssignmentReportsSettings().build(); getInventorySettings = settingsBuilder.getInventorySettings().build(); listInventoriesSettings = settingsBuilder.listInventoriesSettings().build(); getVulnerabilityReportSettings = settingsBuilder.getVulnerabilityReportSettings().build(); @@ -782,6 +904,14 @@ public static class Builder ListInstanceOSPoliciesCompliancesResponse, ListInstanceOSPoliciesCompliancesPagedResponse> listInstanceOSPoliciesCompliancesSettings; + private final UnaryCallSettings.Builder< + GetOSPolicyAssignmentReportRequest, OSPolicyAssignmentReport> + getOSPolicyAssignmentReportSettings; + private final PagedCallSettings.Builder< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + ListOSPolicyAssignmentReportsPagedResponse> + listOSPolicyAssignmentReportsSettings; private final UnaryCallSettings.Builder getInventorySettings; private final PagedCallSettings.Builder< ListInventoriesRequest, ListInventoriesResponse, ListInventoriesPagedResponse> @@ -845,6 +975,9 @@ protected Builder(ClientContext clientContext) { getInstanceOSPoliciesComplianceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listInstanceOSPoliciesCompliancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCE_O_S_POLICIES_COMPLIANCES_PAGE_STR_FACT); + getOSPolicyAssignmentReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listOSPolicyAssignmentReportsSettings = + PagedCallSettings.newBuilder(LIST_O_S_POLICY_ASSIGNMENT_REPORTS_PAGE_STR_FACT); getInventorySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listInventoriesSettings = PagedCallSettings.newBuilder(LIST_INVENTORIES_PAGE_STR_FACT); getVulnerabilityReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -861,6 +994,8 @@ protected Builder(ClientContext clientContext) { deleteOSPolicyAssignmentSettings, getInstanceOSPoliciesComplianceSettings, listInstanceOSPoliciesCompliancesSettings, + getOSPolicyAssignmentReportSettings, + listOSPolicyAssignmentReportsSettings, getInventorySettings, listInventoriesSettings, getVulnerabilityReportSettings, @@ -888,6 +1023,10 @@ protected Builder(OsConfigZonalServiceStubSettings settings) { settings.getInstanceOSPoliciesComplianceSettings.toBuilder(); listInstanceOSPoliciesCompliancesSettings = settings.listInstanceOSPoliciesCompliancesSettings.toBuilder(); + getOSPolicyAssignmentReportSettings = + settings.getOSPolicyAssignmentReportSettings.toBuilder(); + listOSPolicyAssignmentReportsSettings = + settings.listOSPolicyAssignmentReportsSettings.toBuilder(); getInventorySettings = settings.getInventorySettings.toBuilder(); listInventoriesSettings = settings.listInventoriesSettings.toBuilder(); getVulnerabilityReportSettings = settings.getVulnerabilityReportSettings.toBuilder(); @@ -903,6 +1042,8 @@ protected Builder(OsConfigZonalServiceStubSettings settings) { deleteOSPolicyAssignmentSettings, getInstanceOSPoliciesComplianceSettings, listInstanceOSPoliciesCompliancesSettings, + getOSPolicyAssignmentReportSettings, + listOSPolicyAssignmentReportsSettings, getInventorySettings, listInventoriesSettings, getVulnerabilityReportSettings, @@ -963,6 +1104,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .getOSPolicyAssignmentReportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listOSPolicyAssignmentReportsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .getInventorySettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -1149,14 +1300,24 @@ public Builder applyToAllUnaryMethods( return deleteOSPolicyAssignmentOperationSettings; } - /** Returns the builder for the settings used for calls to getInstanceOSPoliciesCompliance. */ + /** + * Returns the builder for the settings used for calls to getInstanceOSPoliciesCompliance. + * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated public UnaryCallSettings.Builder< GetInstanceOSPoliciesComplianceRequest, InstanceOSPoliciesCompliance> getInstanceOSPoliciesComplianceSettings() { return getInstanceOSPoliciesComplianceSettings; } - /** Returns the builder for the settings used for calls to listInstanceOSPoliciesCompliances. */ + /** + * Returns the builder for the settings used for calls to listInstanceOSPoliciesCompliances. + * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated public PagedCallSettings.Builder< ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesResponse, @@ -1165,6 +1326,21 @@ public Builder applyToAllUnaryMethods( return listInstanceOSPoliciesCompliancesSettings; } + /** Returns the builder for the settings used for calls to getOSPolicyAssignmentReport. */ + public UnaryCallSettings.Builder + getOSPolicyAssignmentReportSettings() { + return getOSPolicyAssignmentReportSettings; + } + + /** Returns the builder for the settings used for calls to listOSPolicyAssignmentReports. */ + public PagedCallSettings.Builder< + ListOSPolicyAssignmentReportsRequest, + ListOSPolicyAssignmentReportsResponse, + ListOSPolicyAssignmentReportsPagedResponse> + listOSPolicyAssignmentReportsSettings() { + return listOSPolicyAssignmentReportsSettings; + } + /** Returns the builder for the settings used for calls to getInventory. */ public UnaryCallSettings.Builder getInventorySettings() { return getInventorySettings; diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java index f8afa5bf..20cb53ef 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java @@ -56,6 +56,7 @@ * .setDuration(Duration.newBuilder().build()) * .setDryRun(true) * .setDisplayName("displayName1714148973") + * .setRollout(PatchJobs.PatchRollout.newBuilder().build()) * .build(); * PatchJobs.PatchJob response = osConfigServiceClient.executePatchJob(request); * } @@ -181,6 +182,7 @@ public OsConfigServiceStub getStub() { * .setDuration(Duration.newBuilder().build()) * .setDryRun(true) * .setDisplayName("displayName1714148973") + * .setRollout(PatchJobs.PatchRollout.newBuilder().build()) * .build(); * PatchJobs.PatchJob response = osConfigServiceClient.executePatchJob(request); * } @@ -210,6 +212,7 @@ public final PatchJobs.PatchJob executePatchJob(PatchJobs.ExecutePatchJobRequest * .setDuration(Duration.newBuilder().build()) * .setDryRun(true) * .setDisplayName("displayName1714148973") + * .setRollout(PatchJobs.PatchRollout.newBuilder().build()) * .build(); * ApiFuture future = * osConfigServiceClient.executePatchJobCallable().futureCall(request); @@ -765,6 +768,293 @@ public final void deletePatchDeployment(PatchDeployments.DeletePatchDeploymentRe return stub.deletePatchDeploymentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an OS Config patch deployment. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeployments.PatchDeployment patchDeployment =
+   *       PatchDeployments.PatchDeployment.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   PatchDeployments.PatchDeployment response =
+   *       osConfigServiceClient.updatePatchDeployment(patchDeployment, updateMask);
+   * }
+   * }
+ * + * @param patchDeployment Required. The patch deployment to Update. + * @param updateMask Optional. Field mask that controls which fields of the patch deployment + * should be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PatchDeployments.PatchDeployment updatePatchDeployment( + PatchDeployments.PatchDeployment patchDeployment, FieldMask updateMask) { + PatchDeployments.UpdatePatchDeploymentRequest request = + PatchDeployments.UpdatePatchDeploymentRequest.newBuilder() + .setPatchDeployment(patchDeployment) + .setUpdateMask(updateMask) + .build(); + return updatePatchDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an OS Config patch deployment. + * + *

Sample code: + * + *

{@code
+   * 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);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PatchDeployments.PatchDeployment updatePatchDeployment( + PatchDeployments.UpdatePatchDeploymentRequest request) { + return updatePatchDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an OS Config patch deployment. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeployments.UpdatePatchDeploymentRequest request =
+   *       PatchDeployments.UpdatePatchDeploymentRequest.newBuilder()
+   *           .setPatchDeployment(PatchDeployments.PatchDeployment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.updatePatchDeploymentCallable().futureCall(request);
+   *   // Do something.
+   *   PatchDeployments.PatchDeployment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + PatchDeployments.UpdatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + updatePatchDeploymentCallable() { + return stub.updatePatchDeploymentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate + * patch jobs. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeploymentName name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]");
+   *   PatchDeployments.PatchDeployment response = osConfigServiceClient.pausePatchDeployment(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PatchDeployments.PatchDeployment pausePatchDeployment(PatchDeploymentName name) { + PatchDeployments.PausePatchDeploymentRequest request = + PatchDeployments.PausePatchDeploymentRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return pausePatchDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate + * patch jobs. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   String name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString();
+   *   PatchDeployments.PatchDeployment response = osConfigServiceClient.pausePatchDeployment(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PatchDeployments.PatchDeployment pausePatchDeployment(String name) { + PatchDeployments.PausePatchDeploymentRequest request = + PatchDeployments.PausePatchDeploymentRequest.newBuilder().setName(name).build(); + return pausePatchDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate + * patch jobs. + * + *

Sample code: + * + *

{@code
+   * 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);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PatchDeployments.PatchDeployment pausePatchDeployment( + PatchDeployments.PausePatchDeploymentRequest request) { + return pausePatchDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate + * patch jobs. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeployments.PausePatchDeploymentRequest request =
+   *       PatchDeployments.PausePatchDeploymentRequest.newBuilder()
+   *           .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.pausePatchDeploymentCallable().futureCall(request);
+   *   // Do something.
+   *   PatchDeployments.PatchDeployment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + PatchDeployments.PausePatchDeploymentRequest, PatchDeployments.PatchDeployment> + pausePatchDeploymentCallable() { + return stub.pausePatchDeploymentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues + * to generate patch jobs. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeploymentName name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]");
+   *   PatchDeployments.PatchDeployment response = osConfigServiceClient.resumePatchDeployment(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PatchDeployments.PatchDeployment resumePatchDeployment(PatchDeploymentName name) { + PatchDeployments.ResumePatchDeploymentRequest request = + PatchDeployments.ResumePatchDeploymentRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return resumePatchDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues + * to generate patch jobs. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   String name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString();
+   *   PatchDeployments.PatchDeployment response = osConfigServiceClient.resumePatchDeployment(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PatchDeployments.PatchDeployment resumePatchDeployment(String name) { + PatchDeployments.ResumePatchDeploymentRequest request = + PatchDeployments.ResumePatchDeploymentRequest.newBuilder().setName(name).build(); + return resumePatchDeployment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues + * to generate patch jobs. + * + *

Sample code: + * + *

{@code
+   * 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);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PatchDeployments.PatchDeployment resumePatchDeployment( + PatchDeployments.ResumePatchDeploymentRequest request) { + return resumePatchDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues + * to generate patch jobs. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeployments.ResumePatchDeploymentRequest request =
+   *       PatchDeployments.ResumePatchDeploymentRequest.newBuilder()
+   *           .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.resumePatchDeploymentCallable().futureCall(request);
+   *   // Do something.
+   *   PatchDeployments.PatchDeployment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + PatchDeployments.ResumePatchDeploymentRequest, PatchDeployments.PatchDeployment> + resumePatchDeploymentCallable() { + return stub.resumePatchDeploymentCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Create an OS Config guest policy. diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceSettings.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceSettings.java index 943553f9..689a899c 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceSettings.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceSettings.java @@ -138,6 +138,27 @@ public UnaryCallSettings getPa return ((OsConfigServiceStubSettings) getStubSettings()).deletePatchDeploymentSettings(); } + /** Returns the object with the settings used for calls to updatePatchDeployment. */ + public UnaryCallSettings< + PatchDeployments.UpdatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + updatePatchDeploymentSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).updatePatchDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to pausePatchDeployment. */ + public UnaryCallSettings< + PatchDeployments.PausePatchDeploymentRequest, PatchDeployments.PatchDeployment> + pausePatchDeploymentSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).pausePatchDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to resumePatchDeployment. */ + public UnaryCallSettings< + PatchDeployments.ResumePatchDeploymentRequest, PatchDeployments.PatchDeployment> + resumePatchDeploymentSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).resumePatchDeploymentSettings(); + } + /** Returns the object with the settings used for calls to createGuestPolicy. */ public UnaryCallSettings createGuestPolicySettings() { @@ -340,6 +361,27 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().deletePatchDeploymentSettings(); } + /** Returns the builder for the settings used for calls to updatePatchDeployment. */ + public UnaryCallSettings.Builder< + PatchDeployments.UpdatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + updatePatchDeploymentSettings() { + return getStubSettingsBuilder().updatePatchDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to pausePatchDeployment. */ + public UnaryCallSettings.Builder< + PatchDeployments.PausePatchDeploymentRequest, PatchDeployments.PatchDeployment> + pausePatchDeploymentSettings() { + return getStubSettingsBuilder().pausePatchDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to resumePatchDeployment. */ + public UnaryCallSettings.Builder< + PatchDeployments.ResumePatchDeploymentRequest, PatchDeployments.PatchDeployment> + resumePatchDeploymentSettings() { + return getStubSettingsBuilder().resumePatchDeploymentSettings(); + } + /** Returns the builder for the settings used for calls to createGuestPolicy. */ public UnaryCallSettings.Builder< GuestPolicies.CreateGuestPolicyRequest, GuestPolicies.GuestPolicy> diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/gapic_metadata.json b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/gapic_metadata.json index f71fb233..fb241f2c 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/gapic_metadata.json +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/gapic_metadata.json @@ -52,8 +52,17 @@ "LookupEffectiveGuestPolicy": { "methods": ["lookupEffectiveGuestPolicy", "lookupEffectiveGuestPolicyCallable"] }, + "PausePatchDeployment": { + "methods": ["pausePatchDeployment", "pausePatchDeployment", "pausePatchDeployment", "pausePatchDeploymentCallable"] + }, + "ResumePatchDeployment": { + "methods": ["resumePatchDeployment", "resumePatchDeployment", "resumePatchDeployment", "resumePatchDeploymentCallable"] + }, "UpdateGuestPolicy": { "methods": ["updateGuestPolicy", "updateGuestPolicy", "updateGuestPolicyCallable"] + }, + "UpdatePatchDeployment": { + "methods": ["updatePatchDeployment", "updatePatchDeployment", "updatePatchDeploymentCallable"] } } } diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/package-info.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/package-info.java index 319eeadf..d9d27833 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/package-info.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/package-info.java @@ -15,7 +15,9 @@ */ /** - * The interfaces provided are listed below, along with usage samples. + * A client to OS Config API + * + *

The interfaces provided are listed below, along with usage samples. * *

======================= OsConfigServiceClient ======================= * @@ -37,6 +39,7 @@ * .setDuration(Duration.newBuilder().build()) * .setDryRun(true) * .setDisplayName("displayName1714148973") + * .setRollout(PatchJobs.PatchRollout.newBuilder().build()) * .build(); * PatchJobs.PatchJob response = osConfigServiceClient.executePatchJob(request); * } diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceStub.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceStub.java index b2e8c4d6..09fbd728 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceStub.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceStub.java @@ -173,6 +173,54 @@ public class GrpcOsConfigServiceStub extends OsConfigServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor< + PatchDeployments.UpdatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + updatePatchDeploymentMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1beta.OsConfigService/UpdatePatchDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller( + PatchDeployments.UpdatePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(PatchDeployments.PatchDeployment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + PatchDeployments.PausePatchDeploymentRequest, PatchDeployments.PatchDeployment> + pausePatchDeploymentMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1beta.OsConfigService/PausePatchDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller( + PatchDeployments.PausePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(PatchDeployments.PatchDeployment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + PatchDeployments.ResumePatchDeploymentRequest, PatchDeployments.PatchDeployment> + resumePatchDeploymentMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1beta.OsConfigService/ResumePatchDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller( + PatchDeployments.ResumePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(PatchDeployments.PatchDeployment.getDefaultInstance())) + .build(); + private static final MethodDescriptor< GuestPolicies.CreateGuestPolicyRequest, GuestPolicies.GuestPolicy> createGuestPolicyMethodDescriptor = @@ -288,6 +336,15 @@ public class GrpcOsConfigServiceStub extends OsConfigServiceStub { listPatchDeploymentsPagedCallable; private final UnaryCallable deletePatchDeploymentCallable; + private final UnaryCallable< + PatchDeployments.UpdatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + updatePatchDeploymentCallable; + private final UnaryCallable< + PatchDeployments.PausePatchDeploymentRequest, PatchDeployments.PatchDeployment> + pausePatchDeploymentCallable; + private final UnaryCallable< + PatchDeployments.ResumePatchDeploymentRequest, PatchDeployments.PatchDeployment> + resumePatchDeploymentCallable; private final UnaryCallable createGuestPolicyCallable; private final UnaryCallable @@ -465,6 +522,49 @@ protected GrpcOsConfigServiceStub( return params.build(); }) .build(); + GrpcCallSettings< + PatchDeployments.UpdatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + updatePatchDeploymentTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(updatePatchDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "patch_deployment.name", + String.valueOf(request.getPatchDeployment().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + pausePatchDeploymentTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(pausePatchDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings< + PatchDeployments.ResumePatchDeploymentRequest, PatchDeployments.PatchDeployment> + resumePatchDeploymentTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(resumePatchDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); GrpcCallSettings createGuestPolicyTransportSettings = GrpcCallSettings @@ -593,6 +693,21 @@ protected GrpcOsConfigServiceStub( deletePatchDeploymentTransportSettings, settings.deletePatchDeploymentSettings(), clientContext); + this.updatePatchDeploymentCallable = + callableFactory.createUnaryCallable( + updatePatchDeploymentTransportSettings, + settings.updatePatchDeploymentSettings(), + clientContext); + this.pausePatchDeploymentCallable = + callableFactory.createUnaryCallable( + pausePatchDeploymentTransportSettings, + settings.pausePatchDeploymentSettings(), + clientContext); + this.resumePatchDeploymentCallable = + callableFactory.createUnaryCallable( + resumePatchDeploymentTransportSettings, + settings.resumePatchDeploymentSettings(), + clientContext); this.createGuestPolicyCallable = callableFactory.createUnaryCallable( createGuestPolicyTransportSettings, @@ -713,6 +828,27 @@ public UnaryCallable getPatchJ return deletePatchDeploymentCallable; } + @Override + public UnaryCallable< + PatchDeployments.UpdatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + updatePatchDeploymentCallable() { + return updatePatchDeploymentCallable; + } + + @Override + public UnaryCallable< + PatchDeployments.PausePatchDeploymentRequest, PatchDeployments.PatchDeployment> + pausePatchDeploymentCallable() { + return pausePatchDeploymentCallable; + } + + @Override + public UnaryCallable< + PatchDeployments.ResumePatchDeploymentRequest, PatchDeployments.PatchDeployment> + resumePatchDeploymentCallable() { + return resumePatchDeploymentCallable; + } + @Override public UnaryCallable createGuestPolicyCallable() { diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStub.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStub.java index 6c57d94d..06c45446 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStub.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStub.java @@ -108,6 +108,24 @@ public UnaryCallable getPatchJ throw new UnsupportedOperationException("Not implemented: deletePatchDeploymentCallable()"); } + public UnaryCallable< + PatchDeployments.UpdatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + updatePatchDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: updatePatchDeploymentCallable()"); + } + + public UnaryCallable< + PatchDeployments.PausePatchDeploymentRequest, PatchDeployments.PatchDeployment> + pausePatchDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: pausePatchDeploymentCallable()"); + } + + public UnaryCallable< + PatchDeployments.ResumePatchDeploymentRequest, PatchDeployments.PatchDeployment> + resumePatchDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: resumePatchDeploymentCallable()"); + } + public UnaryCallable createGuestPolicyCallable() { throw new UnsupportedOperationException("Not implemented: createGuestPolicyCallable()"); diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStubSettings.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStubSettings.java index 3d30c85a..5de82b5f 100644 --- a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStubSettings.java +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStubSettings.java @@ -124,6 +124,15 @@ public class OsConfigServiceStubSettings extends StubSettings deletePatchDeploymentSettings; + private final UnaryCallSettings< + PatchDeployments.UpdatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + updatePatchDeploymentSettings; + private final UnaryCallSettings< + PatchDeployments.PausePatchDeploymentRequest, PatchDeployments.PatchDeployment> + pausePatchDeploymentSettings; + private final UnaryCallSettings< + PatchDeployments.ResumePatchDeploymentRequest, PatchDeployments.PatchDeployment> + resumePatchDeploymentSettings; private final UnaryCallSettings createGuestPolicySettings; private final UnaryCallSettings @@ -514,6 +523,27 @@ public UnaryCallSettings getPa return deletePatchDeploymentSettings; } + /** Returns the object with the settings used for calls to updatePatchDeployment. */ + public UnaryCallSettings< + PatchDeployments.UpdatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + updatePatchDeploymentSettings() { + return updatePatchDeploymentSettings; + } + + /** Returns the object with the settings used for calls to pausePatchDeployment. */ + public UnaryCallSettings< + PatchDeployments.PausePatchDeploymentRequest, PatchDeployments.PatchDeployment> + pausePatchDeploymentSettings() { + return pausePatchDeploymentSettings; + } + + /** Returns the object with the settings used for calls to resumePatchDeployment. */ + public UnaryCallSettings< + PatchDeployments.ResumePatchDeploymentRequest, PatchDeployments.PatchDeployment> + resumePatchDeploymentSettings() { + return resumePatchDeploymentSettings; + } + /** Returns the object with the settings used for calls to createGuestPolicy. */ public UnaryCallSettings createGuestPolicySettings() { @@ -640,6 +670,9 @@ protected OsConfigServiceStubSettings(Builder settingsBuilder) throws IOExceptio getPatchDeploymentSettings = settingsBuilder.getPatchDeploymentSettings().build(); listPatchDeploymentsSettings = settingsBuilder.listPatchDeploymentsSettings().build(); deletePatchDeploymentSettings = settingsBuilder.deletePatchDeploymentSettings().build(); + updatePatchDeploymentSettings = settingsBuilder.updatePatchDeploymentSettings().build(); + pausePatchDeploymentSettings = settingsBuilder.pausePatchDeploymentSettings().build(); + resumePatchDeploymentSettings = settingsBuilder.resumePatchDeploymentSettings().build(); createGuestPolicySettings = settingsBuilder.createGuestPolicySettings().build(); getGuestPolicySettings = settingsBuilder.getGuestPolicySettings().build(); listGuestPoliciesSettings = settingsBuilder.listGuestPoliciesSettings().build(); @@ -681,6 +714,15 @@ public static class Builder extends StubSettings.Builder deletePatchDeploymentSettings; + private final UnaryCallSettings.Builder< + PatchDeployments.UpdatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + updatePatchDeploymentSettings; + private final UnaryCallSettings.Builder< + PatchDeployments.PausePatchDeploymentRequest, PatchDeployments.PatchDeployment> + pausePatchDeploymentSettings; + private final UnaryCallSettings.Builder< + PatchDeployments.ResumePatchDeploymentRequest, PatchDeployments.PatchDeployment> + resumePatchDeploymentSettings; private final UnaryCallSettings.Builder< GuestPolicies.CreateGuestPolicyRequest, GuestPolicies.GuestPolicy> createGuestPolicySettings; @@ -749,6 +791,9 @@ protected Builder(ClientContext clientContext) { listPatchDeploymentsSettings = PagedCallSettings.newBuilder(LIST_PATCH_DEPLOYMENTS_PAGE_STR_FACT); deletePatchDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePatchDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + pausePatchDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + resumePatchDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createGuestPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getGuestPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listGuestPoliciesSettings = PagedCallSettings.newBuilder(LIST_GUEST_POLICIES_PAGE_STR_FACT); @@ -767,6 +812,9 @@ protected Builder(ClientContext clientContext) { getPatchDeploymentSettings, listPatchDeploymentsSettings, deletePatchDeploymentSettings, + updatePatchDeploymentSettings, + pausePatchDeploymentSettings, + resumePatchDeploymentSettings, createGuestPolicySettings, getGuestPolicySettings, listGuestPoliciesSettings, @@ -789,6 +837,9 @@ protected Builder(OsConfigServiceStubSettings settings) { getPatchDeploymentSettings = settings.getPatchDeploymentSettings.toBuilder(); listPatchDeploymentsSettings = settings.listPatchDeploymentsSettings.toBuilder(); deletePatchDeploymentSettings = settings.deletePatchDeploymentSettings.toBuilder(); + updatePatchDeploymentSettings = settings.updatePatchDeploymentSettings.toBuilder(); + pausePatchDeploymentSettings = settings.pausePatchDeploymentSettings.toBuilder(); + resumePatchDeploymentSettings = settings.resumePatchDeploymentSettings.toBuilder(); createGuestPolicySettings = settings.createGuestPolicySettings.toBuilder(); getGuestPolicySettings = settings.getGuestPolicySettings.toBuilder(); listGuestPoliciesSettings = settings.listGuestPoliciesSettings.toBuilder(); @@ -807,6 +858,9 @@ protected Builder(OsConfigServiceStubSettings settings) { getPatchDeploymentSettings, listPatchDeploymentsSettings, deletePatchDeploymentSettings, + updatePatchDeploymentSettings, + pausePatchDeploymentSettings, + resumePatchDeploymentSettings, createGuestPolicySettings, getGuestPolicySettings, listGuestPoliciesSettings, @@ -874,6 +928,21 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .updatePatchDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .pausePatchDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .resumePatchDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .createGuestPolicySettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -987,6 +1056,27 @@ public Builder applyToAllUnaryMethods( return deletePatchDeploymentSettings; } + /** Returns the builder for the settings used for calls to updatePatchDeployment. */ + public UnaryCallSettings.Builder< + PatchDeployments.UpdatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + updatePatchDeploymentSettings() { + return updatePatchDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to pausePatchDeployment. */ + public UnaryCallSettings.Builder< + PatchDeployments.PausePatchDeploymentRequest, PatchDeployments.PatchDeployment> + pausePatchDeploymentSettings() { + return pausePatchDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to resumePatchDeployment. */ + public UnaryCallSettings.Builder< + PatchDeployments.ResumePatchDeploymentRequest, PatchDeployments.PatchDeployment> + resumePatchDeploymentSettings() { + return resumePatchDeploymentSettings; + } + /** Returns the builder for the settings used for calls to createGuestPolicy. */ public UnaryCallSettings.Builder< GuestPolicies.CreateGuestPolicyRequest, GuestPolicies.GuestPolicy> diff --git a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/MockOsConfigZonalServiceImpl.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/MockOsConfigZonalServiceImpl.java index 8e2faf95..6f92fdd1 100644 --- a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/MockOsConfigZonalServiceImpl.java +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/MockOsConfigZonalServiceImpl.java @@ -231,6 +231,50 @@ public void listInstanceOSPoliciesCompliances( } } + @Override + public void getOSPolicyAssignmentReport( + GetOSPolicyAssignmentReportRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof OSPolicyAssignmentReport) { + requests.add(request); + responseObserver.onNext(((OSPolicyAssignmentReport) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetOSPolicyAssignmentReport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + OSPolicyAssignmentReport.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listOSPolicyAssignmentReports( + ListOSPolicyAssignmentReportsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListOSPolicyAssignmentReportsResponse) { + requests.add(request); + responseObserver.onNext(((ListOSPolicyAssignmentReportsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListOSPolicyAssignmentReports, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListOSPolicyAssignmentReportsResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void getInventory( GetInventoryRequest request, StreamObserver responseObserver) { diff --git a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClientTest.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClientTest.java index 9ee3e8b9..93ad15dc 100644 --- a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClientTest.java +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClientTest.java @@ -18,6 +18,7 @@ import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInstanceOSPoliciesCompliancesPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInventoriesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentReportsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentRevisionsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentsPagedResponse; import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListVulnerabilityReportsPagedResponse; @@ -104,6 +105,7 @@ public void createOSPolicyAssignmentTest() throws Exception { .setRollout(OSPolicyAssignment.Rollout.newBuilder().build()) .setRevisionId("revisionId-1507445162") .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") .setBaseline(true) .setDeleted(true) .setReconciling(true) @@ -172,6 +174,7 @@ public void createOSPolicyAssignmentTest2() throws Exception { .setRollout(OSPolicyAssignment.Rollout.newBuilder().build()) .setRevisionId("revisionId-1507445162") .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") .setBaseline(true) .setDeleted(true) .setReconciling(true) @@ -240,6 +243,7 @@ public void updateOSPolicyAssignmentTest() throws Exception { .setRollout(OSPolicyAssignment.Rollout.newBuilder().build()) .setRevisionId("revisionId-1507445162") .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") .setBaseline(true) .setDeleted(true) .setReconciling(true) @@ -303,6 +307,7 @@ public void getOSPolicyAssignmentTest() throws Exception { .setRollout(OSPolicyAssignment.Rollout.newBuilder().build()) .setRevisionId("revisionId-1507445162") .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") .setBaseline(true) .setDeleted(true) .setReconciling(true) @@ -356,6 +361,7 @@ public void getOSPolicyAssignmentTest2() throws Exception { .setRollout(OSPolicyAssignment.Rollout.newBuilder().build()) .setRevisionId("revisionId-1507445162") .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") .setBaseline(true) .setDeleted(true) .setReconciling(true) @@ -864,6 +870,203 @@ public void listInstanceOSPoliciesCompliancesExceptionTest2() throws Exception { } } + @Test + public void getOSPolicyAssignmentReportTest() throws Exception { + OSPolicyAssignmentReport expectedResponse = + OSPolicyAssignmentReport.newBuilder() + .setName( + OSPolicyAssignmentReportName.of( + "[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]") + .toString()) + .setInstance("instance555127957") + .setOsPolicyAssignment( + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]") + .toString()) + .addAllOsPolicyCompliances(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunId("lastRunId2001336336") + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + OSPolicyAssignmentReportName name = + OSPolicyAssignmentReportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]"); + + OSPolicyAssignmentReport actualResponse = client.getOSPolicyAssignmentReport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOSPolicyAssignmentReportRequest actualRequest = + ((GetOSPolicyAssignmentReportRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOSPolicyAssignmentReportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + OSPolicyAssignmentReportName name = + OSPolicyAssignmentReportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]"); + client.getOSPolicyAssignmentReport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOSPolicyAssignmentReportTest2() throws Exception { + OSPolicyAssignmentReport expectedResponse = + OSPolicyAssignmentReport.newBuilder() + .setName( + OSPolicyAssignmentReportName.of( + "[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]") + .toString()) + .setInstance("instance555127957") + .setOsPolicyAssignment( + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]") + .toString()) + .addAllOsPolicyCompliances(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunId("lastRunId2001336336") + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + String name = "name3373707"; + + OSPolicyAssignmentReport actualResponse = client.getOSPolicyAssignmentReport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOSPolicyAssignmentReportRequest actualRequest = + ((GetOSPolicyAssignmentReportRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOSPolicyAssignmentReportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String name = "name3373707"; + client.getOSPolicyAssignmentReport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOSPolicyAssignmentReportsTest() throws Exception { + OSPolicyAssignmentReport responsesElement = OSPolicyAssignmentReport.newBuilder().build(); + ListOSPolicyAssignmentReportsResponse expectedResponse = + ListOSPolicyAssignmentReportsResponse.newBuilder() + .setNextPageToken("") + .addAllOsPolicyAssignmentReports(Arrays.asList(responsesElement)) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + InstanceOSPolicyAssignmentName parent = + InstanceOSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]"); + + ListOSPolicyAssignmentReportsPagedResponse pagedListResponse = + client.listOSPolicyAssignmentReports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getOsPolicyAssignmentReportsList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOSPolicyAssignmentReportsRequest actualRequest = + ((ListOSPolicyAssignmentReportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOSPolicyAssignmentReportsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + InstanceOSPolicyAssignmentName parent = + InstanceOSPolicyAssignmentName.of( + "[PROJECT]", "[LOCATION]", "[INSTANCE]", "[ASSIGNMENT]"); + client.listOSPolicyAssignmentReports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOSPolicyAssignmentReportsTest2() throws Exception { + OSPolicyAssignmentReport responsesElement = OSPolicyAssignmentReport.newBuilder().build(); + ListOSPolicyAssignmentReportsResponse expectedResponse = + ListOSPolicyAssignmentReportsResponse.newBuilder() + .setNextPageToken("") + .addAllOsPolicyAssignmentReports(Arrays.asList(responsesElement)) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListOSPolicyAssignmentReportsPagedResponse pagedListResponse = + client.listOSPolicyAssignmentReports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getOsPolicyAssignmentReportsList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOSPolicyAssignmentReportsRequest actualRequest = + ((ListOSPolicyAssignmentReportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOSPolicyAssignmentReportsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listOSPolicyAssignmentReports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getInventoryTest() throws Exception { Inventory expectedResponse = diff --git a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/MockOsConfigServiceImpl.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/MockOsConfigServiceImpl.java index a2700b40..5bba202c 100644 --- a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/MockOsConfigServiceImpl.java +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/MockOsConfigServiceImpl.java @@ -256,6 +256,72 @@ public void deletePatchDeployment( } } + @Override + public void updatePatchDeployment( + PatchDeployments.UpdatePatchDeploymentRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PatchDeployments.PatchDeployment) { + requests.add(request); + responseObserver.onNext(((PatchDeployments.PatchDeployment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePatchDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PatchDeployments.PatchDeployment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void pausePatchDeployment( + PatchDeployments.PausePatchDeploymentRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PatchDeployments.PatchDeployment) { + requests.add(request); + responseObserver.onNext(((PatchDeployments.PatchDeployment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method PausePatchDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PatchDeployments.PatchDeployment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void resumePatchDeployment( + PatchDeployments.ResumePatchDeploymentRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PatchDeployments.PatchDeployment) { + requests.add(request); + responseObserver.onNext(((PatchDeployments.PatchDeployment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ResumePatchDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PatchDeployments.PatchDeployment.class.getName(), + Exception.class.getName()))); + } + } + @Override public void createGuestPolicy( GuestPolicies.CreateGuestPolicyRequest request, diff --git a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClientTest.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClientTest.java index b6cb367e..39a5e85f 100644 --- a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClientTest.java +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClientTest.java @@ -104,6 +104,7 @@ public void executePatchJobTest() throws Exception { .setErrorMessage("errorMessage1203236063") .setPercentComplete(-1960969229) .setPatchDeployment("patchDeployment1500445997") + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) .build(); mockOsConfigService.addResponse(expectedResponse); @@ -116,6 +117,7 @@ public void executePatchJobTest() throws Exception { .setDuration(Duration.newBuilder().build()) .setDryRun(true) .setDisplayName("displayName1714148973") + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) .build(); PatchJobs.PatchJob actualResponse = client.executePatchJob(request); @@ -133,6 +135,7 @@ public void executePatchJobTest() throws Exception { Assert.assertEquals(request.getDuration(), actualRequest.getDuration()); Assert.assertEquals(request.getDryRun(), actualRequest.getDryRun()); Assert.assertEquals(request.getDisplayName(), actualRequest.getDisplayName()); + Assert.assertEquals(request.getRollout(), actualRequest.getRollout()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -154,6 +157,7 @@ public void executePatchJobExceptionTest() throws Exception { .setDuration(Duration.newBuilder().build()) .setDryRun(true) .setDisplayName("displayName1714148973") + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) .build(); client.executePatchJob(request); Assert.fail("No exception raised"); @@ -180,6 +184,7 @@ public void getPatchJobTest() throws Exception { .setErrorMessage("errorMessage1203236063") .setPercentComplete(-1960969229) .setPatchDeployment("patchDeployment1500445997") + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) .build(); mockOsConfigService.addResponse(expectedResponse); @@ -234,6 +239,7 @@ public void cancelPatchJobTest() throws Exception { .setErrorMessage("errorMessage1203236063") .setPercentComplete(-1960969229) .setPatchDeployment("patchDeployment1500445997") + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) .build(); mockOsConfigService.addResponse(expectedResponse); @@ -382,7 +388,7 @@ public void listPatchJobInstanceDetailsExceptionTest() throws Exception { public void createPatchDeploymentTest() throws Exception { PatchDeployments.PatchDeployment expectedResponse = PatchDeployments.PatchDeployment.newBuilder() - .setName("name3373707") + .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) .setDescription("description-1724546052") .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) @@ -390,6 +396,7 @@ public void createPatchDeploymentTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setLastExecuteTime(Timestamp.newBuilder().build()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) .build(); mockOsConfigService.addResponse(expectedResponse); @@ -440,7 +447,7 @@ public void createPatchDeploymentExceptionTest() throws Exception { public void getPatchDeploymentTest() throws Exception { PatchDeployments.PatchDeployment expectedResponse = PatchDeployments.PatchDeployment.newBuilder() - .setName("name3373707") + .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) .setDescription("description-1724546052") .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) @@ -448,6 +455,7 @@ public void getPatchDeploymentTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setLastExecuteTime(Timestamp.newBuilder().build()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) .build(); mockOsConfigService.addResponse(expectedResponse); @@ -580,6 +588,247 @@ public void deletePatchDeploymentExceptionTest() throws Exception { } } + @Test + public void updatePatchDeploymentTest() throws Exception { + PatchDeployments.PatchDeployment expectedResponse = + PatchDeployments.PatchDeployment.newBuilder() + .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastExecuteTime(Timestamp.newBuilder().build()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + PatchDeployments.PatchDeployment patchDeployment = + PatchDeployments.PatchDeployment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PatchDeployments.PatchDeployment actualResponse = + client.updatePatchDeployment(patchDeployment, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchDeployments.UpdatePatchDeploymentRequest actualRequest = + ((PatchDeployments.UpdatePatchDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(patchDeployment, actualRequest.getPatchDeployment()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePatchDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + PatchDeployments.PatchDeployment patchDeployment = + PatchDeployments.PatchDeployment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePatchDeployment(patchDeployment, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void pausePatchDeploymentTest() throws Exception { + PatchDeployments.PatchDeployment expectedResponse = + PatchDeployments.PatchDeployment.newBuilder() + .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastExecuteTime(Timestamp.newBuilder().build()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + PatchDeploymentName name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]"); + + PatchDeployments.PatchDeployment actualResponse = client.pausePatchDeployment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchDeployments.PausePatchDeploymentRequest actualRequest = + ((PatchDeployments.PausePatchDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void pausePatchDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + PatchDeploymentName name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]"); + client.pausePatchDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void pausePatchDeploymentTest2() throws Exception { + PatchDeployments.PatchDeployment expectedResponse = + PatchDeployments.PatchDeployment.newBuilder() + .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastExecuteTime(Timestamp.newBuilder().build()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + String name = "name3373707"; + + PatchDeployments.PatchDeployment actualResponse = client.pausePatchDeployment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchDeployments.PausePatchDeploymentRequest actualRequest = + ((PatchDeployments.PausePatchDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void pausePatchDeploymentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + String name = "name3373707"; + client.pausePatchDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resumePatchDeploymentTest() throws Exception { + PatchDeployments.PatchDeployment expectedResponse = + PatchDeployments.PatchDeployment.newBuilder() + .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastExecuteTime(Timestamp.newBuilder().build()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + PatchDeploymentName name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]"); + + PatchDeployments.PatchDeployment actualResponse = client.resumePatchDeployment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchDeployments.ResumePatchDeploymentRequest actualRequest = + ((PatchDeployments.ResumePatchDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resumePatchDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + PatchDeploymentName name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]"); + client.resumePatchDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resumePatchDeploymentTest2() throws Exception { + PatchDeployments.PatchDeployment expectedResponse = + PatchDeployments.PatchDeployment.newBuilder() + .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastExecuteTime(Timestamp.newBuilder().build()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + String name = "name3373707"; + + PatchDeployments.PatchDeployment actualResponse = client.resumePatchDeployment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchDeployments.ResumePatchDeploymentRequest actualRequest = + ((PatchDeployments.ResumePatchDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resumePatchDeploymentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + String name = "name3373707"; + client.resumePatchDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void createGuestPolicyTest() throws Exception { GuestPolicies.GuestPolicy expectedResponse = diff --git a/grpc-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceGrpc.java b/grpc-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceGrpc.java index 77542b13..f0364e52 100644 --- a/grpc-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceGrpc.java +++ b/grpc-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceGrpc.java @@ -460,6 +460,112 @@ private OsConfigZonalServiceGrpc() {} return getListInstanceOSPoliciesCompliancesMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport> + getGetOSPolicyAssignmentReportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetOSPolicyAssignmentReport", + requestType = com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest.class, + responseType = com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport> + getGetOSPolicyAssignmentReportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport> + getGetOSPolicyAssignmentReportMethod; + if ((getGetOSPolicyAssignmentReportMethod = + OsConfigZonalServiceGrpc.getGetOSPolicyAssignmentReportMethod) + == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getGetOSPolicyAssignmentReportMethod = + OsConfigZonalServiceGrpc.getGetOSPolicyAssignmentReportMethod) + == null) { + OsConfigZonalServiceGrpc.getGetOSPolicyAssignmentReportMethod = + getGetOSPolicyAssignmentReportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetOSPolicyAssignmentReport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier( + "GetOSPolicyAssignmentReport")) + .build(); + } + } + } + return getGetOSPolicyAssignmentReportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse> + getListOSPolicyAssignmentReportsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListOSPolicyAssignmentReports", + requestType = com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest.class, + responseType = com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse> + getListOSPolicyAssignmentReportsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse> + getListOSPolicyAssignmentReportsMethod; + if ((getListOSPolicyAssignmentReportsMethod = + OsConfigZonalServiceGrpc.getListOSPolicyAssignmentReportsMethod) + == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getListOSPolicyAssignmentReportsMethod = + OsConfigZonalServiceGrpc.getListOSPolicyAssignmentReportsMethod) + == null) { + OsConfigZonalServiceGrpc.getListOSPolicyAssignmentReportsMethod = + getListOSPolicyAssignmentReportsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListOSPolicyAssignmentReports")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha + .ListOSPolicyAssignmentReportsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier( + "ListOSPolicyAssignmentReports")) + .build(); + } + } + } + return getListOSPolicyAssignmentReportsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.osconfig.v1alpha.GetInventoryRequest, com.google.cloud.osconfig.v1alpha.Inventory> @@ -829,6 +935,7 @@ public void deleteOSPolicyAssignment( * instance. * */ + @java.lang.Deprecated public void getInstanceOSPoliciesCompliance( com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest request, io.grpc.stub.StreamObserver @@ -845,6 +952,7 @@ public void getInstanceOSPoliciesCompliance( * specified zone. * */ + @java.lang.Deprecated public void listInstanceOSPoliciesCompliances( com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest request, io.grpc.stub.StreamObserver< @@ -854,6 +962,39 @@ public void listInstanceOSPoliciesCompliances( getListInstanceOSPoliciesCompliancesMethod(), responseObserver); } + /** + * + * + *

+     * Get the OS policy asssignment report for the specified Compute Engine VM
+     * instance.
+     * 
+ */ + public void getOSPolicyAssignmentReport( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetOSPolicyAssignmentReportMethod(), responseObserver); + } + + /** + * + * + *
+     * List OS policy asssignment reports for all Compute Engine VM instances in
+     * the specified zone.
+     * 
+ */ + public void listOSPolicyAssignmentReports( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListOSPolicyAssignmentReportsMethod(), responseObserver); + } + /** * * @@ -972,6 +1113,20 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest, com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse>( this, METHODID_LIST_INSTANCE_OSPOLICIES_COMPLIANCES))) + .addMethod( + getGetOSPolicyAssignmentReportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport>( + this, METHODID_GET_OSPOLICY_ASSIGNMENT_REPORT))) + .addMethod( + getListOSPolicyAssignmentReportsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse>( + this, METHODID_LIST_OSPOLICY_ASSIGNMENT_REPORTS))) .addMethod( getGetInventoryMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1154,6 +1309,7 @@ public void deleteOSPolicyAssignment( * instance. * */ + @java.lang.Deprecated public void getInstanceOSPoliciesCompliance( com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest request, io.grpc.stub.StreamObserver @@ -1172,6 +1328,7 @@ public void getInstanceOSPoliciesCompliance( * specified zone. * */ + @java.lang.Deprecated public void listInstanceOSPoliciesCompliances( com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest request, io.grpc.stub.StreamObserver< @@ -1183,6 +1340,43 @@ public void listInstanceOSPoliciesCompliances( responseObserver); } + /** + * + * + *
+     * Get the OS policy asssignment report for the specified Compute Engine VM
+     * instance.
+     * 
+ */ + public void getOSPolicyAssignmentReport( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetOSPolicyAssignmentReportMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List OS policy asssignment reports for all Compute Engine VM instances in
+     * the specified zone.
+     * 
+ */ + public void listOSPolicyAssignmentReports( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListOSPolicyAssignmentReportsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1385,6 +1579,7 @@ public com.google.longrunning.Operation deleteOSPolicyAssignment( * instance. * */ + @java.lang.Deprecated public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance getInstanceOSPoliciesCompliance( com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest request) { @@ -1400,6 +1595,7 @@ public com.google.longrunning.Operation deleteOSPolicyAssignment( * specified zone. * */ + @java.lang.Deprecated public com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse listInstanceOSPoliciesCompliances( com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest request) { @@ -1407,6 +1603,35 @@ public com.google.longrunning.Operation deleteOSPolicyAssignment( getChannel(), getListInstanceOSPoliciesCompliancesMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Get the OS policy asssignment report for the specified Compute Engine VM
+     * instance.
+     * 
+ */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport getOSPolicyAssignmentReport( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetOSPolicyAssignmentReportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List OS policy asssignment reports for all Compute Engine VM instances in
+     * the specified zone.
+     * 
+ */ + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + listOSPolicyAssignmentReports( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListOSPolicyAssignmentReportsMethod(), getCallOptions(), request); + } + /** * * @@ -1602,6 +1827,7 @@ protected OsConfigZonalServiceFutureStub build( * instance. * */ + @java.lang.Deprecated public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance> getInstanceOSPoliciesCompliance( @@ -1619,6 +1845,7 @@ protected OsConfigZonalServiceFutureStub build( * specified zone. * */ + @java.lang.Deprecated public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse> listInstanceOSPoliciesCompliances( @@ -1628,6 +1855,39 @@ protected OsConfigZonalServiceFutureStub build( request); } + /** + * + * + *
+     * Get the OS policy asssignment report for the specified Compute Engine VM
+     * instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport> + getOSPolicyAssignmentReport( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetOSPolicyAssignmentReportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List OS policy asssignment reports for all Compute Engine VM instances in
+     * the specified zone.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse> + listOSPolicyAssignmentReports( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListOSPolicyAssignmentReportsMethod(), getCallOptions()), + request); + } + /** * * @@ -1697,10 +1957,12 @@ protected OsConfigZonalServiceFutureStub build( private static final int METHODID_DELETE_OSPOLICY_ASSIGNMENT = 5; private static final int METHODID_GET_INSTANCE_OSPOLICIES_COMPLIANCE = 6; private static final int METHODID_LIST_INSTANCE_OSPOLICIES_COMPLIANCES = 7; - private static final int METHODID_GET_INVENTORY = 8; - private static final int METHODID_LIST_INVENTORIES = 9; - private static final int METHODID_GET_VULNERABILITY_REPORT = 10; - private static final int METHODID_LIST_VULNERABILITY_REPORTS = 11; + private static final int METHODID_GET_OSPOLICY_ASSIGNMENT_REPORT = 8; + private static final int METHODID_LIST_OSPOLICY_ASSIGNMENT_REPORTS = 9; + private static final int METHODID_GET_INVENTORY = 10; + private static final int METHODID_LIST_INVENTORIES = 11; + private static final int METHODID_GET_VULNERABILITY_REPORT = 12; + private static final int METHODID_LIST_VULNERABILITY_REPORTS = 13; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1768,6 +2030,20 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse>) responseObserver); break; + case METHODID_GET_OSPOLICY_ASSIGNMENT_REPORT: + serviceImpl.getOSPolicyAssignmentReport( + (com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport>) + responseObserver); + break; + case METHODID_LIST_OSPOLICY_ASSIGNMENT_REPORTS: + serviceImpl.listOSPolicyAssignmentReports( + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse>) + responseObserver); + break; case METHODID_GET_INVENTORY: serviceImpl.getInventory( (com.google.cloud.osconfig.v1alpha.GetInventoryRequest) request, @@ -1866,6 +2142,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteOSPolicyAssignmentMethod()) .addMethod(getGetInstanceOSPoliciesComplianceMethod()) .addMethod(getListInstanceOSPoliciesCompliancesMethod()) + .addMethod(getGetOSPolicyAssignmentReportMethod()) + .addMethod(getListOSPolicyAssignmentReportsMethod()) .addMethod(getGetInventoryMethod()) .addMethod(getListInventoriesMethod()) .addMethod(getGetVulnerabilityReportMethod()) diff --git a/grpc-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceGrpc.java b/grpc-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceGrpc.java index 2b283f30..130ffc76 100644 --- a/grpc-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceGrpc.java +++ b/grpc-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceGrpc.java @@ -488,6 +488,162 @@ private OsConfigServiceGrpc() {} return getDeletePatchDeploymentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getUpdatePatchDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePatchDeployment", + requestType = + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest.class, + responseType = com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getUpdatePatchDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getUpdatePatchDeploymentMethod; + if ((getUpdatePatchDeploymentMethod = OsConfigServiceGrpc.getUpdatePatchDeploymentMethod) + == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getUpdatePatchDeploymentMethod = OsConfigServiceGrpc.getUpdatePatchDeploymentMethod) + == null) { + OsConfigServiceGrpc.getUpdatePatchDeploymentMethod = + getUpdatePatchDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdatePatchDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchDeployments + .UpdatePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("UpdatePatchDeployment")) + .build(); + } + } + } + return getUpdatePatchDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getPausePatchDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PausePatchDeployment", + requestType = + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest.class, + responseType = com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getPausePatchDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getPausePatchDeploymentMethod; + if ((getPausePatchDeploymentMethod = OsConfigServiceGrpc.getPausePatchDeploymentMethod) + == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getPausePatchDeploymentMethod = OsConfigServiceGrpc.getPausePatchDeploymentMethod) + == null) { + OsConfigServiceGrpc.getPausePatchDeploymentMethod = + getPausePatchDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "PausePatchDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchDeployments + .PausePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("PausePatchDeployment")) + .build(); + } + } + } + return getPausePatchDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getResumePatchDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ResumePatchDeployment", + requestType = + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest.class, + responseType = com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getResumePatchDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getResumePatchDeploymentMethod; + if ((getResumePatchDeploymentMethod = OsConfigServiceGrpc.getResumePatchDeploymentMethod) + == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getResumePatchDeploymentMethod = OsConfigServiceGrpc.getResumePatchDeploymentMethod) + == null) { + OsConfigServiceGrpc.getResumePatchDeploymentMethod = + getResumePatchDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ResumePatchDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchDeployments + .ResumePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("ResumePatchDeployment")) + .build(); + } + } + } + return getResumePatchDeploymentMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest, com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> @@ -969,6 +1125,56 @@ public void deletePatchDeployment( getDeletePatchDeploymentMethod(), responseObserver); } + /** + * + * + *
+     * Update an OS Config patch deployment.
+     * 
+ */ + public void updatePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePatchDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Change state of patch deployment to "PAUSED".
+     * Patch deployment in paused state doesn't generate patch jobs.
+     * 
+ */ + public void pausePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPausePatchDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Change state of patch deployment back to "ACTIVE".
+     * Patch deployment in active state continues to generate patch jobs.
+     * 
+ */ + public void resumePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getResumePatchDeploymentMethod(), responseObserver); + } + /** * * @@ -1129,6 +1335,29 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.osconfig.v1beta.PatchDeployments .DeletePatchDeploymentRequest, com.google.protobuf.Empty>(this, METHODID_DELETE_PATCH_DEPLOYMENT))) + .addMethod( + getUpdatePatchDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.PatchDeployments + .UpdatePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>( + this, METHODID_UPDATE_PATCH_DEPLOYMENT))) + .addMethod( + getPausePatchDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>( + this, METHODID_PAUSE_PATCH_DEPLOYMENT))) + .addMethod( + getResumePatchDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.PatchDeployments + .ResumePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>( + this, METHODID_RESUME_PATCH_DEPLOYMENT))) .addMethod( getCreateGuestPolicyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1354,6 +1583,62 @@ public void deletePatchDeployment( responseObserver); } + /** + * + * + *
+     * Update an OS Config patch deployment.
+     * 
+ */ + public void updatePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePatchDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Change state of patch deployment to "PAUSED".
+     * Patch deployment in paused state doesn't generate patch jobs.
+     * 
+ */ + public void pausePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPausePatchDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Change state of patch deployment back to "ACTIVE".
+     * Patch deployment in active state continues to generate patch jobs.
+     * 
+ */ + public void resumePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResumePatchDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1601,6 +1886,47 @@ public com.google.protobuf.Empty deletePatchDeployment( getChannel(), getDeletePatchDeploymentMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Update an OS Config patch deployment.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment updatePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePatchDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Change state of patch deployment to "PAUSED".
+     * Patch deployment in paused state doesn't generate patch jobs.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment pausePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPausePatchDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Change state of patch deployment back to "ACTIVE".
+     * Patch deployment in active state continues to generate patch jobs.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment resumePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResumePatchDeploymentMethod(), getCallOptions(), request); + } + /** * * @@ -1839,6 +2165,55 @@ protected OsConfigServiceFutureStub build( getChannel().newCall(getDeletePatchDeploymentMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Update an OS Config patch deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + updatePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePatchDeploymentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Change state of patch deployment to "PAUSED".
+     * Patch deployment in paused state doesn't generate patch jobs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + pausePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPausePatchDeploymentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Change state of patch deployment back to "ACTIVE".
+     * Patch deployment in active state continues to generate patch jobs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + resumePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getResumePatchDeploymentMethod(), getCallOptions()), request); + } + /** * * @@ -1940,12 +2315,15 @@ protected OsConfigServiceFutureStub build( private static final int METHODID_GET_PATCH_DEPLOYMENT = 6; private static final int METHODID_LIST_PATCH_DEPLOYMENTS = 7; private static final int METHODID_DELETE_PATCH_DEPLOYMENT = 8; - private static final int METHODID_CREATE_GUEST_POLICY = 9; - private static final int METHODID_GET_GUEST_POLICY = 10; - private static final int METHODID_LIST_GUEST_POLICIES = 11; - private static final int METHODID_UPDATE_GUEST_POLICY = 12; - private static final int METHODID_DELETE_GUEST_POLICY = 13; - private static final int METHODID_LOOKUP_EFFECTIVE_GUEST_POLICY = 14; + private static final int METHODID_UPDATE_PATCH_DEPLOYMENT = 9; + private static final int METHODID_PAUSE_PATCH_DEPLOYMENT = 10; + private static final int METHODID_RESUME_PATCH_DEPLOYMENT = 11; + private static final int METHODID_CREATE_GUEST_POLICY = 12; + private static final int METHODID_GET_GUEST_POLICY = 13; + private static final int METHODID_LIST_GUEST_POLICIES = 14; + private static final int METHODID_UPDATE_GUEST_POLICY = 15; + private static final int METHODID_DELETE_GUEST_POLICY = 16; + private static final int METHODID_LOOKUP_EFFECTIVE_GUEST_POLICY = 17; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2028,6 +2406,30 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UPDATE_PATCH_DEPLOYMENT: + serviceImpl.updatePatchDeployment( + (com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>) + responseObserver); + break; + case METHODID_PAUSE_PATCH_DEPLOYMENT: + serviceImpl.pausePatchDeployment( + (com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>) + responseObserver); + break; + case METHODID_RESUME_PATCH_DEPLOYMENT: + serviceImpl.resumePatchDeployment( + (com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>) + responseObserver); + break; case METHODID_CREATE_GUEST_POLICY: serviceImpl.createGuestPolicy( (com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest) request, @@ -2142,6 +2544,9 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetPatchDeploymentMethod()) .addMethod(getListPatchDeploymentsMethod()) .addMethod(getDeletePatchDeploymentMethod()) + .addMethod(getUpdatePatchDeploymentMethod()) + .addMethod(getPausePatchDeploymentMethod()) + .addMethod(getResumePatchDeploymentMethod()) .addMethod(getCreateGuestPolicyMethod()) .addMethod(getGetGuestPolicyMethod()) .addMethod(getListGuestPoliciesMethod()) diff --git a/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/OSPolicy.java b/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/OSPolicy.java index 44207d11..9475b5f7 100644 --- a/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/OSPolicy.java +++ b/proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/OSPolicy.java @@ -22946,7 +22946,7 @@ public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { * * *
-           * Defaults to NONE.
+           * Invalid value, the request will return validation error.
            * 
* * INTERPRETER_UNSPECIFIED = 0; @@ -22994,7 +22994,7 @@ public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { * * *
-           * Defaults to NONE.
+           * Invalid value, the request will return validation error.
            * 
* * INTERPRETER_UNSPECIFIED = 0; diff --git a/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/os_policy.proto b/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/os_policy.proto index 7b113f91..de0db191 100644 --- a/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/os_policy.proto +++ b/proto-google-cloud-os-config-v1/src/main/proto/google/cloud/osconfig/v1/os_policy.proto @@ -354,7 +354,7 @@ message OSPolicy { message Exec { // The interpreter to use. enum Interpreter { - // Defaults to NONE. + // Invalid value, the request will return validation error. INTERPRETER_UNSPECIFIED = 0; // If an interpreter is not specified, the diff --git a/proto-google-cloud-os-config-v1alpha/clirr-ignored-differences.xml b/proto-google-cloud-os-config-v1alpha/clirr-ignored-differences.xml index 8941944c..a4fc3fee 100644 --- a/proto-google-cloud-os-config-v1alpha/clirr-ignored-differences.xml +++ b/proto-google-cloud-os-config-v1alpha/clirr-ignored-differences.xml @@ -16,4 +16,8 @@ com/google/cloud/osconfig/v1alpha/*OrBuilder boolean has*(*) + + 8001 + com/google/cloud/osconfig/v1alpha/OSPolicy* + diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Common.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Common.java index 725054f2..fdca3fec 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Common.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Common.java @@ -42,18 +42,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n3google/cloud/osconfig/v1alpha/osconfig" + "_common.proto\022\035google.cloud.osconfig.v1a" - + "lpha\"<\n\016FixedOrPercent\022\017\n\005fixed\030\001 \001(\005H\000\022" - + "\021\n\007percent\030\002 \001(\005H\000B\006\n\004modeB\327\001\n!com.googl" - + "e.cloud.osconfig.v1alphaB\006CommonP\001ZEgoog" - + "le.golang.org/genproto/googleapis/cloud/" - + "osconfig/v1alpha;osconfig\252\002\035Google.Cloud" - + ".OsConfig.V1Alpha\312\002\035Google\\Cloud\\OsConfi" - + "g\\V1alpha\352\002 Google::Cloud::OsConfig::V1a" - + "lphab\006proto3" + + "lpha\032\034google/api/annotations.proto\"<\n\016Fi" + + "xedOrPercent\022\017\n\005fixed\030\001 \001(\005H\000\022\021\n\007percent" + + "\030\002 \001(\005H\000B\006\n\004modeB\327\001\n!com.google.cloud.os" + + "config.v1alphaB\006CommonP\001ZEgoogle.golang." + + "org/genproto/googleapis/cloud/osconfig/v" + + "1alpha;osconfig\252\002\035Google.Cloud.OsConfig." + + "V1Alpha\312\002\035Google\\Cloud\\OsConfig\\V1alpha\352" + + "\002 Google::Cloud::OsConfig::V1alphab\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); internal_static_google_cloud_osconfig_v1alpha_FixedOrPercent_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_cloud_osconfig_v1alpha_FixedOrPercent_fieldAccessorTable = @@ -62,6 +66,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Fixed", "Percent", "Mode", }); + com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ConfigCommonProto.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ConfigCommonProto.java index 67e4be61..91c74e79 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ConfigCommonProto.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ConfigCommonProto.java @@ -50,40 +50,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n1google/cloud/osconfig/v1alpha/config_c" + "ommon.proto\022\035google.cloud.osconfig.v1alp" - + "ha\"\245\003\n\032OSPolicyResourceConfigStep\022L\n\004typ" - + "e\030\001 \001(\0162>.google.cloud.osconfig.v1alpha." - + "OSPolicyResourceConfigStep.Type\022R\n\007outco" - + "me\030\002 \001(\0162A.google.cloud.osconfig.v1alpha" - + ".OSPolicyResourceConfigStep.Outcome\022\025\n\re" - + "rror_message\030\003 \001(\t\"\216\001\n\004Type\022\024\n\020TYPE_UNSP" - + "ECIFIED\020\000\022\016\n\nVALIDATION\020\001\022\027\n\023DESIRED_STA" - + "TE_CHECK\020\002\022\035\n\031DESIRED_STATE_ENFORCEMENT\020" - + "\003\022(\n$DESIRED_STATE_CHECK_POST_ENFORCEMEN" - + "T\020\004\"=\n\007Outcome\022\027\n\023OUTCOME_UNSPECIFIED\020\000\022" - + "\r\n\tSUCCEEDED\020\001\022\n\n\006FAILED\020\002\"\375\002\n\032OSPolicyR" - + "esourceCompliance\022\035\n\025os_policy_resource_" - + "id\030\001 \001(\t\022O\n\014config_steps\030\002 \003(\01329.google." - + "cloud.osconfig.v1alpha.OSPolicyResourceC" - + "onfigStep\022E\n\005state\030\003 \001(\01626.google.cloud." - + "osconfig.v1alpha.OSPolicyComplianceState" - + "\022l\n\024exec_resource_output\030\004 \001(\0132L.google." - + "cloud.osconfig.v1alpha.OSPolicyResourceC" - + "ompliance.ExecResourceOutputH\000\0320\n\022ExecRe" - + "sourceOutput\022\032\n\022enforcement_output\030\002 \001(\014" - + "B\010\n\006output*\223\001\n\027OSPolicyComplianceState\022*" - + "\n&OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED" - + "\020\000\022\r\n\tCOMPLIANT\020\001\022\021\n\rNON_COMPLIANT\020\002\022\013\n\007" - + "UNKNOWN\020\003\022\035\n\031NO_OS_POLICIES_APPLICABLE\020\004" - + "B\342\001\n!com.google.cloud.osconfig.v1alphaB\021" - + "ConfigCommonProtoP\001ZEgoogle.golang.org/g" - + "enproto/googleapis/cloud/osconfig/v1alph" - + "a;osconfig\252\002\035Google.Cloud.OsConfig.V1Alp" - + "ha\312\002\035Google\\Cloud\\OsConfig\\V1alpha\352\002 Goo" - + "gle::Cloud::OsConfig::V1alphab\006proto3" + + "ha\032\034google/api/annotations.proto\"\261\003\n\032OSP" + + "olicyResourceConfigStep\022L\n\004type\030\001 \001(\0162>." + + "google.cloud.osconfig.v1alpha.OSPolicyRe" + + "sourceConfigStep.Type\022R\n\007outcome\030\002 \001(\0162A" + + ".google.cloud.osconfig.v1alpha.OSPolicyR" + + "esourceConfigStep.Outcome\022\025\n\rerror_messa" + + "ge\030\003 \001(\t\"\222\001\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022" + + "\016\n\nVALIDATION\020\001\022\027\n\023DESIRED_STATE_CHECK\020\002" + + "\022\035\n\031DESIRED_STATE_ENFORCEMENT\020\003\022(\n$DESIR" + + "ED_STATE_CHECK_POST_ENFORCEMENT\020\004\032\002\030\001\"A\n" + + "\007Outcome\022\027\n\023OUTCOME_UNSPECIFIED\020\000\022\r\n\tSUC" + + "CEEDED\020\001\022\n\n\006FAILED\020\002\032\002\030\001:\002\030\001\"\205\003\n\032OSPolic" + + "yResourceCompliance\022\035\n\025os_policy_resourc" + + "e_id\030\001 \001(\t\022O\n\014config_steps\030\002 \003(\01329.googl" + + "e.cloud.osconfig.v1alpha.OSPolicyResourc" + + "eConfigStep\022E\n\005state\030\003 \001(\01626.google.clou" + + "d.osconfig.v1alpha.OSPolicyComplianceSta" + + "te\022l\n\024exec_resource_output\030\004 \001(\0132L.googl" + + "e.cloud.osconfig.v1alpha.OSPolicyResourc" + + "eCompliance.ExecResourceOutputH\000\0324\n\022Exec" + + "ResourceOutput\022\032\n\022enforcement_output\030\002 \001" + + "(\014:\002\030\001:\002\030\001B\010\n\006output*\227\001\n\027OSPolicyComplia" + + "nceState\022*\n&OS_POLICY_COMPLIANCE_STATE_U" + + "NSPECIFIED\020\000\022\r\n\tCOMPLIANT\020\001\022\021\n\rNON_COMPL" + + "IANT\020\002\022\013\n\007UNKNOWN\020\003\022\035\n\031NO_OS_POLICIES_AP" + + "PLICABLE\020\004\032\002\030\001B\342\001\n!com.google.cloud.osco" + + "nfig.v1alphaB\021ConfigCommonProtoP\001ZEgoogl" + + "e.golang.org/genproto/googleapis/cloud/o" + + "sconfig/v1alpha;osconfig\252\002\035Google.Cloud." + + "OsConfig.V1Alpha\312\002\035Google\\Cloud\\OsConfig" + + "\\V1alpha\352\002 Google::Cloud::OsConfig::V1al" + + "phab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceConfigStep_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceConfigStep_fieldAccessorTable = @@ -110,6 +115,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "EnforcementOutput", }); + com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CreateOSPolicyAssignmentRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CreateOSPolicyAssignmentRequest.java index c1f492fb..0c617d98 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CreateOSPolicyAssignmentRequest.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CreateOSPolicyAssignmentRequest.java @@ -123,14 +123,14 @@ private CreateOSPolicyAssignmentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.class, @@ -506,14 +506,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest) com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.class, @@ -553,7 +553,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_descriptor; } diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/DeleteOSPolicyAssignmentRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/DeleteOSPolicyAssignmentRequest.java index 81fde064..b8eafb05 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/DeleteOSPolicyAssignmentRequest.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/DeleteOSPolicyAssignmentRequest.java @@ -98,14 +98,14 @@ private DeleteOSPolicyAssignmentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.class, @@ -340,14 +340,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest) com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.class, @@ -379,7 +379,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_descriptor; } diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequest.java index d983a59a..bfb68b35 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequest.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequest.java @@ -28,6 +28,7 @@ * * Protobuf type {@code google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} */ +@java.lang.Deprecated public final class GetInstanceOSPoliciesComplianceRequest extends com.google.protobuf.GeneratedMessageV3 implements diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequestOrBuilder.java index 1286ca24..1cc46c5a 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequestOrBuilder.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequestOrBuilder.java @@ -18,6 +18,7 @@ package com.google.cloud.osconfig.v1alpha; +@java.lang.Deprecated public interface GetInstanceOSPoliciesComplianceRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest) diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentReportRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentReportRequest.java new file mode 100644 index 00000000..a273ddc3 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentReportRequest.java @@ -0,0 +1,705 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * Get a report of the OS policy assignment for a VM instance.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest} + */ +public final class GetOSPolicyAssignmentReportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest) + GetOSPolicyAssignmentReportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetOSPolicyAssignmentReportRequest.newBuilder() to construct. + private GetOSPolicyAssignmentReportRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetOSPolicyAssignmentReportRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetOSPolicyAssignmentReportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetOSPolicyAssignmentReportRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest.class, + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. API resource name for OS policy assignment report.
+   * Format:
+   * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name`
+   * can be provided.
+   * For `{assignment_id}`, the OSPolicyAssignment id must be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. API resource name for OS policy assignment report.
+   * Format:
+   * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name`
+   * can be provided.
+   * For `{assignment_id}`, the OSPolicyAssignment id must be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest other = + (com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Get a report of the OS policy assignment for a VM instance.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest) + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest.class, + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentReportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest build() { + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest result = + new com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest other) { + if (other + == com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. API resource name for OS policy assignment report.
+     * Format:
+     * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name`
+     * can be provided.
+     * For `{assignment_id}`, the OSPolicyAssignment id must be provided.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. API resource name for OS policy assignment report.
+     * Format:
+     * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name`
+     * can be provided.
+     * For `{assignment_id}`, the OSPolicyAssignment id must be provided.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. API resource name for OS policy assignment report.
+     * Format:
+     * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name`
+     * can be provided.
+     * For `{assignment_id}`, the OSPolicyAssignment id must be provided.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. API resource name for OS policy assignment report.
+     * Format:
+     * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name`
+     * can be provided.
+     * For `{assignment_id}`, the OSPolicyAssignment id must be provided.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. API resource name for OS policy assignment report.
+     * Format:
+     * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name`
+     * can be provided.
+     * For `{assignment_id}`, the OSPolicyAssignment id must be provided.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest) + private static final com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOSPolicyAssignmentReportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetOSPolicyAssignmentReportRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentReportRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentReportRequestOrBuilder.java new file mode 100644 index 00000000..d37c705e --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentReportRequestOrBuilder.java @@ -0,0 +1,66 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface GetOSPolicyAssignmentReportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. API resource name for OS policy assignment report.
+   * Format:
+   * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name`
+   * can be provided.
+   * For `{assignment_id}`, the OSPolicyAssignment id must be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. API resource name for OS policy assignment report.
+   * Format:
+   * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name`
+   * can be provided.
+   * For `{assignment_id}`, the OSPolicyAssignment id must be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentRequest.java index 0276bb79..944e466d 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentRequest.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentRequest.java @@ -97,14 +97,14 @@ private GetOSPolicyAssignmentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.class, @@ -342,14 +342,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest) com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.class, @@ -380,7 +380,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_descriptor; } diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesCompliance.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesCompliance.java index 5823fdd0..2b4d1f39 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesCompliance.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesCompliance.java @@ -35,6 +35,7 @@ * * Protobuf type {@code google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} */ +@java.lang.Deprecated public final class InstanceOSPoliciesCompliance extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) @@ -195,6 +196,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.Builder.class); } + @java.lang.Deprecated public interface OSPolicyComplianceOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) @@ -361,6 +363,7 @@ com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance getOsPolicyResource * Protobuf type {@code * google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} */ + @java.lang.Deprecated public static final class OSPolicyCompliance extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceOrBuilder.java index 8798d94d..73a89111 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceOrBuilder.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceOrBuilder.java @@ -18,6 +18,7 @@ package com.google.cloud.osconfig.v1alpha; +@java.lang.Deprecated public interface InstanceOSPoliciesComplianceOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceProto.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceProto.java index 4d39cdb4..15674d9c 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceProto.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceProto.java @@ -58,55 +58,57 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\nCgoogle/cloud/osconfig/v1alpha/instance" + "_os_policies_compliance.proto\022\035google.cl" - + "oud.osconfig.v1alpha\032\037google/api/field_b" - + "ehavior.proto\032\031google/api/resource.proto" - + "\0321google/cloud/osconfig/v1alpha/config_c" - + "ommon.proto\032\037google/protobuf/timestamp.p" - + "roto\"\350\006\n\034InstanceOSPoliciesCompliance\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\003\022\025\n\010instance\030\002 \001(\tB\003\340A\003\022" - + "J\n\005state\030\003 \001(\01626.google.cloud.osconfig.v" - + "1alpha.OSPolicyComplianceStateB\003\340A\003\022\033\n\016d" - + "etailed_state\030\004 \001(\tB\003\340A\003\022\"\n\025detailed_sta" - + "te_reason\030\005 \001(\tB\003\340A\003\022r\n\025os_policy_compli" - + "ances\030\006 \003(\0132N.google.cloud.osconfig.v1al" - + "pha.InstanceOSPoliciesCompliance.OSPolic" - + "yComplianceB\003\340A\003\022C\n\032last_compliance_chec" - + "k_time\030\007 \001(\0132\032.google.protobuf.Timestamp" - + "B\003\340A\003\022#\n\026last_compliance_run_id\030\010 \001(\tB\003\340" - + "A\003\032\243\002\n\022OSPolicyCompliance\022\024\n\014os_policy_i" - + "d\030\001 \001(\t\022M\n\024os_policy_assignment\030\002 \001(\tB/\372" - + "A,\n*osconfig.googleapis.com/OSPolicyAssi" - + "gnment\022E\n\005state\030\004 \001(\01626.google.cloud.osc" - + "onfig.v1alpha.OSPolicyComplianceState\022a\n" - + "\036os_policy_resource_compliances\030\005 \003(\01329." - + "google.cloud.osconfig.v1alpha.OSPolicyRe" - + "sourceCompliance:\214\001\352A\210\001\n4osconfig.google" - + "apis.com/InstanceOSPoliciesCompliance\022Pp" - + "rojects/{project}/locations/{location}/i" - + "nstanceOSPoliciesCompliances/{instance}\"" - + "t\n&GetInstanceOSPoliciesComplianceReques" - + "t\022J\n\004name\030\001 \001(\tB<\340A\002\372A6\n4osconfig.google" - + "apis.com/InstanceOSPoliciesCompliance\"\234\001" + + "oud.osconfig.v1alpha\032\034google/api/annotat" + + "ions.proto\032\037google/api/field_behavior.pr" + + "oto\032\031google/api/resource.proto\0321google/c" + + "loud/osconfig/v1alpha/config_common.prot" + + "o\032\037google/protobuf/timestamp.proto\"\356\006\n\034I" + + "nstanceOSPoliciesCompliance\022\021\n\004name\030\001 \001(" + + "\tB\003\340A\003\022\025\n\010instance\030\002 \001(\tB\003\340A\003\022J\n\005state\030\003" + + " \001(\01626.google.cloud.osconfig.v1alpha.OSP" + + "olicyComplianceStateB\003\340A\003\022\033\n\016detailed_st" + + "ate\030\004 \001(\tB\003\340A\003\022\"\n\025detailed_state_reason\030" + + "\005 \001(\tB\003\340A\003\022r\n\025os_policy_compliances\030\006 \003(" + + "\0132N.google.cloud.osconfig.v1alpha.Instan" + + "ceOSPoliciesCompliance.OSPolicyComplianc" + + "eB\003\340A\003\022C\n\032last_compliance_check_time\030\007 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\022#\n\026l" + + "ast_compliance_run_id\030\010 \001(\tB\003\340A\003\032\247\002\n\022OSP" + + "olicyCompliance\022\024\n\014os_policy_id\030\001 \001(\t\022M\n" + + "\024os_policy_assignment\030\002 \001(\tB/\372A,\n*osconf" + + "ig.googleapis.com/OSPolicyAssignment\022E\n\005" + + "state\030\004 \001(\01626.google.cloud.osconfig.v1al" + + "pha.OSPolicyComplianceState\022a\n\036os_policy" + + "_resource_compliances\030\005 \003(\01329.google.clo" + + "ud.osconfig.v1alpha.OSPolicyResourceComp" + + "liance:\002\030\001:\216\001\030\001\352A\210\001\n4osconfig.googleapis" + + ".com/InstanceOSPoliciesCompliance\022Pproje" + + "cts/{project}/locations/{location}/insta" + + "nceOSPoliciesCompliances/{instance}\"x\n&G" + + "etInstanceOSPoliciesComplianceRequest\022J\n" + + "\004name\030\001 \001(\tB<\340A\002\372A6\n4osconfig.googleapis" + + ".com/InstanceOSPoliciesCompliance:\002\030\001\"\240\001" + "\n(ListInstanceOSPoliciesCompliancesReque" + "st\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.go" + "ogleapis.com/Location\022\021\n\tpage_size\030\002 \001(\005" - + "\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"\253\001\n" - + ")ListInstanceOSPoliciesCompliancesRespon" - + "se\022e\n instance_os_policies_compliances\030\001" - + " \003(\0132;.google.cloud.osconfig.v1alpha.Ins" - + "tanceOSPoliciesCompliance\022\027\n\017next_page_t" - + "oken\030\002 \001(\tB\362\001\n!com.google.cloud.osconfig" - + ".v1alphaB!InstanceOSPoliciesCompliancePr" - + "otoP\001ZEgoogle.golang.org/genproto/google" - + "apis/cloud/osconfig/v1alpha;osconfig\252\002\035G" - + "oogle.Cloud.OsConfig.V1Alpha\312\002\035Google\\Cl" - + "oud\\OsConfig\\V1alpha\352\002 Google::Cloud::Os" - + "Config::V1alphab\006proto3" + + "\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t:\002\030\001" + + "\"\257\001\n)ListInstanceOSPoliciesCompliancesRe" + + "sponse\022e\n instance_os_policies_complianc" + + "es\030\001 \003(\0132;.google.cloud.osconfig.v1alpha" + + ".InstanceOSPoliciesCompliance\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t:\002\030\001B\362\001\n!com.google.cloud." + + "osconfig.v1alphaB!InstanceOSPoliciesComp" + + "lianceProtoP\001ZEgoogle.golang.org/genprot" + + "o/googleapis/cloud/osconfig/v1alpha;osco" + + "nfig\252\002\035Google.Cloud.OsConfig.V1Alpha\312\002\035G" + + "oogle\\Cloud\\OsConfig\\V1alpha\352\002 Google::C" + + "loud::OsConfig::V1alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.osconfig.v1alpha.ConfigCommonProto.getDescriptor(), @@ -168,6 +170,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.osconfig.v1alpha.ConfigCommonProto.getDescriptor(); diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPolicyAssignmentName.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPolicyAssignmentName.java new file mode 100644 index 00000000..1627f6da --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPolicyAssignmentName.java @@ -0,0 +1,262 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class InstanceOSPolicyAssignmentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE_ASSIGNMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + private final String assignment; + + @Deprecated + protected InstanceOSPolicyAssignmentName() { + project = null; + location = null; + instance = null; + assignment = null; + } + + private InstanceOSPolicyAssignmentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + assignment = Preconditions.checkNotNull(builder.getAssignment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public String getAssignment() { + return assignment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstanceOSPolicyAssignmentName of( + String project, String location, String instance, String assignment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .setAssignment(assignment) + .build(); + } + + public static String format(String project, String location, String instance, String assignment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .setAssignment(assignment) + .build() + .toString(); + } + + public static InstanceOSPolicyAssignmentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE_ASSIGNMENT.validatedMatch( + formattedString, + "InstanceOSPolicyAssignmentName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("instance"), + matchMap.get("assignment")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (InstanceOSPolicyAssignmentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE_ASSIGNMENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + if (assignment != null) { + fieldMapBuilder.put("assignment", assignment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE_ASSIGNMENT.instantiate( + "project", project, "location", location, "instance", instance, "assignment", assignment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + InstanceOSPolicyAssignmentName that = ((InstanceOSPolicyAssignmentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance) + && Objects.equals(this.assignment, that.assignment); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(instance); + h *= 1000003; + h ^= Objects.hashCode(assignment); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}. + */ + public static class Builder { + private String project; + private String location; + private String instance; + private String assignment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public String getAssignment() { + return assignment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + public Builder setAssignment(String assignment) { + this.assignment = assignment; + return this; + } + + private Builder(InstanceOSPolicyAssignmentName instanceOSPolicyAssignmentName) { + this.project = instanceOSPolicyAssignmentName.project; + this.location = instanceOSPolicyAssignmentName.location; + this.instance = instanceOSPolicyAssignmentName.instance; + this.assignment = instanceOSPolicyAssignmentName.assignment; + } + + public InstanceOSPolicyAssignmentName build() { + return new InstanceOSPolicyAssignmentName(this); + } + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventories.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventories.java index b711380a..79399bf8 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventories.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventories.java @@ -93,106 +93,108 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n-google/cloud/osconfig/v1alpha/inventor" - + "y.proto\022\035google.cloud.osconfig.v1alpha\032\037" - + "google/api/field_behavior.proto\032\031google/" - + "api/resource.proto\032\037google/protobuf/time" - + "stamp.proto\032\026google/type/date.proto\"\267\026\n\t" - + "Inventory\022\021\n\004name\030\003 \001(\tB\003\340A\003\022E\n\007os_info\030" - + "\001 \001(\0132/.google.cloud.osconfig.v1alpha.In" - + "ventory.OsInfoB\003\340A\003\022G\n\005items\030\002 \003(\01323.goo" - + "gle.cloud.osconfig.v1alpha.Inventory.Ite" - + "msEntryB\003\340A\003\0224\n\013update_time\030\004 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\003\032\270\001\n\006OsInfo\022\020\n" - + "\010hostname\030\t \001(\t\022\021\n\tlong_name\030\002 \001(\t\022\022\n\nsh" - + "ort_name\030\003 \001(\t\022\017\n\007version\030\004 \001(\t\022\024\n\014archi" - + "tecture\030\005 \001(\t\022\026\n\016kernel_version\030\006 \001(\t\022\026\n" - + "\016kernel_release\030\007 \001(\t\022\036\n\026osconfig_agent_" - + "version\030\010 \001(\t\032\313\004\n\004Item\022\n\n\002id\030\001 \001(\t\022M\n\013or" - + "igin_type\030\002 \001(\01628.google.cloud.osconfig." - + "v1alpha.Inventory.Item.OriginType\022/\n\013cre" - + "ate_time\030\010 \001(\0132\032.google.protobuf.Timesta" - + "mp\022/\n\013update_time\030\t \001(\0132\032.google.protobu" - + "f.Timestamp\022@\n\004type\030\005 \001(\01622.google.cloud" - + ".osconfig.v1alpha.Inventory.Item.Type\022U\n" - + "\021installed_package\030\006 \001(\01328.google.cloud." - + "osconfig.v1alpha.Inventory.SoftwarePacka" - + "geH\000\022U\n\021available_package\030\007 \001(\01328.google" - + ".cloud.osconfig.v1alpha.Inventory.Softwa" - + "rePackageH\000\"?\n\nOriginType\022\033\n\027ORIGIN_TYPE" - + "_UNSPECIFIED\020\000\022\024\n\020INVENTORY_REPORT\020\001\"J\n\004" - + "Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\025\n\021INSTALLED_" - + "PACKAGE\020\001\022\025\n\021AVAILABLE_PACKAGE\020\002B\t\n\007deta" - + "ils\032\237\006\n\017SoftwarePackage\022P\n\013yum_package\030\001" - + " \001(\01329.google.cloud.osconfig.v1alpha.Inv" - + "entory.VersionedPackageH\000\022P\n\013apt_package" - + "\030\002 \001(\01329.google.cloud.osconfig.v1alpha.I" - + "nventory.VersionedPackageH\000\022S\n\016zypper_pa" - + "ckage\030\003 \001(\01329.google.cloud.osconfig.v1al" - + "pha.Inventory.VersionedPackageH\000\022S\n\016goog" - + "et_package\030\004 \001(\01329.google.cloud.osconfig" - + ".v1alpha.Inventory.VersionedPackageH\000\022L\n" - + "\014zypper_patch\030\005 \001(\01324.google.cloud.oscon" - + "fig.v1alpha.Inventory.ZypperPatchH\000\022T\n\013w" - + "ua_package\030\006 \001(\0132=.google.cloud.osconfig" - + ".v1alpha.Inventory.WindowsUpdatePackageH" - + "\000\022a\n\013qfe_package\030\007 \001(\0132J.google.cloud.os" - + "config.v1alpha.Inventory.WindowsQuickFix" - + "EngineeringPackageH\000\022P\n\013cos_package\030\010 \001(" + + "y.proto\022\035google.cloud.osconfig.v1alpha\032\034" + + "google/api/annotations.proto\032\037google/api" + + "/field_behavior.proto\032\031google/api/resour" + + "ce.proto\032\037google/protobuf/timestamp.prot" + + "o\032\026google/type/date.proto\"\267\026\n\tInventory\022" + + "\021\n\004name\030\003 \001(\tB\003\340A\003\022E\n\007os_info\030\001 \001(\0132/.go" + + "ogle.cloud.osconfig.v1alpha.Inventory.Os" + + "InfoB\003\340A\003\022G\n\005items\030\002 \003(\01323.google.cloud." + + "osconfig.v1alpha.Inventory.ItemsEntryB\003\340" + + "A\003\0224\n\013update_time\030\004 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\032\270\001\n\006OsInfo\022\020\n\010hostname\030" + + "\t \001(\t\022\021\n\tlong_name\030\002 \001(\t\022\022\n\nshort_name\030\003" + + " \001(\t\022\017\n\007version\030\004 \001(\t\022\024\n\014architecture\030\005 " + + "\001(\t\022\026\n\016kernel_version\030\006 \001(\t\022\026\n\016kernel_re" + + "lease\030\007 \001(\t\022\036\n\026osconfig_agent_version\030\010 " + + "\001(\t\032\313\004\n\004Item\022\n\n\002id\030\001 \001(\t\022M\n\013origin_type\030" + + "\002 \001(\01628.google.cloud.osconfig.v1alpha.In" + + "ventory.Item.OriginType\022/\n\013create_time\030\010" + + " \001(\0132\032.google.protobuf.Timestamp\022/\n\013upda" + + "te_time\030\t \001(\0132\032.google.protobuf.Timestam" + + "p\022@\n\004type\030\005 \001(\01622.google.cloud.osconfig." + + "v1alpha.Inventory.Item.Type\022U\n\021installed" + + "_package\030\006 \001(\01328.google.cloud.osconfig.v" + + "1alpha.Inventory.SoftwarePackageH\000\022U\n\021av" + + "ailable_package\030\007 \001(\01328.google.cloud.osc" + + "onfig.v1alpha.Inventory.SoftwarePackageH" + + "\000\"?\n\nOriginType\022\033\n\027ORIGIN_TYPE_UNSPECIFI" + + "ED\020\000\022\024\n\020INVENTORY_REPORT\020\001\"J\n\004Type\022\024\n\020TY" + + "PE_UNSPECIFIED\020\000\022\025\n\021INSTALLED_PACKAGE\020\001\022" + + "\025\n\021AVAILABLE_PACKAGE\020\002B\t\n\007details\032\237\006\n\017So" + + "ftwarePackage\022P\n\013yum_package\030\001 \001(\01329.goo" + + "gle.cloud.osconfig.v1alpha.Inventory.Ver" + + "sionedPackageH\000\022P\n\013apt_package\030\002 \001(\01329.g" + + "oogle.cloud.osconfig.v1alpha.Inventory.V" + + "ersionedPackageH\000\022S\n\016zypper_package\030\003 \001(" + "\01329.google.cloud.osconfig.v1alpha.Invent" - + "ory.VersionedPackageH\000\022Z\n\023windows_applic" - + "ation\030\t \001(\0132;.google.cloud.osconfig.v1al" - + "pha.Inventory.WindowsApplicationH\000B\t\n\007de" - + "tails\032O\n\020VersionedPackage\022\024\n\014package_nam" - + "e\030\004 \001(\t\022\024\n\014architecture\030\002 \001(\t\022\017\n\007version" - + "\030\003 \001(\t\032V\n\013ZypperPatch\022\022\n\npatch_name\030\005 \001(" - + "\t\022\020\n\010category\030\002 \001(\t\022\020\n\010severity\030\003 \001(\t\022\017\n" - + "\007summary\030\004 \001(\t\032\210\003\n\024WindowsUpdatePackage\022" - + "\r\n\005title\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022g\n\nc" - + "ategories\030\003 \003(\0132S.google.cloud.osconfig." - + "v1alpha.Inventory.WindowsUpdatePackage.W" - + "indowsUpdateCategory\022\026\n\016kb_article_ids\030\004" - + " \003(\t\022\023\n\013support_url\030\013 \001(\t\022\026\n\016more_info_u" - + "rls\030\005 \003(\t\022\021\n\tupdate_id\030\006 \001(\t\022\027\n\017revision" - + "_number\030\007 \001(\005\022?\n\033last_deployment_change_" - + "time\030\n \001(\0132\032.google.protobuf.Timestamp\0321" - + "\n\025WindowsUpdateCategory\022\n\n\002id\030\001 \001(\t\022\014\n\004n" - + "ame\030\002 \001(\t\032\217\001\n!WindowsQuickFixEngineering" - + "Package\022\017\n\007caption\030\001 \001(\t\022\023\n\013description\030" - + "\002 \001(\t\022\022\n\nhot_fix_id\030\003 \001(\t\0220\n\014install_tim" - + "e\030\005 \001(\0132\032.google.protobuf.Timestamp\032\222\001\n\022" - + "WindowsApplication\022\024\n\014display_name\030\001 \001(\t" - + "\022\027\n\017display_version\030\002 \001(\t\022\021\n\tpublisher\030\003" - + " \001(\t\022\'\n\014install_date\030\004 \001(\0132\021.google.type" - + ".Date\022\021\n\thelp_link\030\005 \001(\t\032[\n\nItemsEntry\022\013" - + "\n\003key\030\001 \001(\t\022<\n\005value\030\002 \001(\0132-.google.clou" - + "d.osconfig.v1alpha.Inventory.Item:\0028\001:n\352" - + "Ak\n!osconfig.googleapis.com/Inventory\022Fp" - + "rojects/{project}/locations/{location}/i" - + "nstances/{instance}/inventory\"\212\001\n\023GetInv" - + "entoryRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!osc" - + "onfig.googleapis.com/Inventory\022:\n\004view\030\002" - + " \001(\0162,.google.cloud.osconfig.v1alpha.Inv" - + "entoryView\"\304\001\n\026ListInventoriesRequest\0227\n" - + "\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037compute.googleapi" - + "s.com/Instance\022:\n\004view\030\002 \001(\0162,.google.cl" - + "oud.osconfig.v1alpha.InventoryView\022\021\n\tpa" - + "ge_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\016\n\006fil" - + "ter\030\005 \001(\t\"q\n\027ListInventoriesResponse\022=\n\013" - + "inventories\030\001 \003(\0132(.google.cloud.osconfi" - + "g.v1alpha.Inventory\022\027\n\017next_page_token\030\002" - + " \001(\t*D\n\rInventoryView\022\036\n\032INVENTORY_VIEW_" - + "UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002B\334\001\n!c" - + "om.google.cloud.osconfig.v1alphaB\013Invent" - + "oriesP\001ZEgoogle.golang.org/genproto/goog" - + "leapis/cloud/osconfig/v1alpha;osconfig\252\002" - + "\035Google.Cloud.OsConfig.V1Alpha\312\002\035Google\\" - + "Cloud\\OsConfig\\V1alpha\352\002 Google::Cloud::" - + "OsConfig::V1alphab\006proto3" + + "ory.VersionedPackageH\000\022S\n\016googet_package" + + "\030\004 \001(\01329.google.cloud.osconfig.v1alpha.I" + + "nventory.VersionedPackageH\000\022L\n\014zypper_pa" + + "tch\030\005 \001(\01324.google.cloud.osconfig.v1alph" + + "a.Inventory.ZypperPatchH\000\022T\n\013wua_package" + + "\030\006 \001(\0132=.google.cloud.osconfig.v1alpha.I" + + "nventory.WindowsUpdatePackageH\000\022a\n\013qfe_p" + + "ackage\030\007 \001(\0132J.google.cloud.osconfig.v1a" + + "lpha.Inventory.WindowsQuickFixEngineerin" + + "gPackageH\000\022P\n\013cos_package\030\010 \001(\01329.google" + + ".cloud.osconfig.v1alpha.Inventory.Versio" + + "nedPackageH\000\022Z\n\023windows_application\030\t \001(" + + "\0132;.google.cloud.osconfig.v1alpha.Invent" + + "ory.WindowsApplicationH\000B\t\n\007details\032O\n\020V" + + "ersionedPackage\022\024\n\014package_name\030\004 \001(\t\022\024\n" + + "\014architecture\030\002 \001(\t\022\017\n\007version\030\003 \001(\t\032V\n\013" + + "ZypperPatch\022\022\n\npatch_name\030\005 \001(\t\022\020\n\010categ" + + "ory\030\002 \001(\t\022\020\n\010severity\030\003 \001(\t\022\017\n\007summary\030\004" + + " \001(\t\032\210\003\n\024WindowsUpdatePackage\022\r\n\005title\030\001" + + " \001(\t\022\023\n\013description\030\002 \001(\t\022g\n\ncategories\030" + + "\003 \003(\0132S.google.cloud.osconfig.v1alpha.In" + + "ventory.WindowsUpdatePackage.WindowsUpda" + + "teCategory\022\026\n\016kb_article_ids\030\004 \003(\t\022\023\n\013su" + + "pport_url\030\013 \001(\t\022\026\n\016more_info_urls\030\005 \003(\t\022" + + "\021\n\tupdate_id\030\006 \001(\t\022\027\n\017revision_number\030\007 " + + "\001(\005\022?\n\033last_deployment_change_time\030\n \001(\013" + + "2\032.google.protobuf.Timestamp\0321\n\025WindowsU" + + "pdateCategory\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\032" + + "\217\001\n!WindowsQuickFixEngineeringPackage\022\017\n" + + "\007caption\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\022\n\nh" + + "ot_fix_id\030\003 \001(\t\0220\n\014install_time\030\005 \001(\0132\032." + + "google.protobuf.Timestamp\032\222\001\n\022WindowsApp" + + "lication\022\024\n\014display_name\030\001 \001(\t\022\027\n\017displa" + + "y_version\030\002 \001(\t\022\021\n\tpublisher\030\003 \001(\t\022\'\n\014in" + + "stall_date\030\004 \001(\0132\021.google.type.Date\022\021\n\th" + + "elp_link\030\005 \001(\t\032[\n\nItemsEntry\022\013\n\003key\030\001 \001(" + + "\t\022<\n\005value\030\002 \001(\0132-.google.cloud.osconfig" + + ".v1alpha.Inventory.Item:\0028\001:n\352Ak\n!osconf" + + "ig.googleapis.com/Inventory\022Fprojects/{p" + + "roject}/locations/{location}/instances/{" + + "instance}/inventory\"\212\001\n\023GetInventoryRequ" + + "est\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!osconfig.goog" + + "leapis.com/Inventory\022:\n\004view\030\002 \001(\0162,.goo" + + "gle.cloud.osconfig.v1alpha.InventoryView" + + "\"\304\001\n\026ListInventoriesRequest\0227\n\006parent\030\001 " + + "\001(\tB\'\340A\002\372A!\n\037compute.googleapis.com/Inst" + + "ance\022:\n\004view\030\002 \001(\0162,.google.cloud.osconf" + + "ig.v1alpha.InventoryView\022\021\n\tpage_size\030\003 " + + "\001(\005\022\022\n\npage_token\030\004 \001(\t\022\016\n\006filter\030\005 \001(\t\"" + + "q\n\027ListInventoriesResponse\022=\n\013inventorie" + + "s\030\001 \003(\0132(.google.cloud.osconfig.v1alpha." + + "Inventory\022\027\n\017next_page_token\030\002 \001(\t*D\n\rIn" + + "ventoryView\022\036\n\032INVENTORY_VIEW_UNSPECIFIE" + + "D\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002B\334\001\n!com.google." + + "cloud.osconfig.v1alphaB\013InventoriesP\001ZEg" + + "oogle.golang.org/genproto/googleapis/clo" + + "ud/osconfig/v1alpha;osconfig\252\002\035Google.Cl" + + "oud.OsConfig.V1Alpha\312\002\035Google\\Cloud\\OsCo" + + "nfig\\V1alpha\352\002 Google::Cloud::OsConfig::" + + "V1alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), @@ -350,6 +352,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventory.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventory.java index b9d1035c..e59719db 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventory.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventory.java @@ -16945,11 +16945,9 @@ public interface WindowsApplicationOrBuilder * * *
-   * Contains information about a Windows application as retrieved from the
-   * Windows Registry. For more information about these fields, see
-   * [Windows Installer Properties for the Uninstall
-   * Registry](https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key){:
-   * class="external" }
+   * Contains information about a Windows application that is retrieved from the
+   * Windows Registry. For more information about these fields, see:
+   * https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key
    * 
* * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} @@ -17530,11 +17528,9 @@ protected Builder newBuilderForType( * * *
-     * Contains information about a Windows application as retrieved from the
-     * Windows Registry. For more information about these fields, see
-     * [Windows Installer Properties for the Uninstall
-     * Registry](https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key){:
-     * class="external" }
+     * Contains information about a Windows application that is retrieved from the
+     * Windows Registry. For more information about these fields, see:
+     * https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key
      * 
* * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.WindowsApplication} @@ -18547,10 +18543,10 @@ public int getItemsCount() { * * *
-   * Output only. Inventory items related to the VM keyed by an opaque unique
-   * identifier for each inventory item. The identifier is unique to each
-   * distinct and addressable inventory item and will change, when there is a
-   * new package version.
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
    * 
* * @@ -18575,10 +18571,10 @@ public boolean containsItems(java.lang.String key) { * * *
-   * Output only. Inventory items related to the VM keyed by an opaque unique
-   * identifier for each inventory item. The identifier is unique to each
-   * distinct and addressable inventory item and will change, when there is a
-   * new package version.
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
    * 
* * @@ -18594,10 +18590,10 @@ public boolean containsItems(java.lang.String key) { * * *
-   * Output only. Inventory items related to the VM keyed by an opaque unique
-   * identifier for each inventory item. The identifier is unique to each
-   * distinct and addressable inventory item and will change, when there is a
-   * new package version.
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
    * 
* * @@ -18618,10 +18614,10 @@ public com.google.cloud.osconfig.v1alpha.Inventory.Item getItemsOrDefault( * * *
-   * Output only. Inventory items related to the VM keyed by an opaque unique
-   * identifier for each inventory item. The identifier is unique to each
-   * distinct and addressable inventory item and will change, when there is a
-   * new package version.
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
    * 
* * @@ -19466,10 +19462,10 @@ public int getItemsCount() { * * *
-     * Output only. Inventory items related to the VM keyed by an opaque unique
-     * identifier for each inventory item. The identifier is unique to each
-     * distinct and addressable inventory item and will change, when there is a
-     * new package version.
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
      * 
* * @@ -19494,10 +19490,10 @@ public boolean containsItems(java.lang.String key) { * * *
-     * Output only. Inventory items related to the VM keyed by an opaque unique
-     * identifier for each inventory item. The identifier is unique to each
-     * distinct and addressable inventory item and will change, when there is a
-     * new package version.
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
      * 
* * @@ -19513,10 +19509,10 @@ public boolean containsItems(java.lang.String key) { * * *
-     * Output only. Inventory items related to the VM keyed by an opaque unique
-     * identifier for each inventory item. The identifier is unique to each
-     * distinct and addressable inventory item and will change, when there is a
-     * new package version.
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
      * 
* * @@ -19537,10 +19533,10 @@ public com.google.cloud.osconfig.v1alpha.Inventory.Item getItemsOrDefault( * * *
-     * Output only. Inventory items related to the VM keyed by an opaque unique
-     * identifier for each inventory item. The identifier is unique to each
-     * distinct and addressable inventory item and will change, when there is a
-     * new package version.
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
      * 
* * @@ -19568,10 +19564,10 @@ public Builder clearItems() { * * *
-     * Output only. Inventory items related to the VM keyed by an opaque unique
-     * identifier for each inventory item. The identifier is unique to each
-     * distinct and addressable inventory item and will change, when there is a
-     * new package version.
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
      * 
* * @@ -19595,10 +19591,10 @@ public Builder removeItems(java.lang.String key) { * * *
-     * Output only. Inventory items related to the VM keyed by an opaque unique
-     * identifier for each inventory item. The identifier is unique to each
-     * distinct and addressable inventory item and will change, when there is a
-     * new package version.
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
      * 
* * @@ -19620,10 +19616,10 @@ public Builder putItems( * * *
-     * Output only. Inventory items related to the VM keyed by an opaque unique
-     * identifier for each inventory item. The identifier is unique to each
-     * distinct and addressable inventory item and will change, when there is a
-     * new package version.
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
      * 
* * diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryOrBuilder.java index 4bded6fd..f2e83551 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryOrBuilder.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryOrBuilder.java @@ -97,10 +97,10 @@ public interface InventoryOrBuilder * * *
-   * Output only. Inventory items related to the VM keyed by an opaque unique
-   * identifier for each inventory item. The identifier is unique to each
-   * distinct and addressable inventory item and will change, when there is a
-   * new package version.
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
    * 
* * @@ -112,10 +112,10 @@ public interface InventoryOrBuilder * * *
-   * Output only. Inventory items related to the VM keyed by an opaque unique
-   * identifier for each inventory item. The identifier is unique to each
-   * distinct and addressable inventory item and will change, when there is a
-   * new package version.
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
    * 
* * @@ -130,10 +130,10 @@ public interface InventoryOrBuilder * * *
-   * Output only. Inventory items related to the VM keyed by an opaque unique
-   * identifier for each inventory item. The identifier is unique to each
-   * distinct and addressable inventory item and will change, when there is a
-   * new package version.
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
    * 
* * @@ -145,10 +145,10 @@ public interface InventoryOrBuilder * * *
-   * Output only. Inventory items related to the VM keyed by an opaque unique
-   * identifier for each inventory item. The identifier is unique to each
-   * distinct and addressable inventory item and will change, when there is a
-   * new package version.
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
    * 
* * @@ -161,10 +161,10 @@ com.google.cloud.osconfig.v1alpha.Inventory.Item getItemsOrDefault( * * *
-   * Output only. Inventory items related to the VM keyed by an opaque unique
-   * identifier for each inventory item. The identifier is unique to each
-   * distinct and addressable inventory item and will change, when there is a
-   * new package version.
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
    * 
* * diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequest.java index 99a835dd..1288f32f 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequest.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequest.java @@ -28,6 +28,7 @@ * * Protobuf type {@code google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} */ +@java.lang.Deprecated public final class ListInstanceOSPoliciesCompliancesRequest extends com.google.protobuf.GeneratedMessageV3 implements diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequestOrBuilder.java index 51d93519..a03e34a3 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequestOrBuilder.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequestOrBuilder.java @@ -18,6 +18,7 @@ package com.google.cloud.osconfig.v1alpha; +@java.lang.Deprecated public interface ListInstanceOSPoliciesCompliancesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest) diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponse.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponse.java index dfa63888..17db0734 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponse.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponse.java @@ -28,6 +28,7 @@ * * Protobuf type {@code google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} */ +@java.lang.Deprecated public final class ListInstanceOSPoliciesCompliancesResponse extends com.google.protobuf.GeneratedMessageV3 implements diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponseOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponseOrBuilder.java index c5a4f606..6e5c13ad 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponseOrBuilder.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponseOrBuilder.java @@ -18,6 +18,7 @@ package com.google.cloud.osconfig.v1alpha; +@java.lang.Deprecated public interface ListInstanceOSPoliciesCompliancesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequest.java index 23f79947..671ded99 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequest.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequest.java @@ -148,10 +148,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The parent resource name.
-   * Format: `projects/{project}/locations/{location}/instances/{instance}`
-   * For `{project}`, either `project-number` or `project-id` can be
-   * provided. For `{instance}`, only hyphen or dash character is supported to
-   * list inventories across VMs.
+   * Format: `projects/{project}/locations/{location}/instances/-`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
    * 
* * @@ -177,10 +175,8 @@ public java.lang.String getParent() { * *
    * Required. The parent resource name.
-   * Format: `projects/{project}/locations/{location}/instances/{instance}`
-   * For `{project}`, either `project-number` or `project-id` can be
-   * provided. For `{instance}`, only hyphen or dash character is supported to
-   * list inventories across VMs.
+   * Format: `projects/{project}/locations/{location}/instances/-`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
    * 
* * @@ -752,10 +748,8 @@ public Builder mergeFrom( * *
      * Required. The parent resource name.
-     * Format: `projects/{project}/locations/{location}/instances/{instance}`
-     * For `{project}`, either `project-number` or `project-id` can be
-     * provided. For `{instance}`, only hyphen or dash character is supported to
-     * list inventories across VMs.
+     * Format: `projects/{project}/locations/{location}/instances/-`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
      * 
* * @@ -780,10 +774,8 @@ public java.lang.String getParent() { * *
      * Required. The parent resource name.
-     * Format: `projects/{project}/locations/{location}/instances/{instance}`
-     * For `{project}`, either `project-number` or `project-id` can be
-     * provided. For `{instance}`, only hyphen or dash character is supported to
-     * list inventories across VMs.
+     * Format: `projects/{project}/locations/{location}/instances/-`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
      * 
* * @@ -808,10 +800,8 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The parent resource name.
-     * Format: `projects/{project}/locations/{location}/instances/{instance}`
-     * For `{project}`, either `project-number` or `project-id` can be
-     * provided. For `{instance}`, only hyphen or dash character is supported to
-     * list inventories across VMs.
+     * Format: `projects/{project}/locations/{location}/instances/-`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
      * 
* * @@ -835,10 +825,8 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The parent resource name.
-     * Format: `projects/{project}/locations/{location}/instances/{instance}`
-     * For `{project}`, either `project-number` or `project-id` can be
-     * provided. For `{instance}`, only hyphen or dash character is supported to
-     * list inventories across VMs.
+     * Format: `projects/{project}/locations/{location}/instances/-`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
      * 
* * @@ -858,10 +846,8 @@ public Builder clearParent() { * *
      * Required. The parent resource name.
-     * Format: `projects/{project}/locations/{location}/instances/{instance}`
-     * For `{project}`, either `project-number` or `project-id` can be
-     * provided. For `{instance}`, only hyphen or dash character is supported to
-     * list inventories across VMs.
+     * Format: `projects/{project}/locations/{location}/instances/-`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
      * 
* * diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequestOrBuilder.java index 7598372e..3227bf7e 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequestOrBuilder.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequestOrBuilder.java @@ -28,10 +28,8 @@ public interface ListInventoriesRequestOrBuilder * *
    * Required. The parent resource name.
-   * Format: `projects/{project}/locations/{location}/instances/{instance}`
-   * For `{project}`, either `project-number` or `project-id` can be
-   * provided. For `{instance}`, only hyphen or dash character is supported to
-   * list inventories across VMs.
+   * Format: `projects/{project}/locations/{location}/instances/-`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
    * 
* * @@ -46,10 +44,8 @@ public interface ListInventoriesRequestOrBuilder * *
    * Required. The parent resource name.
-   * Format: `projects/{project}/locations/{location}/instances/{instance}`
-   * For `{project}`, either `project-number` or `project-id` can be
-   * provided. For `{instance}`, only hyphen or dash character is supported to
-   * list inventories across VMs.
+   * Format: `projects/{project}/locations/{location}/instances/-`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
    * 
* * diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentReportsRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentReportsRequest.java new file mode 100644 index 00000000..20a6920b --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentReportsRequest.java @@ -0,0 +1,1253 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * List the OS policy assignment reports for VM instances.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest} + */ +public final class ListOSPolicyAssignmentReportsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest) + ListOSPolicyAssignmentReportsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListOSPolicyAssignmentReportsRequest.newBuilder() to construct. + private ListOSPolicyAssignmentReportsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListOSPolicyAssignmentReportsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListOSPolicyAssignmentReportsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListOSPolicyAssignmentReportsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest.class, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource name.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be
+   * provided. If '-' is provided, the response will include
+   * OSPolicyAssignmentReports for all instances in the project/location.
+   * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-'
+   * is provided, the response will include OSPolicyAssignmentReports for all
+   * OSPolicyAssignments in the project/location.
+   * Either {instance} or {assignment} must be `-`.
+   * For example:
+   * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
+   *  returns all reports for the instance
+   * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
+   *  returns all the reports for the given assignment across all instances.
+   * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
+   *  returns all the reports for all assignments across all instances.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource name.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be
+   * provided. If '-' is provided, the response will include
+   * OSPolicyAssignmentReports for all instances in the project/location.
+   * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-'
+   * is provided, the response will include OSPolicyAssignmentReports for all
+   * OSPolicyAssignments in the project/location.
+   * Either {instance} or {assignment} must be `-`.
+   * For example:
+   * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
+   *  returns all reports for the instance
+   * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
+   *  returns all the reports for the given assignment across all instances.
+   * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
+   *  returns all the reports for all assignments across all instances.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of results to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int FILTER_FIELD_NUMBER = 3; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by the
+   * `OSPolicyAssignmentReport` API resource that is included in the response.
+   * 
+ * + * string filter = 3; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by the
+   * `OSPolicyAssignmentReport` API resource that is included in the response.
+   * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A pagination token returned from a previous call to the
+   * `ListOSPolicyAssignmentReports` method that indicates where this listing
+   * should continue from.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A pagination token returned from a previous call to the
+   * `ListOSPolicyAssignmentReports` method that indicates where this listing
+   * should continue from.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest other = + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List the OS policy assignment reports for VM instances.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest) + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest.class, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + filter_ = ""; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest build() { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest result = + new com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.filter_ = filter_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest other) { + if (other + == com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be
+     * provided. If '-' is provided, the response will include
+     * OSPolicyAssignmentReports for all instances in the project/location.
+     * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-'
+     * is provided, the response will include OSPolicyAssignmentReports for all
+     * OSPolicyAssignments in the project/location.
+     * Either {instance} or {assignment} must be `-`.
+     * For example:
+     * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
+     *  returns all reports for the instance
+     * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
+     *  returns all the reports for the given assignment across all instances.
+     * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
+     *  returns all the reports for all assignments across all instances.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be
+     * provided. If '-' is provided, the response will include
+     * OSPolicyAssignmentReports for all instances in the project/location.
+     * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-'
+     * is provided, the response will include OSPolicyAssignmentReports for all
+     * OSPolicyAssignments in the project/location.
+     * Either {instance} or {assignment} must be `-`.
+     * For example:
+     * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
+     *  returns all reports for the instance
+     * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
+     *  returns all the reports for the given assignment across all instances.
+     * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
+     *  returns all the reports for all assignments across all instances.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be
+     * provided. If '-' is provided, the response will include
+     * OSPolicyAssignmentReports for all instances in the project/location.
+     * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-'
+     * is provided, the response will include OSPolicyAssignmentReports for all
+     * OSPolicyAssignments in the project/location.
+     * Either {instance} or {assignment} must be `-`.
+     * For example:
+     * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
+     *  returns all reports for the instance
+     * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
+     *  returns all the reports for the given assignment across all instances.
+     * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
+     *  returns all the reports for all assignments across all instances.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be
+     * provided. If '-' is provided, the response will include
+     * OSPolicyAssignmentReports for all instances in the project/location.
+     * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-'
+     * is provided, the response will include OSPolicyAssignmentReports for all
+     * OSPolicyAssignments in the project/location.
+     * Either {instance} or {assignment} must be `-`.
+     * For example:
+     * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
+     *  returns all reports for the instance
+     * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
+     *  returns all the reports for the given assignment across all instances.
+     * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
+     *  returns all the reports for all assignments across all instances.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be
+     * provided. If '-' is provided, the response will include
+     * OSPolicyAssignmentReports for all instances in the project/location.
+     * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-'
+     * is provided, the response will include OSPolicyAssignmentReports for all
+     * OSPolicyAssignments in the project/location.
+     * Either {instance} or {assignment} must be `-`.
+     * For example:
+     * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
+     *  returns all reports for the instance
+     * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
+     *  returns all the reports for the given assignment across all instances.
+     * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
+     *  returns all the reports for all assignments across all instances.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of results to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of results to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of results to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * If provided, this field specifies the criteria that must be met by the
+     * `OSPolicyAssignmentReport` API resource that is included in the response.
+     * 
+ * + * string filter = 3; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If provided, this field specifies the criteria that must be met by the
+     * `OSPolicyAssignmentReport` API resource that is included in the response.
+     * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If provided, this field specifies the criteria that must be met by the
+     * `OSPolicyAssignmentReport` API resource that is included in the response.
+     * 
+ * + * string filter = 3; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If provided, this field specifies the criteria that must be met by the
+     * `OSPolicyAssignmentReport` API resource that is included in the response.
+     * 
+ * + * string filter = 3; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * If provided, this field specifies the criteria that must be met by the
+     * `OSPolicyAssignmentReport` API resource that is included in the response.
+     * 
+ * + * string filter = 3; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A pagination token returned from a previous call to the
+     * `ListOSPolicyAssignmentReports` method that indicates where this listing
+     * should continue from.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A pagination token returned from a previous call to the
+     * `ListOSPolicyAssignmentReports` method that indicates where this listing
+     * should continue from.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A pagination token returned from a previous call to the
+     * `ListOSPolicyAssignmentReports` method that indicates where this listing
+     * should continue from.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A pagination token returned from a previous call to the
+     * `ListOSPolicyAssignmentReports` method that indicates where this listing
+     * should continue from.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A pagination token returned from a previous call to the
+     * `ListOSPolicyAssignmentReports` method that indicates where this listing
+     * should continue from.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest) + private static final com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOSPolicyAssignmentReportsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListOSPolicyAssignmentReportsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentReportsRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentReportsRequestOrBuilder.java new file mode 100644 index 00000000..4448d307 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentReportsRequestOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface ListOSPolicyAssignmentReportsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be
+   * provided. If '-' is provided, the response will include
+   * OSPolicyAssignmentReports for all instances in the project/location.
+   * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-'
+   * is provided, the response will include OSPolicyAssignmentReports for all
+   * OSPolicyAssignments in the project/location.
+   * Either {instance} or {assignment} must be `-`.
+   * For example:
+   * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
+   *  returns all reports for the instance
+   * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
+   *  returns all the reports for the given assignment across all instances.
+   * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
+   *  returns all the reports for all assignments across all instances.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource name.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be
+   * provided. If '-' is provided, the response will include
+   * OSPolicyAssignmentReports for all instances in the project/location.
+   * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-'
+   * is provided, the response will include OSPolicyAssignmentReports for all
+   * OSPolicyAssignments in the project/location.
+   * Either {instance} or {assignment} must be `-`.
+   * For example:
+   * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
+   *  returns all reports for the instance
+   * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
+   *  returns all the reports for the given assignment across all instances.
+   * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
+   *  returns all the reports for all assignments across all instances.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of results to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by the
+   * `OSPolicyAssignmentReport` API resource that is included in the response.
+   * 
+ * + * string filter = 3; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by the
+   * `OSPolicyAssignmentReport` API resource that is included in the response.
+   * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * A pagination token returned from a previous call to the
+   * `ListOSPolicyAssignmentReports` method that indicates where this listing
+   * should continue from.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A pagination token returned from a previous call to the
+   * `ListOSPolicyAssignmentReports` method that indicates where this listing
+   * should continue from.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentReportsResponse.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentReportsResponse.java new file mode 100644 index 00000000..ac4a551c --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentReportsResponse.java @@ -0,0 +1,1236 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A response message for listing OS Policy assignment reports including the
+ * page of results and page token.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse} + */ +public final class ListOSPolicyAssignmentReportsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse) + ListOSPolicyAssignmentReportsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListOSPolicyAssignmentReportsResponse.newBuilder() to construct. + private ListOSPolicyAssignmentReportsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListOSPolicyAssignmentReportsResponse() { + osPolicyAssignmentReports_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListOSPolicyAssignmentReportsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListOSPolicyAssignmentReportsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + osPolicyAssignmentReports_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport>(); + mutable_bitField0_ |= 0x00000001; + } + osPolicyAssignmentReports_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + osPolicyAssignmentReports_ = + java.util.Collections.unmodifiableList(osPolicyAssignmentReports_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse.class, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse.Builder.class); + } + + public static final int OS_POLICY_ASSIGNMENT_REPORTS_FIELD_NUMBER = 1; + private java.util.List + osPolicyAssignmentReports_; + /** + * + * + *
+   * List of OS policy assignment reports.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + @java.lang.Override + public java.util.List + getOsPolicyAssignmentReportsList() { + return osPolicyAssignmentReports_; + } + /** + * + * + *
+   * List of OS policy assignment reports.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportOrBuilder> + getOsPolicyAssignmentReportsOrBuilderList() { + return osPolicyAssignmentReports_; + } + /** + * + * + *
+   * List of OS policy assignment reports.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + @java.lang.Override + public int getOsPolicyAssignmentReportsCount() { + return osPolicyAssignmentReports_.size(); + } + /** + * + * + *
+   * List of OS policy assignment reports.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport getOsPolicyAssignmentReports( + int index) { + return osPolicyAssignmentReports_.get(index); + } + /** + * + * + *
+   * List of OS policy assignment reports.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportOrBuilder + getOsPolicyAssignmentReportsOrBuilder(int index) { + return osPolicyAssignmentReports_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The pagination token to retrieve the next page of OS policy assignment
+   * report objects.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The pagination token to retrieve the next page of OS policy assignment
+   * report objects.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < osPolicyAssignmentReports_.size(); i++) { + output.writeMessage(1, osPolicyAssignmentReports_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < osPolicyAssignmentReports_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, osPolicyAssignmentReports_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse other = + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse) obj; + + if (!getOsPolicyAssignmentReportsList().equals(other.getOsPolicyAssignmentReportsList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOsPolicyAssignmentReportsCount() > 0) { + hash = (37 * hash) + OS_POLICY_ASSIGNMENT_REPORTS_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyAssignmentReportsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A response message for listing OS Policy assignment reports including the
+   * page of results and page token.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse) + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse.class, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOsPolicyAssignmentReportsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (osPolicyAssignmentReportsBuilder_ == null) { + osPolicyAssignmentReports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + osPolicyAssignmentReportsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse build() { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse buildPartial() { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse result = + new com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse(this); + int from_bitField0_ = bitField0_; + if (osPolicyAssignmentReportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + osPolicyAssignmentReports_ = + java.util.Collections.unmodifiableList(osPolicyAssignmentReports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.osPolicyAssignmentReports_ = osPolicyAssignmentReports_; + } else { + result.osPolicyAssignmentReports_ = osPolicyAssignmentReportsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse other) { + if (other + == com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + .getDefaultInstance()) return this; + if (osPolicyAssignmentReportsBuilder_ == null) { + if (!other.osPolicyAssignmentReports_.isEmpty()) { + if (osPolicyAssignmentReports_.isEmpty()) { + osPolicyAssignmentReports_ = other.osPolicyAssignmentReports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOsPolicyAssignmentReportsIsMutable(); + osPolicyAssignmentReports_.addAll(other.osPolicyAssignmentReports_); + } + onChanged(); + } + } else { + if (!other.osPolicyAssignmentReports_.isEmpty()) { + if (osPolicyAssignmentReportsBuilder_.isEmpty()) { + osPolicyAssignmentReportsBuilder_.dispose(); + osPolicyAssignmentReportsBuilder_ = null; + osPolicyAssignmentReports_ = other.osPolicyAssignmentReports_; + bitField0_ = (bitField0_ & ~0x00000001); + osPolicyAssignmentReportsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOsPolicyAssignmentReportsFieldBuilder() + : null; + } else { + osPolicyAssignmentReportsBuilder_.addAllMessages(other.osPolicyAssignmentReports_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + osPolicyAssignmentReports_ = java.util.Collections.emptyList(); + + private void ensureOsPolicyAssignmentReportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + osPolicyAssignmentReports_ = + new java.util.ArrayList( + osPolicyAssignmentReports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportOrBuilder> + osPolicyAssignmentReportsBuilder_; + + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public java.util.List + getOsPolicyAssignmentReportsList() { + if (osPolicyAssignmentReportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(osPolicyAssignmentReports_); + } else { + return osPolicyAssignmentReportsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public int getOsPolicyAssignmentReportsCount() { + if (osPolicyAssignmentReportsBuilder_ == null) { + return osPolicyAssignmentReports_.size(); + } else { + return osPolicyAssignmentReportsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport getOsPolicyAssignmentReports( + int index) { + if (osPolicyAssignmentReportsBuilder_ == null) { + return osPolicyAssignmentReports_.get(index); + } else { + return osPolicyAssignmentReportsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public Builder setOsPolicyAssignmentReports( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport value) { + if (osPolicyAssignmentReportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyAssignmentReportsIsMutable(); + osPolicyAssignmentReports_.set(index, value); + onChanged(); + } else { + osPolicyAssignmentReportsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public Builder setOsPolicyAssignmentReports( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.Builder builderForValue) { + if (osPolicyAssignmentReportsBuilder_ == null) { + ensureOsPolicyAssignmentReportsIsMutable(); + osPolicyAssignmentReports_.set(index, builderForValue.build()); + onChanged(); + } else { + osPolicyAssignmentReportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public Builder addOsPolicyAssignmentReports( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport value) { + if (osPolicyAssignmentReportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyAssignmentReportsIsMutable(); + osPolicyAssignmentReports_.add(value); + onChanged(); + } else { + osPolicyAssignmentReportsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public Builder addOsPolicyAssignmentReports( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport value) { + if (osPolicyAssignmentReportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyAssignmentReportsIsMutable(); + osPolicyAssignmentReports_.add(index, value); + onChanged(); + } else { + osPolicyAssignmentReportsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public Builder addOsPolicyAssignmentReports( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.Builder builderForValue) { + if (osPolicyAssignmentReportsBuilder_ == null) { + ensureOsPolicyAssignmentReportsIsMutable(); + osPolicyAssignmentReports_.add(builderForValue.build()); + onChanged(); + } else { + osPolicyAssignmentReportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public Builder addOsPolicyAssignmentReports( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.Builder builderForValue) { + if (osPolicyAssignmentReportsBuilder_ == null) { + ensureOsPolicyAssignmentReportsIsMutable(); + osPolicyAssignmentReports_.add(index, builderForValue.build()); + onChanged(); + } else { + osPolicyAssignmentReportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public Builder addAllOsPolicyAssignmentReports( + java.lang.Iterable + values) { + if (osPolicyAssignmentReportsBuilder_ == null) { + ensureOsPolicyAssignmentReportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, osPolicyAssignmentReports_); + onChanged(); + } else { + osPolicyAssignmentReportsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public Builder clearOsPolicyAssignmentReports() { + if (osPolicyAssignmentReportsBuilder_ == null) { + osPolicyAssignmentReports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + osPolicyAssignmentReportsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public Builder removeOsPolicyAssignmentReports(int index) { + if (osPolicyAssignmentReportsBuilder_ == null) { + ensureOsPolicyAssignmentReportsIsMutable(); + osPolicyAssignmentReports_.remove(index); + onChanged(); + } else { + osPolicyAssignmentReportsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.Builder + getOsPolicyAssignmentReportsBuilder(int index) { + return getOsPolicyAssignmentReportsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportOrBuilder + getOsPolicyAssignmentReportsOrBuilder(int index) { + if (osPolicyAssignmentReportsBuilder_ == null) { + return osPolicyAssignmentReports_.get(index); + } else { + return osPolicyAssignmentReportsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportOrBuilder> + getOsPolicyAssignmentReportsOrBuilderList() { + if (osPolicyAssignmentReportsBuilder_ != null) { + return osPolicyAssignmentReportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(osPolicyAssignmentReports_); + } + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.Builder + addOsPolicyAssignmentReportsBuilder() { + return getOsPolicyAssignmentReportsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.getDefaultInstance()); + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.Builder + addOsPolicyAssignmentReportsBuilder(int index) { + return getOsPolicyAssignmentReportsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.getDefaultInstance()); + } + /** + * + * + *
+     * List of OS policy assignment reports.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + public java.util.List + getOsPolicyAssignmentReportsBuilderList() { + return getOsPolicyAssignmentReportsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportOrBuilder> + getOsPolicyAssignmentReportsFieldBuilder() { + if (osPolicyAssignmentReportsBuilder_ == null) { + osPolicyAssignmentReportsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportOrBuilder>( + osPolicyAssignmentReports_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + osPolicyAssignmentReports_ = null; + } + return osPolicyAssignmentReportsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignment
+     * report objects.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignment
+     * report objects.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignment
+     * report objects.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignment
+     * report objects.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignment
+     * report objects.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse) + private static final com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse(); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOSPolicyAssignmentReportsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListOSPolicyAssignmentReportsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentReportsResponseOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentReportsResponseOrBuilder.java new file mode 100644 index 00000000..e5555186 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentReportsResponseOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface ListOSPolicyAssignmentReportsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of OS policy assignment reports.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + java.util.List + getOsPolicyAssignmentReportsList(); + /** + * + * + *
+   * List of OS policy assignment reports.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport getOsPolicyAssignmentReports( + int index); + /** + * + * + *
+   * List of OS policy assignment reports.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + int getOsPolicyAssignmentReportsCount(); + /** + * + * + *
+   * List of OS policy assignment reports.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + java.util.List + getOsPolicyAssignmentReportsOrBuilderList(); + /** + * + * + *
+   * List of OS policy assignment reports.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportOrBuilder + getOsPolicyAssignmentReportsOrBuilder(int index); + + /** + * + * + *
+   * The pagination token to retrieve the next page of OS policy assignment
+   * report objects.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The pagination token to retrieve the next page of OS policy assignment
+   * report objects.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsRequest.java index 13cf8f47..2aa45c6f 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsRequest.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsRequest.java @@ -112,14 +112,14 @@ private ListOSPolicyAssignmentRevisionsRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.class, @@ -444,14 +444,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest) com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.class, @@ -488,7 +488,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_descriptor; } diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsResponse.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsResponse.java index 47432131..66fcf9a6 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsResponse.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsResponse.java @@ -117,14 +117,14 @@ private ListOSPolicyAssignmentRevisionsResponse( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.class, @@ -447,14 +447,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.class, @@ -495,7 +495,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_descriptor; } diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsRequest.java index ad831451..542d8277 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsRequest.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsRequest.java @@ -111,14 +111,14 @@ private ListOSPolicyAssignmentsRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.class, @@ -441,14 +441,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest) com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.class, @@ -483,7 +483,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_descriptor; } diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsResponse.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsResponse.java index cdf6ada8..3d162e59 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsResponse.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsResponse.java @@ -116,14 +116,14 @@ private ListOSPolicyAssignmentsResponse( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.class, @@ -442,14 +442,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.class, @@ -489,7 +489,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_descriptor; } diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequest.java index 17c24125..be02089c 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequest.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequest.java @@ -141,10 +141,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The parent resource name.
-   * Format: `projects/{project}/locations/{location}/instances/{instance}`
+   * Format: `projects/{project}/locations/{location}/instances/-`
    * For `{project}`, either `project-number` or `project-id` can be provided.
-   * For `{instance}`, only `-` character is supported to list vulnerability
-   * reports across VMs.
    * 
* * @@ -170,10 +168,8 @@ public java.lang.String getParent() { * *
    * Required. The parent resource name.
-   * Format: `projects/{project}/locations/{location}/instances/{instance}`
+   * Format: `projects/{project}/locations/{location}/instances/-`
    * For `{project}`, either `project-number` or `project-id` can be provided.
-   * For `{instance}`, only `-` character is supported to list vulnerability
-   * reports across VMs.
    * 
* * @@ -696,10 +692,8 @@ public Builder mergeFrom( * *
      * Required. The parent resource name.
-     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * Format: `projects/{project}/locations/{location}/instances/-`
      * For `{project}`, either `project-number` or `project-id` can be provided.
-     * For `{instance}`, only `-` character is supported to list vulnerability
-     * reports across VMs.
      * 
* * @@ -724,10 +718,8 @@ public java.lang.String getParent() { * *
      * Required. The parent resource name.
-     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * Format: `projects/{project}/locations/{location}/instances/-`
      * For `{project}`, either `project-number` or `project-id` can be provided.
-     * For `{instance}`, only `-` character is supported to list vulnerability
-     * reports across VMs.
      * 
* * @@ -752,10 +744,8 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The parent resource name.
-     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * Format: `projects/{project}/locations/{location}/instances/-`
      * For `{project}`, either `project-number` or `project-id` can be provided.
-     * For `{instance}`, only `-` character is supported to list vulnerability
-     * reports across VMs.
      * 
* * @@ -779,10 +769,8 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The parent resource name.
-     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * Format: `projects/{project}/locations/{location}/instances/-`
      * For `{project}`, either `project-number` or `project-id` can be provided.
-     * For `{instance}`, only `-` character is supported to list vulnerability
-     * reports across VMs.
      * 
* * @@ -802,10 +790,8 @@ public Builder clearParent() { * *
      * Required. The parent resource name.
-     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * Format: `projects/{project}/locations/{location}/instances/-`
      * For `{project}`, either `project-number` or `project-id` can be provided.
-     * For `{instance}`, only `-` character is supported to list vulnerability
-     * reports across VMs.
      * 
* * diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequestOrBuilder.java index b84d9c00..80ab8cd3 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequestOrBuilder.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequestOrBuilder.java @@ -28,10 +28,8 @@ public interface ListVulnerabilityReportsRequestOrBuilder * *
    * Required. The parent resource name.
-   * Format: `projects/{project}/locations/{location}/instances/{instance}`
+   * Format: `projects/{project}/locations/{location}/instances/-`
    * For `{project}`, either `project-number` or `project-id` can be provided.
-   * For `{instance}`, only `-` character is supported to list vulnerability
-   * reports across VMs.
    * 
* * @@ -46,10 +44,8 @@ public interface ListVulnerabilityReportsRequestOrBuilder * *
    * Required. The parent resource name.
-   * Format: `projects/{project}/locations/{location}/instances/{instance}`
+   * Format: `projects/{project}/locations/{location}/instances/-`
    * For `{project}`, either `project-number` or `project-id` can be provided.
-   * For `{instance}`, only `-` character is supported to list vulnerability
-   * reports across VMs.
    * 
* * diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicy.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicy.java index e0e5a57c..4fc425e7 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicy.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicy.java @@ -137,14 +137,14 @@ private OSPolicy( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.class, @@ -383,8 +383,7 @@ public interface OSFilterOrBuilder * * *
-   * The `OSFilter` is used to specify the OS filtering criteria for the
-   * resource group.
+   * Filtering criteria to select VMs based on OS details.
    * 
* * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} @@ -467,14 +466,14 @@ private OSFilter( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.class, @@ -763,8 +762,7 @@ protected Builder newBuilderForType( * * *
-     * The `OSFilter` is used to specify the OS filtering criteria for the
-     * resource group.
+     * Filtering criteria to select VMs based on OS details.
      * 
* * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} @@ -775,14 +773,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.OSFilter) com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.class, @@ -815,7 +813,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_descriptor; } @@ -1218,224 +1216,97 @@ public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter getDefaultInstanceFor } } - public interface ResourceOrBuilder + public interface InventoryFilterOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource) + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter) com.google.protobuf.MessageOrBuilder { /** * * *
-     * Required. The id of the resource with the following restrictions:
-     * * Must contain only lowercase letters, numbers, and hyphens.
-     * * Must start with a letter.
-     * * Must be between 1-63 characters.
-     * * Must end with a number or a letter.
-     * * Must be unique within the OS policy.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The id. - */ - java.lang.String getId(); - /** - * - * - *
-     * Required. The id of the resource with the following restrictions:
-     * * Must contain only lowercase letters, numbers, and hyphens.
-     * * Must start with a letter.
-     * * Must be between 1-63 characters.
-     * * Must end with a number or a letter.
-     * * Must be unique within the OS policy.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for id. - */ - com.google.protobuf.ByteString getIdBytes(); - - /** - * - * - *
-     * Package resource
-     * 
- * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; - * - * @return Whether the pkg field is set. - */ - boolean hasPkg(); - /** - * - * - *
-     * Package resource
-     * 
- * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; - * - * @return The pkg. - */ - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource getPkg(); - /** - * - * - *
-     * Package resource
-     * 
- * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; - */ - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResourceOrBuilder getPkgOrBuilder(); - - /** - * - * - *
-     * Package repository resource
-     * 
- * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; - * - * - * @return Whether the repository field is set. - */ - boolean hasRepository(); - /** - * - * - *
-     * Package repository resource
-     * 
- * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; - * - * - * @return The repository. - */ - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource getRepository(); - /** - * - * - *
-     * Package repository resource
-     * 
- * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; - * - */ - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResourceOrBuilder - getRepositoryOrBuilder(); - - /** - * - * - *
-     * Exec resource
+     * Required. The OS short name
      * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @return Whether the exec field is set. + * @return The osShortName. */ - boolean hasExec(); + java.lang.String getOsShortName(); /** * * *
-     * Exec resource
+     * Required. The OS short name
      * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; - * - * @return The exec. - */ - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource getExec(); - /** - * - * - *
-     * Exec resource
-     * 
+ * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + * @return The bytes for osShortName. */ - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResourceOrBuilder getExecOrBuilder(); + com.google.protobuf.ByteString getOsShortNameBytes(); /** * * *
-     * File resource
+     * The OS version
+     * Prefix matches are supported if asterisk(*) is provided as the
+     * last character. For example, to match all versions with a major
+     * version of `7`, specify the following value for this field `7.*`
+     * An empty string matches all OS versions.
      * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + * string os_version = 2; * - * @return Whether the file field is set. + * @return The osVersion. */ - boolean hasFile(); + java.lang.String getOsVersion(); /** * * *
-     * File resource
+     * The OS version
+     * Prefix matches are supported if asterisk(*) is provided as the
+     * last character. For example, to match all versions with a major
+     * version of `7`, specify the following value for this field `7.*`
+     * An empty string matches all OS versions.
      * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; - * - * @return The file. - */ - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource getFile(); - /** - * - * - *
-     * File resource
-     * 
+ * string os_version = 2; * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + * @return The bytes for osVersion. */ - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResourceOrBuilder getFileOrBuilder(); - - public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ResourceTypeCase - getResourceTypeCase(); + com.google.protobuf.ByteString getOsVersionBytes(); } /** * * *
-   * An OS policy resource is used to define the desired state configuration
-   * and provides a specific functionality like installing/removing packages,
-   * executing a script etc.
-   * The system ensures that resources are always in their desired state by
-   * taking necessary actions if they have drifted from their desired state.
+   * Filtering criteria to select VMs based on inventory details.
    * 
* - * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource} + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter} */ - public static final class Resource extends com.google.protobuf.GeneratedMessageV3 + public static final class InventoryFilter extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource) - ResourceOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter) + InventoryFilterOrBuilder { private static final long serialVersionUID = 0L; - // Use Resource.newBuilder() to construct. - private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use InventoryFilter.newBuilder() to construct. + private InventoryFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Resource() { - id_ = ""; + private InventoryFilter() { + osShortName_ = ""; + osVersion_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Resource(); + return new InventoryFilter(); } @java.lang.Override @@ -1443,7 +1314,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Resource( + private InventoryFilter( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1465,107 +1336,20 @@ private Resource( { java.lang.String s = input.readStringRequireUtf8(); - id_ = s; + osShortName_ = s; break; } case 18: { - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Builder - subBuilder = null; - if (resourceTypeCase_ == 2) { - subBuilder = - ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) - resourceType_) - .toBuilder(); - } - resourceType_ = - input.readMessage( - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) - resourceType_); - resourceType_ = subBuilder.buildPartial(); - } - resourceTypeCase_ = 2; - break; - } - case 26: - { - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.Builder - subBuilder = null; - if (resourceTypeCase_ == 3) { - subBuilder = - ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) - resourceType_) - .toBuilder(); - } - resourceType_ = - input.readMessage( - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) - resourceType_); - resourceType_ = subBuilder.buildPartial(); - } - resourceTypeCase_ = 3; + java.lang.String s = input.readStringRequireUtf8(); + + osVersion_ = s; break; } - case 34: + default: { - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Builder - subBuilder = null; - if (resourceTypeCase_ == 4) { - subBuilder = - ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) - resourceType_) - .toBuilder(); - } - resourceType_ = - input.readMessage( - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) - resourceType_); - resourceType_ = subBuilder.buildPartial(); - } - resourceTypeCase_ = 4; - break; - } - case 42: - { - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.Builder - subBuilder = null; - if (resourceTypeCase_ == 5) { - subBuilder = - ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) - resourceType_) - .toBuilder(); - } - resourceType_ = - input.readMessage( - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) - resourceType_); - resourceType_ = subBuilder.buildPartial(); - } - resourceTypeCase_ = 5; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; } break; } @@ -1582,195 +1366,1305 @@ private Resource( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto - .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor; + return com.google.cloud.osconfig.v1alpha.OsPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_InventoryFilter_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto - .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_fieldAccessorTable + return com.google.cloud.osconfig.v1alpha.OsPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_InventoryFilter_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.class, - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder.class); + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.Builder.class); } - public interface FileOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * A generic remote file.
-       * 
- * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; - * - * @return Whether the remote field is set. - */ - boolean hasRemote(); - /** - * - * - *
-       * A generic remote file.
-       * 
- * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; - * - * @return The remote. - */ - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote getRemote(); - /** - * - * - *
-       * A generic remote file.
-       * 
- * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; - */ - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.RemoteOrBuilder getRemoteOrBuilder(); - - /** - * - * - *
-       * A Cloud Storage object.
-       * 
- * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; - * - * @return Whether the gcs field is set. - */ - boolean hasGcs(); - /** - * - * - *
-       * A Cloud Storage object.
-       * 
- * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; - * - * @return The gcs. - */ - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs getGcs(); - /** - * - * - *
-       * A Cloud Storage object.
-       * 
- * - * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; - */ - com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.GcsOrBuilder getGcsOrBuilder(); - - /** - * - * - *
-       * A local path within the VM to use.
-       * 
- * - * string local_path = 3; - * - * @return Whether the localPath field is set. - */ - boolean hasLocalPath(); - /** - * - * - *
-       * A local path within the VM to use.
-       * 
- * - * string local_path = 3; - * - * @return The localPath. - */ - java.lang.String getLocalPath(); - /** - * - * - *
-       * A local path within the VM to use.
-       * 
- * - * string local_path = 3; - * - * @return The bytes for localPath. - */ - com.google.protobuf.ByteString getLocalPathBytes(); - - /** - * - * - *
-       * Defaults to false. When false, files are subject to validations
-       * based on the file type:
-       * Remote: A checksum must be specified.
-       * Cloud Storage: An object generation number must be specified.
-       * 
- * - * bool allow_insecure = 4; - * - * @return The allowInsecure. - */ - boolean getAllowInsecure(); - - public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.TypeCase getTypeCase(); - } + public static final int OS_SHORT_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object osShortName_; /** * * *
-     * A remote or local file.
+     * Required. The OS short name
      * 
* - * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The osShortName. */ - public static final class File extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) - FileOrBuilder { - private static final long serialVersionUID = 0L; - // Use File.newBuilder() to construct. - private File(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); + @java.lang.Override + public java.lang.String getOsShortName() { + java.lang.Object ref = osShortName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osShortName_ = s; + return s; } - - private File() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new File(); + } + /** + * + * + *
+     * Required. The OS short name
+     * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for osShortName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsShortNameBytes() { + java.lang.Object ref = osShortName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osShortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; + public static final int OS_VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object osVersion_; + /** + * + * + *
+     * The OS version
+     * Prefix matches are supported if asterisk(*) is provided as the
+     * last character. For example, to match all versions with a major
+     * version of `7`, specify the following value for this field `7.*`
+     * An empty string matches all OS versions.
+     * 
+ * + * string os_version = 2; + * + * @return The osVersion. + */ + @java.lang.Override + public java.lang.String getOsVersion() { + java.lang.Object ref = osVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osVersion_ = s; + return s; } - - private File( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { + } + /** + * + * + *
+     * The OS version
+     * Prefix matches are supported if asterisk(*) is provided as the
+     * last character. For example, to match all versions with a major
+     * version of `7`, specify the following value for this field `7.*`
+     * An empty string matches all OS versions.
+     * 
+ * + * string os_version = 2; + * + * @return The bytes for osVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsVersionBytes() { + java.lang.Object ref = osVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osShortName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, osShortName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, osVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osShortName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, osShortName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, osVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter) obj; + + if (!getOsShortName().equals(other.getOsShortName())) return false; + if (!getOsVersion().equals(other.getOsVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OS_SHORT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getOsShortName().hashCode(); + hash = (37 * hash) + OS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getOsVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Filtering criteria to select VMs based on inventory details.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter) + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OsPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_InventoryFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OsPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_InventoryFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + osShortName_ = ""; + + osVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OsPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_InventoryFilter_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter(this); + result.osShortName_ = osShortName_; + result.osVersion_ = osVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.getDefaultInstance()) + return this; + if (!other.getOsShortName().isEmpty()) { + osShortName_ = other.osShortName_; + onChanged(); + } + if (!other.getOsVersion().isEmpty()) { + osVersion_ = other.osVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object osShortName_ = ""; + /** + * + * + *
+       * Required. The OS short name
+       * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The osShortName. + */ + public java.lang.String getOsShortName() { + java.lang.Object ref = osShortName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osShortName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The OS short name
+       * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for osShortName. + */ + public com.google.protobuf.ByteString getOsShortNameBytes() { + java.lang.Object ref = osShortName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osShortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The OS short name
+       * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The osShortName to set. + * @return This builder for chaining. + */ + public Builder setOsShortName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osShortName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The OS short name
+       * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearOsShortName() { + + osShortName_ = getDefaultInstance().getOsShortName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The OS short name
+       * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for osShortName to set. + * @return This builder for chaining. + */ + public Builder setOsShortNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osShortName_ = value; + onChanged(); + return this; + } + + private java.lang.Object osVersion_ = ""; + /** + * + * + *
+       * The OS version
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * An empty string matches all OS versions.
+       * 
+ * + * string os_version = 2; + * + * @return The osVersion. + */ + public java.lang.String getOsVersion() { + java.lang.Object ref = osVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The OS version
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * An empty string matches all OS versions.
+       * 
+ * + * string os_version = 2; + * + * @return The bytes for osVersion. + */ + public com.google.protobuf.ByteString getOsVersionBytes() { + java.lang.Object ref = osVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The OS version
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * An empty string matches all OS versions.
+       * 
+ * + * string os_version = 2; + * + * @param value The osVersion to set. + * @return This builder for chaining. + */ + public Builder setOsVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The OS version
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * An empty string matches all OS versions.
+       * 
+ * + * string os_version = 2; + * + * @return This builder for chaining. + */ + public Builder clearOsVersion() { + + osVersion_ = getDefaultInstance().getOsVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * The OS version
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * An empty string matches all OS versions.
+       * 
+ * + * string os_version = 2; + * + * @param value The bytes for osVersion to set. + * @return This builder for chaining. + */ + public Builder setOsVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osVersion_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InventoryFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InventoryFilter(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The id of the resource with the following restrictions:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the OS policy.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * Required. The id of the resource with the following restrictions:
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the OS policy.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * Package resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + * + * @return Whether the pkg field is set. + */ + boolean hasPkg(); + /** + * + * + *
+     * Package resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + * + * @return The pkg. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource getPkg(); + /** + * + * + *
+     * Package resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResourceOrBuilder getPkgOrBuilder(); + + /** + * + * + *
+     * Package repository resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + * + * @return Whether the repository field is set. + */ + boolean hasRepository(); + /** + * + * + *
+     * Package repository resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + * + * @return The repository. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource getRepository(); + /** + * + * + *
+     * Package repository resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResourceOrBuilder + getRepositoryOrBuilder(); + + /** + * + * + *
+     * Exec resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + * + * @return Whether the exec field is set. + */ + boolean hasExec(); + /** + * + * + *
+     * Exec resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + * + * @return The exec. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource getExec(); + /** + * + * + *
+     * Exec resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResourceOrBuilder getExecOrBuilder(); + + /** + * + * + *
+     * File resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + * + * @return Whether the file field is set. + */ + boolean hasFile(); + /** + * + * + *
+     * File resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + * + * @return The file. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource getFile(); + /** + * + * + *
+     * File resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResourceOrBuilder getFileOrBuilder(); + + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ResourceTypeCase + getResourceTypeCase(); + } + /** + * + * + *
+   * An OS policy resource is used to define the desired state configuration
+   * and provides a specific functionality like installing/removing packages,
+   * executing a script etc.
+   * The system ensures that resources are always in their desired state by
+   * taking necessary actions if they have drifted from their desired state.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource} + */ + public static final class Resource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource) + ResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Resource.newBuilder() to construct. + private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Resource() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Resource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Resource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 18: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Builder + subBuilder = null; + if (resourceTypeCase_ == 2) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + resourceType_) + .toBuilder(); + } + resourceType_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + resourceType_); + resourceType_ = subBuilder.buildPartial(); + } + resourceTypeCase_ = 2; + break; + } + case 26: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.Builder + subBuilder = null; + if (resourceTypeCase_ == 3) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + resourceType_) + .toBuilder(); + } + resourceType_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + resourceType_); + resourceType_ = subBuilder.buildPartial(); + } + resourceTypeCase_ = 3; + break; + } + case 34: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Builder + subBuilder = null; + if (resourceTypeCase_ == 4) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) + resourceType_) + .toBuilder(); + } + resourceType_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) + resourceType_); + resourceType_ = subBuilder.buildPartial(); + } + resourceTypeCase_ = 4; + break; + } + case 42: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.Builder + subBuilder = null; + if (resourceTypeCase_ == 5) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) + resourceType_) + .toBuilder(); + } + resourceType_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) + resourceType_); + resourceType_ = subBuilder.buildPartial(); + } + resourceTypeCase_ = 5; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OsPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OsPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder.class); + } + + public interface FileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * A generic remote file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + * + * @return Whether the remote field is set. + */ + boolean hasRemote(); + /** + * + * + *
+       * A generic remote file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + * + * @return The remote. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote getRemote(); + /** + * + * + *
+       * A generic remote file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.RemoteOrBuilder getRemoteOrBuilder(); + + /** + * + * + *
+       * A Cloud Storage object.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + * + * @return Whether the gcs field is set. + */ + boolean hasGcs(); + /** + * + * + *
+       * A Cloud Storage object.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + * + * @return The gcs. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs getGcs(); + /** + * + * + *
+       * A Cloud Storage object.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.GcsOrBuilder getGcsOrBuilder(); + + /** + * + * + *
+       * A local path within the VM to use.
+       * 
+ * + * string local_path = 3; + * + * @return Whether the localPath field is set. + */ + boolean hasLocalPath(); + /** + * + * + *
+       * A local path within the VM to use.
+       * 
+ * + * string local_path = 3; + * + * @return The localPath. + */ + java.lang.String getLocalPath(); + /** + * + * + *
+       * A local path within the VM to use.
+       * 
+ * + * string local_path = 3; + * + * @return The bytes for localPath. + */ + com.google.protobuf.ByteString getLocalPathBytes(); + + /** + * + * + *
+       * Defaults to false. When false, files are subject to validations
+       * based on the file type:
+       * Remote: A checksum must be specified.
+       * Cloud Storage: An object generation number must be specified.
+       * 
+ * + * bool allow_insecure = 4; + * + * @return The allowInsecure. + */ + boolean getAllowInsecure(); + + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.TypeCase getTypeCase(); + } + /** + * + * + *
+     * A remote or local file.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} + */ + public static final class File extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) + FileOrBuilder { + private static final long serialVersionUID = 0L; + // Use File.newBuilder() to construct. + private File(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private File() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new File(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private File( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { int tag = input.readTag(); switch (tag) { case 0: @@ -1851,14 +2745,14 @@ private File( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.class, @@ -2010,14 +2904,14 @@ private Remote( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.class, @@ -2313,14 +3207,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.RemoteOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.class, @@ -2354,7 +3248,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_descriptor; } @@ -2907,14 +3801,14 @@ private Gcs( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.class, @@ -3235,14 +4129,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.GcsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.class, @@ -3278,7 +4172,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_descriptor; } @@ -4196,14 +5090,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.class, @@ -4236,7 +5130,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_descriptor; } @@ -5634,14 +6528,14 @@ private PackageResource( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.class, @@ -5969,14 +6863,14 @@ private Deb( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.class, @@ -6262,14 +7156,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DebOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.class, @@ -6308,7 +7202,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_descriptor; } @@ -6871,14 +7765,14 @@ private APT( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.class, @@ -7126,14 +8020,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APTOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.class, @@ -7167,7 +8061,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_descriptor; } @@ -7605,14 +8499,14 @@ private RPM( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.class, @@ -7899,14 +8793,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPMOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.class, @@ -7946,7 +8840,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_descriptor; } @@ -8509,14 +9403,14 @@ private YUM( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.class, @@ -8764,14 +9658,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUMOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.class, @@ -8805,7 +9699,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_descriptor; } @@ -9200,14 +10094,14 @@ private Zypper( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.class, @@ -9456,14 +10350,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.ZypperOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper @@ -9497,7 +10391,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_descriptor; } @@ -9896,14 +10790,14 @@ private GooGet( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.class, @@ -10152,14 +11046,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGetOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet @@ -10193,7 +11087,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_descriptor; } @@ -10693,14 +11587,14 @@ private MSI( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.class, @@ -11046,14 +11940,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSIOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.class, @@ -11093,7 +11987,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_descriptor; } @@ -12532,14 +13426,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResourceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.class, @@ -12574,7 +13468,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor; } @@ -14974,14 +15868,14 @@ private RepositoryResource( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.class, @@ -15279,14 +16173,14 @@ private AptRepository( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource @@ -15981,14 +16875,14 @@ public static final class Builder com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource .AptRepositoryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource @@ -16030,7 +16924,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_descriptor; } @@ -17115,14 +18009,14 @@ private YumRepository( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource @@ -17589,14 +18483,14 @@ public static final class Builder com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource .YumRepositoryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource @@ -17636,7 +18530,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_descriptor; } @@ -18606,14 +19500,14 @@ private ZypperRepository( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource @@ -19080,14 +19974,14 @@ public static final class Builder com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource .ZypperRepositoryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource @@ -19127,7 +20021,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_descriptor; } @@ -19994,14 +20888,14 @@ private GooRepository( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource @@ -20327,14 +21221,14 @@ public static final class Builder com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource .GooRepositoryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource @@ -20370,7 +21264,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_descriptor; } @@ -21364,14 +22258,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResourceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.class, @@ -21404,7 +22298,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor; } @@ -22927,14 +23821,14 @@ private ExecResource( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.class, @@ -23271,14 +24165,14 @@ private Exec( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.class, @@ -23301,7 +24195,7 @@ public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { * * *
-           * Defaults to NONE.
+           * Invalid value, the request will return validation error.
            * 
* * INTERPRETER_UNSPECIFIED = 0; @@ -23311,11 +24205,11 @@ public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { * * *
-           * If no interpreter is specified the
-           * source will be executed directly, which will likely only
-           * succeed for executables and scripts with shebang lines.
-           * [Wikipedia
-           * shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)).
+           * If an interpreter is not specified, the
+           * source is executed directly. This execution, without an
+           * interpreter, only succeeds for executables and scripts that have <a
+           * href="https://en.wikipedia.org/wiki/Shebang_(Unix)"
+           * class="external">shebang lines</a>.
            * 
* * NONE = 1; @@ -23325,8 +24219,8 @@ public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { * * *
-           * Indicates that the script will be run with /bin/sh on Linux and
-           * cmd.exe on windows.
+           * Indicates that the script runs with `/bin/sh` on Linux and
+           * `cmd.exe` on Windows.
            * 
* * SHELL = 2; @@ -23336,7 +24230,7 @@ public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { * * *
-           * Indicates that the script will be run with powershell.
+           * Indicates that the script runs with PowerShell.
            * 
* * POWERSHELL = 3; @@ -23349,7 +24243,7 @@ public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { * * *
-           * Defaults to NONE.
+           * Invalid value, the request will return validation error.
            * 
* * INTERPRETER_UNSPECIFIED = 0; @@ -23359,11 +24253,11 @@ public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { * * *
-           * If no interpreter is specified the
-           * source will be executed directly, which will likely only
-           * succeed for executables and scripts with shebang lines.
-           * [Wikipedia
-           * shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)).
+           * If an interpreter is not specified, the
+           * source is executed directly. This execution, without an
+           * interpreter, only succeeds for executables and scripts that have <a
+           * href="https://en.wikipedia.org/wiki/Shebang_(Unix)"
+           * class="external">shebang lines</a>.
            * 
* * NONE = 1; @@ -23373,8 +24267,8 @@ public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { * * *
-           * Indicates that the script will be run with /bin/sh on Linux and
-           * cmd.exe on windows.
+           * Indicates that the script runs with `/bin/sh` on Linux and
+           * `cmd.exe` on Windows.
            * 
* * SHELL = 2; @@ -23384,7 +24278,7 @@ public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { * * *
-           * Indicates that the script will be run with powershell.
+           * Indicates that the script runs with PowerShell.
            * 
* * POWERSHELL = 3; @@ -24077,14 +24971,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.class, @@ -24123,7 +25017,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_descriptor; } @@ -25466,14 +26360,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResourceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.class, @@ -25515,7 +26409,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_descriptor; } @@ -26464,14 +27358,14 @@ private FileResource( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.class, @@ -27241,14 +28135,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResourceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.class, @@ -27286,7 +28180,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_descriptor; } @@ -28824,14 +29718,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource) com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.class, @@ -28864,7 +29758,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor; } @@ -30138,37 +31032,150 @@ public interface ResourceGroupOrBuilder * * *
+     * Deprecated. Use the `inventory_filters` field instead.
      * Used to specify the OS filter for a resource group
      * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * * * @return Whether the osFilter field is set. */ + @java.lang.Deprecated boolean hasOsFilter(); /** * * *
+     * Deprecated. Use the `inventory_filters` field instead.
      * Used to specify the OS filter for a resource group
      * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * * * @return The osFilter. */ + @java.lang.Deprecated com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter getOsFilter(); /** * * *
+     * Deprecated. Use the `inventory_filters` field instead.
      * Used to specify the OS filter for a resource group
      * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * */ + @java.lang.Deprecated com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder getOsFilterOrBuilder(); + /** + * + * + *
+     * List of inventory filters for the resource group.
+     * The resources in this resource group are applied to the target VM if it
+     * satisfies at least one of the following inventory filters.
+     * For example, to apply this resource group to VMs running either `RHEL` or
+     * `CentOS` operating systems, specify 2 items for the list with following
+     * values:
+     * inventory_filters[0].os_short_name='rhel' and
+     * inventory_filters[1].os_short_name='centos'
+     * If the list is empty, this resource group will be applied to the target
+     * VM unconditionally.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + java.util.List + getInventoryFiltersList(); + /** + * + * + *
+     * List of inventory filters for the resource group.
+     * The resources in this resource group are applied to the target VM if it
+     * satisfies at least one of the following inventory filters.
+     * For example, to apply this resource group to VMs running either `RHEL` or
+     * `CentOS` operating systems, specify 2 items for the list with following
+     * values:
+     * inventory_filters[0].os_short_name='rhel' and
+     * inventory_filters[1].os_short_name='centos'
+     * If the list is empty, this resource group will be applied to the target
+     * VM unconditionally.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter getInventoryFilters(int index); + /** + * + * + *
+     * List of inventory filters for the resource group.
+     * The resources in this resource group are applied to the target VM if it
+     * satisfies at least one of the following inventory filters.
+     * For example, to apply this resource group to VMs running either `RHEL` or
+     * `CentOS` operating systems, specify 2 items for the list with following
+     * values:
+     * inventory_filters[0].os_short_name='rhel' and
+     * inventory_filters[1].os_short_name='centos'
+     * If the list is empty, this resource group will be applied to the target
+     * VM unconditionally.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + int getInventoryFiltersCount(); + /** + * + * + *
+     * List of inventory filters for the resource group.
+     * The resources in this resource group are applied to the target VM if it
+     * satisfies at least one of the following inventory filters.
+     * For example, to apply this resource group to VMs running either `RHEL` or
+     * `CentOS` operating systems, specify 2 items for the list with following
+     * values:
+     * inventory_filters[0].os_short_name='rhel' and
+     * inventory_filters[1].os_short_name='centos'
+     * If the list is empty, this resource group will be applied to the target
+     * VM unconditionally.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + java.util.List + getInventoryFiltersOrBuilderList(); + /** + * + * + *
+     * List of inventory filters for the resource group.
+     * The resources in this resource group are applied to the target VM if it
+     * satisfies at least one of the following inventory filters.
+     * For example, to apply this resource group to VMs running either `RHEL` or
+     * `CentOS` operating systems, specify 2 items for the list with following
+     * values:
+     * inventory_filters[0].os_short_name='rhel' and
+     * inventory_filters[1].os_short_name='centos'
+     * If the list is empty, this resource group will be applied to the target
+     * VM unconditionally.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilterOrBuilder + getInventoryFiltersOrBuilder(int index); + /** * * @@ -30261,6 +31268,7 @@ private ResourceGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) } private ResourceGroup() { + inventoryFilters_ = java.util.Collections.emptyList(); resources_ = java.util.Collections.emptyList(); } @@ -30313,11 +31321,11 @@ private ResourceGroup( } case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { resources_ = new java.util.ArrayList< com.google.cloud.osconfig.v1alpha.OSPolicy.Resource>(); - mutable_bitField0_ |= 0x00000001; + mutable_bitField0_ |= 0x00000002; } resources_.add( input.readMessage( @@ -30325,6 +31333,20 @@ private ResourceGroup( extensionRegistry)); break; } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + inventoryFilters_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter>(); + mutable_bitField0_ |= 0x00000001; + } + inventoryFilters_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.parser(), + extensionRegistry)); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -30339,23 +31361,26 @@ private ResourceGroup( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { resources_ = java.util.Collections.unmodifiableList(resources_); } + if (((mutable_bitField0_ & 0x00000001) != 0)) { + inventoryFilters_ = java.util.Collections.unmodifiableList(inventoryFilters_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.class, @@ -30368,14 +31393,17 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
+     * Deprecated. Use the `inventory_filters` field instead.
      * Used to specify the OS filter for a resource group
      * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * * * @return Whether the osFilter field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasOsFilter() { return osFilter_ != null; } @@ -30383,31 +31411,161 @@ public boolean hasOsFilter() { * * *
+     * Deprecated. Use the `inventory_filters` field instead.
+     * Used to specify the OS filter for a resource group
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * + * + * @return The osFilter. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter getOsFilter() { + return osFilter_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.getDefaultInstance() + : osFilter_; + } + /** + * + * + *
+     * Deprecated. Use the `inventory_filters` field instead.
      * Used to specify the OS filter for a resource group
      * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; - * - * @return The osFilter. + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder getOsFilterOrBuilder() { + return getOsFilter(); + } + + public static final int INVENTORY_FILTERS_FIELD_NUMBER = 3; + private java.util.List + inventoryFilters_; + /** + * + * + *
+     * List of inventory filters for the resource group.
+     * The resources in this resource group are applied to the target VM if it
+     * satisfies at least one of the following inventory filters.
+     * For example, to apply this resource group to VMs running either `RHEL` or
+     * `CentOS` operating systems, specify 2 items for the list with following
+     * values:
+     * inventory_filters[0].os_short_name='rhel' and
+     * inventory_filters[1].os_short_name='centos'
+     * If the list is empty, this resource group will be applied to the target
+     * VM unconditionally.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + @java.lang.Override + public java.util.List + getInventoryFiltersList() { + return inventoryFilters_; + } + /** + * + * + *
+     * List of inventory filters for the resource group.
+     * The resources in this resource group are applied to the target VM if it
+     * satisfies at least one of the following inventory filters.
+     * For example, to apply this resource group to VMs running either `RHEL` or
+     * `CentOS` operating systems, specify 2 items for the list with following
+     * values:
+     * inventory_filters[0].os_short_name='rhel' and
+     * inventory_filters[1].os_short_name='centos'
+     * If the list is empty, this resource group will be applied to the target
+     * VM unconditionally.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilterOrBuilder> + getInventoryFiltersOrBuilderList() { + return inventoryFilters_; + } + /** + * + * + *
+     * List of inventory filters for the resource group.
+     * The resources in this resource group are applied to the target VM if it
+     * satisfies at least one of the following inventory filters.
+     * For example, to apply this resource group to VMs running either `RHEL` or
+     * `CentOS` operating systems, specify 2 items for the list with following
+     * values:
+     * inventory_filters[0].os_short_name='rhel' and
+     * inventory_filters[1].os_short_name='centos'
+     * If the list is empty, this resource group will be applied to the target
+     * VM unconditionally.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + @java.lang.Override + public int getInventoryFiltersCount() { + return inventoryFilters_.size(); + } + /** + * + * + *
+     * List of inventory filters for the resource group.
+     * The resources in this resource group are applied to the target VM if it
+     * satisfies at least one of the following inventory filters.
+     * For example, to apply this resource group to VMs running either `RHEL` or
+     * `CentOS` operating systems, specify 2 items for the list with following
+     * values:
+     * inventory_filters[0].os_short_name='rhel' and
+     * inventory_filters[1].os_short_name='centos'
+     * If the list is empty, this resource group will be applied to the target
+     * VM unconditionally.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * */ @java.lang.Override - public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter getOsFilter() { - return osFilter_ == null - ? com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.getDefaultInstance() - : osFilter_; + public com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter getInventoryFilters( + int index) { + return inventoryFilters_.get(index); } /** * * *
-     * Used to specify the OS filter for a resource group
+     * List of inventory filters for the resource group.
+     * The resources in this resource group are applied to the target VM if it
+     * satisfies at least one of the following inventory filters.
+     * For example, to apply this resource group to VMs running either `RHEL` or
+     * `CentOS` operating systems, specify 2 items for the list with following
+     * values:
+     * inventory_filters[0].os_short_name='rhel' and
+     * inventory_filters[1].os_short_name='centos'
+     * If the list is empty, this resource group will be applied to the target
+     * VM unconditionally.
      * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * */ @java.lang.Override - public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder getOsFilterOrBuilder() { - return getOsFilter(); + public com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilterOrBuilder + getInventoryFiltersOrBuilder(int index) { + return inventoryFilters_.get(index); } public static final int RESOURCES_FIELD_NUMBER = 2; @@ -30515,6 +31673,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < resources_.size(); i++) { output.writeMessage(2, resources_.get(i)); } + for (int i = 0; i < inventoryFilters_.size(); i++) { + output.writeMessage(3, inventoryFilters_.get(i)); + } unknownFields.writeTo(output); } @@ -30530,6 +31691,10 @@ public int getSerializedSize() { for (int i = 0; i < resources_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, resources_.get(i)); } + for (int i = 0; i < inventoryFilters_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, inventoryFilters_.get(i)); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -30550,6 +31715,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOsFilter()) { if (!getOsFilter().equals(other.getOsFilter())) return false; } + if (!getInventoryFiltersList().equals(other.getInventoryFiltersList())) return false; if (!getResourcesList().equals(other.getResourcesList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -30566,6 +31732,10 @@ public int hashCode() { hash = (37 * hash) + OS_FILTER_FIELD_NUMBER; hash = (53 * hash) + getOsFilter().hashCode(); } + if (getInventoryFiltersCount() > 0) { + hash = (37 * hash) + INVENTORY_FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getInventoryFiltersList().hashCode(); + } if (getResourcesCount() > 0) { hash = (37 * hash) + RESOURCES_FIELD_NUMBER; hash = (53 * hash) + getResourcesList().hashCode(); @@ -30692,402 +31862,1040 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroupOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.class, com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.Builder.class); } - // Construct using com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInventoryFiltersFieldBuilder(); + getResourcesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (osFilterBuilder_ == null) { + osFilter_ = null; + } else { + osFilter_ = null; + osFilterBuilder_ = null; + } + if (inventoryFiltersBuilder_ == null) { + inventoryFilters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + inventoryFiltersBuilder_.clear(); + } + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + resourcesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OsPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup(this); + int from_bitField0_ = bitField0_; + if (osFilterBuilder_ == null) { + result.osFilter_ = osFilter_; + } else { + result.osFilter_ = osFilterBuilder_.build(); + } + if (inventoryFiltersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + inventoryFilters_ = java.util.Collections.unmodifiableList(inventoryFilters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.inventoryFilters_ = inventoryFilters_; + } else { + result.inventoryFilters_ = inventoryFiltersBuilder_.build(); + } + if (resourcesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + resources_ = java.util.Collections.unmodifiableList(resources_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup other) { + if (other == com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.getDefaultInstance()) + return this; + if (other.hasOsFilter()) { + mergeOsFilter(other.getOsFilter()); + } + if (inventoryFiltersBuilder_ == null) { + if (!other.inventoryFilters_.isEmpty()) { + if (inventoryFilters_.isEmpty()) { + inventoryFilters_ = other.inventoryFilters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInventoryFiltersIsMutable(); + inventoryFilters_.addAll(other.inventoryFilters_); + } + onChanged(); + } + } else { + if (!other.inventoryFilters_.isEmpty()) { + if (inventoryFiltersBuilder_.isEmpty()) { + inventoryFiltersBuilder_.dispose(); + inventoryFiltersBuilder_ = null; + inventoryFilters_ = other.inventoryFilters_; + bitField0_ = (bitField0_ & ~0x00000001); + inventoryFiltersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInventoryFiltersFieldBuilder() + : null; + } else { + inventoryFiltersBuilder_.addAllMessages(other.inventoryFilters_); + } + } + } + if (resourcesBuilder_ == null) { + if (!other.resources_.isEmpty()) { + if (resources_.isEmpty()) { + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureResourcesIsMutable(); + resources_.addAll(other.resources_); + } + onChanged(); + } + } else { + if (!other.resources_.isEmpty()) { + if (resourcesBuilder_.isEmpty()) { + resourcesBuilder_.dispose(); + resourcesBuilder_ = null; + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000002); + resourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourcesFieldBuilder() + : null; + } else { + resourcesBuilder_.addAllMessages(other.resources_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter osFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder> + osFilterBuilder_; + /** + * + * + *
+       * Deprecated. Use the `inventory_filters` field instead.
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * + * + * @return Whether the osFilter field is set. + */ + @java.lang.Deprecated + public boolean hasOsFilter() { + return osFilterBuilder_ != null || osFilter_ != null; + } + /** + * + * + *
+       * Deprecated. Use the `inventory_filters` field instead.
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * + * + * @return The osFilter. + */ + @java.lang.Deprecated + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter getOsFilter() { + if (osFilterBuilder_ == null) { + return osFilter_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.getDefaultInstance() + : osFilter_; + } else { + return osFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Deprecated. Use the `inventory_filters` field instead.
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setOsFilter(com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter value) { + if (osFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + osFilter_ = value; + onChanged(); + } else { + osFilterBuilder_.setMessage(value); + } + + return this; } + /** + * + * + *
+       * Deprecated. Use the `inventory_filters` field instead.
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setOsFilter( + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder builderForValue) { + if (osFilterBuilder_ == null) { + osFilter_ = builderForValue.build(); + onChanged(); + } else { + osFilterBuilder_.setMessage(builderForValue.build()); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + return this; } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResourcesFieldBuilder(); + /** + * + * + *
+       * Deprecated. Use the `inventory_filters` field instead.
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder mergeOsFilter(com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter value) { + if (osFilterBuilder_ == null) { + if (osFilter_ != null) { + osFilter_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.newBuilder(osFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + osFilter_ = value; + } + onChanged(); + } else { + osFilterBuilder_.mergeFrom(value); } - } - @java.lang.Override - public Builder clear() { - super.clear(); + return this; + } + /** + * + * + *
+       * Deprecated. Use the `inventory_filters` field instead.
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearOsFilter() { if (osFilterBuilder_ == null) { osFilter_ = null; + onChanged(); } else { osFilter_ = null; osFilterBuilder_ = null; } - if (resourcesBuilder_ == null) { - resources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resourcesBuilder_.clear(); - } - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto - .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_descriptor; + return this; } + /** + * + * + *
+       * Deprecated. Use the `inventory_filters` field instead.
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder getOsFilterBuilder() { - @java.lang.Override - public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup getDefaultInstanceForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.getDefaultInstance(); + onChanged(); + return getOsFilterFieldBuilder().getBuilder(); } - - @java.lang.Override - public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup build() { - com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
+       * Deprecated. Use the `inventory_filters` field instead.
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder getOsFilterOrBuilder() { + if (osFilterBuilder_ != null) { + return osFilterBuilder_.getMessageOrBuilder(); + } else { + return osFilter_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.getDefaultInstance() + : osFilter_; } - return result; } - - @java.lang.Override - public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup buildPartial() { - com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup result = - new com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup(this); - int from_bitField0_ = bitField0_; + /** + * + * + *
+       * Deprecated. Use the `inventory_filters` field instead.
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1 [deprecated = true]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder> + getOsFilterFieldBuilder() { if (osFilterBuilder_ == null) { - result.osFilter_ = osFilter_; - } else { - result.osFilter_ = osFilterBuilder_.build(); - } - if (resourcesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - resources_ = java.util.Collections.unmodifiableList(resources_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.resources_ = resources_; - } else { - result.resources_ = resourcesBuilder_.build(); + osFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder>( + getOsFilter(), getParentForChildren(), isClean()); + osFilter_ = null; } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); + return osFilterBuilder_; } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + private java.util.List + inventoryFilters_ = java.util.Collections.emptyList(); - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + private void ensureInventoryFiltersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + inventoryFilters_ = + new java.util.ArrayList( + inventoryFilters_); + bitField0_ |= 0x00000001; + } } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter, + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilterOrBuilder> + inventoryFiltersBuilder_; - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + /** + * + * + *
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + public java.util.List + getInventoryFiltersList() { + if (inventoryFiltersBuilder_ == null) { + return java.util.Collections.unmodifiableList(inventoryFilters_); + } else { + return inventoryFiltersBuilder_.getMessageList(); + } } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + public int getInventoryFiltersCount() { + if (inventoryFiltersBuilder_ == null) { + return inventoryFilters_.size(); + } else { + return inventoryFiltersBuilder_.getCount(); + } } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) { - return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) other); + /** + * + * + *
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter getInventoryFilters( + int index) { + if (inventoryFiltersBuilder_ == null) { + return inventoryFilters_.get(index); } else { - super.mergeFrom(other); - return this; + return inventoryFiltersBuilder_.getMessage(index); } } - - public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup other) { - if (other == com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.getDefaultInstance()) - return this; - if (other.hasOsFilter()) { - mergeOsFilter(other.getOsFilter()); - } - if (resourcesBuilder_ == null) { - if (!other.resources_.isEmpty()) { - if (resources_.isEmpty()) { - resources_ = other.resources_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResourcesIsMutable(); - resources_.addAll(other.resources_); - } - onChanged(); + /** + * + * + *
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + public Builder setInventoryFilters( + int index, com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter value) { + if (inventoryFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureInventoryFiltersIsMutable(); + inventoryFilters_.set(index, value); + onChanged(); } else { - if (!other.resources_.isEmpty()) { - if (resourcesBuilder_.isEmpty()) { - resourcesBuilder_.dispose(); - resourcesBuilder_ = null; - resources_ = other.resources_; - bitField0_ = (bitField0_ & ~0x00000001); - resourcesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getResourcesFieldBuilder() - : null; - } else { - resourcesBuilder_.addAllMessages(other.resources_); - } - } + inventoryFiltersBuilder_.setMessage(index, value); } - this.mergeUnknownFields(other.unknownFields); - onChanged(); return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + public Builder setInventoryFilters( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.Builder builderForValue) { + if (inventoryFiltersBuilder_ == null) { + ensureInventoryFiltersIsMutable(); + inventoryFilters_.set(index, builderForValue.build()); + onChanged(); + } else { + inventoryFiltersBuilder_.setMessage(index, builderForValue.build()); + } + return this; } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + /** + * + * + *
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + public Builder addInventoryFilters( + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter value) { + if (inventoryFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureInventoryFiltersIsMutable(); + inventoryFilters_.add(value); + onChanged(); + } else { + inventoryFiltersBuilder_.addMessage(value); } return this; } - - private int bitField0_; - - private com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter osFilter_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter, - com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder, - com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder> - osFilterBuilder_; /** * * *
-       * Used to specify the OS filter for a resource group
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
        * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; - * - * @return Whether the osFilter field is set. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * */ - public boolean hasOsFilter() { - return osFilterBuilder_ != null || osFilter_ != null; + public Builder addInventoryFilters( + int index, com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter value) { + if (inventoryFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInventoryFiltersIsMutable(); + inventoryFilters_.add(index, value); + onChanged(); + } else { + inventoryFiltersBuilder_.addMessage(index, value); + } + return this; } /** * * *
-       * Used to specify the OS filter for a resource group
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
        * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; - * - * @return The osFilter. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * */ - public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter getOsFilter() { - if (osFilterBuilder_ == null) { - return osFilter_ == null - ? com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.getDefaultInstance() - : osFilter_; + public Builder addInventoryFilters( + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.Builder builderForValue) { + if (inventoryFiltersBuilder_ == null) { + ensureInventoryFiltersIsMutable(); + inventoryFilters_.add(builderForValue.build()); + onChanged(); } else { - return osFilterBuilder_.getMessage(); + inventoryFiltersBuilder_.addMessage(builderForValue.build()); } + return this; } /** * * *
-       * Used to specify the OS filter for a resource group
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
        * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * */ - public Builder setOsFilter(com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter value) { - if (osFilterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - osFilter_ = value; + public Builder addInventoryFilters( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.Builder builderForValue) { + if (inventoryFiltersBuilder_ == null) { + ensureInventoryFiltersIsMutable(); + inventoryFilters_.add(index, builderForValue.build()); onChanged(); } else { - osFilterBuilder_.setMessage(value); + inventoryFiltersBuilder_.addMessage(index, builderForValue.build()); } - return this; } /** * * *
-       * Used to specify the OS filter for a resource group
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
        * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * */ - public Builder setOsFilter( - com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder builderForValue) { - if (osFilterBuilder_ == null) { - osFilter_ = builderForValue.build(); + public Builder addAllInventoryFilters( + java.lang.Iterable + values) { + if (inventoryFiltersBuilder_ == null) { + ensureInventoryFiltersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inventoryFilters_); onChanged(); } else { - osFilterBuilder_.setMessage(builderForValue.build()); + inventoryFiltersBuilder_.addAllMessages(values); } - return this; } /** * * *
-       * Used to specify the OS filter for a resource group
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
        * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * */ - public Builder mergeOsFilter(com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter value) { - if (osFilterBuilder_ == null) { - if (osFilter_ != null) { - osFilter_ = - com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.newBuilder(osFilter_) - .mergeFrom(value) - .buildPartial(); - } else { - osFilter_ = value; - } + public Builder clearInventoryFilters() { + if (inventoryFiltersBuilder_ == null) { + inventoryFilters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - osFilterBuilder_.mergeFrom(value); + inventoryFiltersBuilder_.clear(); } - return this; } /** * * *
-       * Used to specify the OS filter for a resource group
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
        * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * */ - public Builder clearOsFilter() { - if (osFilterBuilder_ == null) { - osFilter_ = null; + public Builder removeInventoryFilters(int index) { + if (inventoryFiltersBuilder_ == null) { + ensureInventoryFiltersIsMutable(); + inventoryFilters_.remove(index); onChanged(); } else { - osFilter_ = null; - osFilterBuilder_ = null; + inventoryFiltersBuilder_.remove(index); } - return this; } /** * * *
-       * Used to specify the OS filter for a resource group
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
        * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * */ - public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder getOsFilterBuilder() { - - onChanged(); - return getOsFilterFieldBuilder().getBuilder(); + public com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.Builder + getInventoryFiltersBuilder(int index) { + return getInventoryFiltersFieldBuilder().getBuilder(index); } /** * * *
-       * Used to specify the OS filter for a resource group
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
        * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * */ - public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder getOsFilterOrBuilder() { - if (osFilterBuilder_ != null) { - return osFilterBuilder_.getMessageOrBuilder(); + public com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilterOrBuilder + getInventoryFiltersOrBuilder(int index) { + if (inventoryFiltersBuilder_ == null) { + return inventoryFilters_.get(index); } else { - return osFilter_ == null - ? com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.getDefaultInstance() - : osFilter_; + return inventoryFiltersBuilder_.getMessageOrBuilder(index); } } /** * * *
-       * Used to specify the OS filter for a resource group
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
        * 
* - * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter, - com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder, - com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder> - getOsFilterFieldBuilder() { - if (osFilterBuilder_ == null) { - osFilterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter, - com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder, - com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder>( - getOsFilter(), getParentForChildren(), isClean()); - osFilter_ = null; + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilterOrBuilder> + getInventoryFiltersOrBuilderList() { + if (inventoryFiltersBuilder_ != null) { + return inventoryFiltersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inventoryFilters_); } - return osFilterBuilder_; + } + /** + * + * + *
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.Builder + addInventoryFiltersBuilder() { + return getInventoryFiltersFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.getDefaultInstance()); + } + /** + * + * + *
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.Builder + addInventoryFiltersBuilder(int index) { + return getInventoryFiltersFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.getDefaultInstance()); + } + /** + * + * + *
+       * List of inventory filters for the resource group.
+       * The resources in this resource group are applied to the target VM if it
+       * satisfies at least one of the following inventory filters.
+       * For example, to apply this resource group to VMs running either `RHEL` or
+       * `CentOS` operating systems, specify 2 items for the list with following
+       * values:
+       * inventory_filters[0].os_short_name='rhel' and
+       * inventory_filters[1].os_short_name='centos'
+       * If the list is empty, this resource group will be applied to the target
+       * VM unconditionally.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter inventory_filters = 3; + * + */ + public java.util.List + getInventoryFiltersBuilderList() { + return getInventoryFiltersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter, + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilterOrBuilder> + getInventoryFiltersFieldBuilder() { + if (inventoryFiltersBuilder_ == null) { + inventoryFiltersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter, + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilter.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.InventoryFilterOrBuilder>( + inventoryFilters_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + inventoryFilters_ = null; + } + return inventoryFiltersBuilder_; } private java.util.List resources_ = java.util.Collections.emptyList(); private void ensureResourcesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { resources_ = new java.util.ArrayList( resources_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; } } @@ -31340,7 +33148,7 @@ public Builder addAllResources( public Builder clearResources() { if (resourcesBuilder_ == null) { resources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { resourcesBuilder_.clear(); @@ -31487,7 +33295,7 @@ public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder addResourcesB com.google.cloud.osconfig.v1alpha.OSPolicy.Resource, com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder, com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceOrBuilder>( - resources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + resources_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); resources_ = null; } return resourcesBuilder_; @@ -32038,14 +33846,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy) com.google.cloud.osconfig.v1alpha.OSPolicyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicy.class, @@ -32090,7 +33898,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyProto + return com.google.cloud.osconfig.v1alpha.OsPolicyProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor; } diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignment.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignment.java index 0b0c3e2b..3ce4dbc2 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignment.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignment.java @@ -50,6 +50,7 @@ private OSPolicyAssignment() { description_ = ""; osPolicies_ = java.util.Collections.emptyList(); revisionId_ = ""; + etag_ = ""; rolloutState_ = 0; uid_ = ""; } @@ -165,6 +166,13 @@ private OSPolicyAssignment( revisionCreateTime_ = subBuilder.buildPartial(); } + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; break; } case 72: @@ -219,14 +227,14 @@ private OSPolicyAssignment( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.class, @@ -599,7 +607,7 @@ private LabelSet( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_descriptor; } @@ -617,7 +625,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.class, @@ -629,7 +637,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { private static final class LabelsDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_LabelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", @@ -923,7 +931,7 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet) com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_descriptor; } @@ -950,7 +958,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.class, @@ -980,7 +988,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_descriptor; } @@ -1343,55 +1351,63 @@ public interface InstanceFilterOrBuilder * * *
-     * A VM is included if it's OS short name matches with any of the
+     * Deprecated. Use the `inventories` field instead.
+     * A VM is selected if it's OS short name matches with any of the
      * values provided in this list.
      * 
* - * repeated string os_short_names = 2; + * repeated string os_short_names = 2 [deprecated = true]; * * @return A list containing the osShortNames. */ + @java.lang.Deprecated java.util.List getOsShortNamesList(); /** * * *
-     * A VM is included if it's OS short name matches with any of the
+     * Deprecated. Use the `inventories` field instead.
+     * A VM is selected if it's OS short name matches with any of the
      * values provided in this list.
      * 
* - * repeated string os_short_names = 2; + * repeated string os_short_names = 2 [deprecated = true]; * * @return The count of osShortNames. */ + @java.lang.Deprecated int getOsShortNamesCount(); /** * * *
-     * A VM is included if it's OS short name matches with any of the
+     * Deprecated. Use the `inventories` field instead.
+     * A VM is selected if it's OS short name matches with any of the
      * values provided in this list.
      * 
* - * repeated string os_short_names = 2; + * repeated string os_short_names = 2 [deprecated = true]; * * @param index The index of the element to return. * @return The osShortNames at the given index. */ + @java.lang.Deprecated java.lang.String getOsShortNames(int index); /** * * *
-     * A VM is included if it's OS short name matches with any of the
+     * Deprecated. Use the `inventories` field instead.
+     * A VM is selected if it's OS short name matches with any of the
      * values provided in this list.
      * 
* - * repeated string os_short_names = 2; + * repeated string os_short_names = 2 [deprecated = true]; * * @param index The index of the value to return. * @return The bytes of the osShortNames at the given index. */ + @java.lang.Deprecated com.google.protobuf.ByteString getOsShortNamesBytes(int index); /** @@ -1475,9 +1491,6 @@ public interface InstanceFilterOrBuilder * List of label sets used for VM exclusion. * If the list has more than one label set, the VM is excluded if any * of the label sets are applicable for the VM. - * This filter is applied last in the filtering chain and therefore a - * VM is guaranteed to be excluded if it satisfies one of the below - * label sets. * * * @@ -1493,9 +1506,6 @@ public interface InstanceFilterOrBuilder * List of label sets used for VM exclusion. * If the list has more than one label set, the VM is excluded if any * of the label sets are applicable for the VM. - * This filter is applied last in the filtering chain and therefore a - * VM is guaranteed to be excluded if it satisfies one of the below - * label sets. * * * @@ -1510,9 +1520,6 @@ public interface InstanceFilterOrBuilder * List of label sets used for VM exclusion. * If the list has more than one label set, the VM is excluded if any * of the label sets are applicable for the VM. - * This filter is applied last in the filtering chain and therefore a - * VM is guaranteed to be excluded if it satisfies one of the below - * label sets. * * * @@ -1527,9 +1534,6 @@ public interface InstanceFilterOrBuilder * List of label sets used for VM exclusion. * If the list has more than one label set, the VM is excluded if any * of the label sets are applicable for the VM. - * This filter is applied last in the filtering chain and therefore a - * VM is guaranteed to be excluded if it satisfies one of the below - * label sets. * * * @@ -1545,9 +1549,6 @@ public interface InstanceFilterOrBuilder * List of label sets used for VM exclusion. * If the list has more than one label set, the VM is excluded if any * of the label sets are applicable for the VM. - * This filter is applied last in the filtering chain and therefore a - * VM is guaranteed to be excluded if it satisfies one of the below - * label sets. * * * @@ -1556,12 +1557,92 @@ public interface InstanceFilterOrBuilder */ com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder getExclusionLabelsOrBuilder(int index); + + /** + * + * + *
+     * List of inventories to select VMs.
+     * A VM is selected if its inventory data matches at least one of the
+     * following inventories.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; + * + */ + java.util.List + getInventoriesList(); + /** + * + * + *
+     * List of inventories to select VMs.
+     * A VM is selected if its inventory data matches at least one of the
+     * following inventories.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory getInventories( + int index); + /** + * + * + *
+     * List of inventories to select VMs.
+     * A VM is selected if its inventory data matches at least one of the
+     * following inventories.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; + * + */ + int getInventoriesCount(); + /** + * + * + *
+     * List of inventories to select VMs.
+     * A VM is selected if its inventory data matches at least one of the
+     * following inventories.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .InventoryOrBuilder> + getInventoriesOrBuilderList(); + /** + * + * + *
+     * List of inventories to select VMs.
+     * A VM is selected if its inventory data matches at least one of the
+     * following inventories.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.InventoryOrBuilder + getInventoriesOrBuilder(int index); } /** * * *
-   * Message to represent the filters to select VMs for an assignment
+   * Filters to select target VMs for an assignment.
+   * If more than one filter criteria is specified below, a VM will be selected
+   * if and only if it satisfies all of them.
    * 
* * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} @@ -1580,6 +1661,7 @@ private InstanceFilter() { osShortNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; inclusionLabels_ = java.util.Collections.emptyList(); exclusionLabels_ = java.util.Collections.emptyList(); + inventories_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -1655,6 +1737,22 @@ private InstanceFilter( extensionRegistry)); break; } + case 42: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + inventories_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .Inventory>(); + mutable_bitField0_ |= 0x00000008; + } + inventories_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .Inventory.parser(), + extensionRegistry)); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -1678,1031 +1776,2572 @@ private InstanceFilter( if (((mutable_bitField0_ & 0x00000004) != 0)) { exclusionLabels_ = java.util.Collections.unmodifiableList(exclusionLabels_); } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + inventories_ = java.util.Collections.unmodifiableList(inventories_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.class, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Builder.class); } - public static final int ALL_FIELD_NUMBER = 1; - private boolean all_; - /** - * - * - *
-     * Target all VMs in the project. If true, no other criteria is
-     * permitted.
-     * 
- * - * bool all = 1; - * - * @return The all. - */ - @java.lang.Override - public boolean getAll() { - return all_; - } + public interface InventoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory) + com.google.protobuf.MessageOrBuilder { - public static final int OS_SHORT_NAMES_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList osShortNames_; - /** - * - * - *
-     * A VM is included if it's OS short name matches with any of the
-     * values provided in this list.
-     * 
- * - * repeated string os_short_names = 2; - * - * @return A list containing the osShortNames. - */ - public com.google.protobuf.ProtocolStringList getOsShortNamesList() { - return osShortNames_; - } - /** - * - * - *
-     * A VM is included if it's OS short name matches with any of the
-     * values provided in this list.
-     * 
- * - * repeated string os_short_names = 2; - * - * @return The count of osShortNames. - */ - public int getOsShortNamesCount() { - return osShortNames_.size(); - } - /** - * - * - *
-     * A VM is included if it's OS short name matches with any of the
-     * values provided in this list.
-     * 
- * - * repeated string os_short_names = 2; - * - * @param index The index of the element to return. - * @return The osShortNames at the given index. - */ - public java.lang.String getOsShortNames(int index) { - return osShortNames_.get(index); - } - /** - * - * - *
-     * A VM is included if it's OS short name matches with any of the
-     * values provided in this list.
-     * 
- * - * repeated string os_short_names = 2; - * - * @param index The index of the value to return. - * @return The bytes of the osShortNames at the given index. - */ - public com.google.protobuf.ByteString getOsShortNamesBytes(int index) { - return osShortNames_.getByteString(index); - } + /** + * + * + *
+       * Required. The OS short name
+       * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The osShortName. + */ + java.lang.String getOsShortName(); + /** + * + * + *
+       * Required. The OS short name
+       * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for osShortName. + */ + com.google.protobuf.ByteString getOsShortNameBytes(); - public static final int INCLUSION_LABELS_FIELD_NUMBER = 3; - private java.util.List - inclusionLabels_; - /** - * - * - *
-     * List of label sets used for VM inclusion.
-     * If the list has more than one `LabelSet`, the VM is included if any
-     * of the label sets are applicable for the VM.
-     * 
- * - * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; - * - */ - @java.lang.Override - public java.util.List - getInclusionLabelsList() { - return inclusionLabels_; - } - /** - * - * - *
-     * List of label sets used for VM inclusion.
-     * If the list has more than one `LabelSet`, the VM is included if any
-     * of the label sets are applicable for the VM.
-     * 
- * - * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> - getInclusionLabelsOrBuilderList() { - return inclusionLabels_; - } - /** - * - * - *
-     * List of label sets used for VM inclusion.
-     * If the list has more than one `LabelSet`, the VM is included if any
-     * of the label sets are applicable for the VM.
-     * 
- * - * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; - * - */ - @java.lang.Override - public int getInclusionLabelsCount() { - return inclusionLabels_.size(); - } - /** - * - * - *
-     * List of label sets used for VM inclusion.
-     * If the list has more than one `LabelSet`, the VM is included if any
-     * of the label sets are applicable for the VM.
-     * 
- * - * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; - * - */ - @java.lang.Override - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getInclusionLabels( - int index) { - return inclusionLabels_.get(index); + /** + * + * + *
+       * The OS version
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * An empty string matches all OS versions.
+       * 
+ * + * string os_version = 2; + * + * @return The osVersion. + */ + java.lang.String getOsVersion(); + /** + * + * + *
+       * The OS version
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * An empty string matches all OS versions.
+       * 
+ * + * string os_version = 2; + * + * @return The bytes for osVersion. + */ + com.google.protobuf.ByteString getOsVersionBytes(); } /** * * *
-     * List of label sets used for VM inclusion.
-     * If the list has more than one `LabelSet`, the VM is included if any
-     * of the label sets are applicable for the VM.
+     * VM inventory details.
      * 
* - * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; - * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory} */ - @java.lang.Override - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder - getInclusionLabelsOrBuilder(int index) { - return inclusionLabels_.get(index); - } + public static final class Inventory extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory) + InventoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Inventory.newBuilder() to construct. + private Inventory(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - public static final int EXCLUSION_LABELS_FIELD_NUMBER = 4; - private java.util.List - exclusionLabels_; - /** - * - * - *
-     * List of label sets used for VM exclusion.
-     * If the list has more than one label set, the VM is excluded if any
-     * of the label sets are applicable for the VM.
-     * This filter is applied last in the filtering chain and therefore a
-     * VM is guaranteed to be excluded if it satisfies one of the below
-     * label sets.
-     * 
- * - * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; - * - */ - @java.lang.Override - public java.util.List - getExclusionLabelsList() { - return exclusionLabels_; - } - /** - * - * - *
-     * List of label sets used for VM exclusion.
-     * If the list has more than one label set, the VM is excluded if any
-     * of the label sets are applicable for the VM.
-     * This filter is applied last in the filtering chain and therefore a
-     * VM is guaranteed to be excluded if it satisfies one of the below
-     * label sets.
-     * 
- * - * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> - getExclusionLabelsOrBuilderList() { - return exclusionLabels_; - } - /** - * - * - *
-     * List of label sets used for VM exclusion.
-     * If the list has more than one label set, the VM is excluded if any
-     * of the label sets are applicable for the VM.
-     * This filter is applied last in the filtering chain and therefore a
-     * VM is guaranteed to be excluded if it satisfies one of the below
-     * label sets.
-     * 
- * - * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; - * - */ - @java.lang.Override - public int getExclusionLabelsCount() { - return exclusionLabels_.size(); - } - /** - * - * - *
-     * List of label sets used for VM exclusion.
-     * If the list has more than one label set, the VM is excluded if any
-     * of the label sets are applicable for the VM.
-     * This filter is applied last in the filtering chain and therefore a
-     * VM is guaranteed to be excluded if it satisfies one of the below
-     * label sets.
-     * 
- * - * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; - * - */ - @java.lang.Override - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getExclusionLabels( - int index) { - return exclusionLabels_.get(index); - } - /** - * - * - *
-     * List of label sets used for VM exclusion.
-     * If the list has more than one label set, the VM is excluded if any
-     * of the label sets are applicable for the VM.
-     * This filter is applied last in the filtering chain and therefore a
-     * VM is guaranteed to be excluded if it satisfies one of the below
-     * label sets.
-     * 
- * - * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; - * - */ - @java.lang.Override - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder - getExclusionLabelsOrBuilder(int index) { - return exclusionLabels_.get(index); - } + private Inventory() { + osShortName_ = ""; + osVersion_ = ""; + } - private byte memoizedIsInitialized = -1; + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Inventory(); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - memoizedIsInitialized = 1; - return true; - } + private Inventory( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (all_ != false) { - output.writeBool(1, all_); - } - for (int i = 0; i < osShortNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, osShortNames_.getRaw(i)); - } - for (int i = 0; i < inclusionLabels_.size(); i++) { - output.writeMessage(3, inclusionLabels_.get(i)); + osShortName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + osVersion_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } } - for (int i = 0; i < exclusionLabels_.size(); i++) { - output.writeMessage(4, exclusionLabels_.get(i)); + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_Inventory_descriptor; } - unknownFields.writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_Inventory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + .Builder.class); + } - size = 0; - if (all_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, all_); + public static final int OS_SHORT_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object osShortName_; + /** + * + * + *
+       * Required. The OS short name
+       * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The osShortName. + */ + @java.lang.Override + public java.lang.String getOsShortName() { + java.lang.Object ref = osShortName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osShortName_ = s; + return s; + } } - { - int dataSize = 0; - for (int i = 0; i < osShortNames_.size(); i++) { - dataSize += computeStringSizeNoTag(osShortNames_.getRaw(i)); + /** + * + * + *
+       * Required. The OS short name
+       * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for osShortName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsShortNameBytes() { + java.lang.Object ref = osShortName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osShortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - size += dataSize; - size += 1 * getOsShortNamesList().size(); } - for (int i = 0; i < inclusionLabels_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(3, inclusionLabels_.get(i)); + + public static final int OS_VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object osVersion_; + /** + * + * + *
+       * The OS version
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * An empty string matches all OS versions.
+       * 
+ * + * string os_version = 2; + * + * @return The osVersion. + */ + @java.lang.Override + public java.lang.String getOsVersion() { + java.lang.Object ref = osVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osVersion_ = s; + return s; + } } - for (int i = 0; i < exclusionLabels_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(4, exclusionLabels_.get(i)); + /** + * + * + *
+       * The OS version
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * An empty string matches all OS versions.
+       * 
+ * + * string os_version = 2; + * + * @return The bytes for osVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsVersionBytes() { + java.lang.Object ref = osVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; return true; } - if (!(obj instanceof com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter)) { - return super.equals(obj); + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osShortName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, osShortName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, osVersion_); + } + unknownFields.writeTo(output); } - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter other = - (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) obj; - if (getAll() != other.getAll()) return false; - if (!getOsShortNamesList().equals(other.getOsShortNamesList())) return false; - if (!getInclusionLabelsList().equals(other.getInclusionLabelsList())) return false; - if (!getExclusionLabelsList().equals(other.getExclusionLabelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osShortName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, osShortName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, osVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ALL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAll()); - if (getOsShortNamesCount() > 0) { - hash = (37 * hash) + OS_SHORT_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getOsShortNamesList().hashCode(); + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory other = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory) obj; + + if (!getOsShortName().equals(other.getOsShortName())) return false; + if (!getOsVersion().equals(other.getOsVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } - if (getInclusionLabelsCount() > 0) { - hash = (37 * hash) + INCLUSION_LABELS_FIELD_NUMBER; - hash = (53 * hash) + getInclusionLabelsList().hashCode(); - } - if (getExclusionLabelsCount() > 0) { - hash = (37 * hash) + EXCLUSION_LABELS_FIELD_NUMBER; - hash = (53 * hash) + getExclusionLabelsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OS_SHORT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getOsShortName().hashCode(); + hash = (37 * hash) + OS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getOsVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - public static Builder newBuilder( - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Message to represent the filters to select VMs for an assignment
-     * 
- * - * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments - .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor; + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments - .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.class, - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Builder.class); + public Builder newBuilderForType() { + return newBuilder(); } - // Construct using - // com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInclusionLabelsFieldBuilder(); - getExclusionLabelsFieldBuilder(); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - public Builder clear() { - super.clear(); - all_ = false; + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * VM inventory details.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory) + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.InventoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_Inventory_descriptor; + } - osShortNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - if (inclusionLabelsBuilder_ == null) { - inclusionLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - inclusionLabelsBuilder_.clear(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_Inventory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + .class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + .Builder.class); } - if (exclusionLabelsBuilder_ == null) { - exclusionLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - exclusionLabelsBuilder_.clear(); + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments - .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - getDefaultInstanceForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - .getDefaultInstance(); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } - @java.lang.Override - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter build() { - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + @java.lang.Override + public Builder clear() { + super.clear(); + osShortName_ = ""; + + osVersion_ = ""; + + return this; } - return result; - } - @java.lang.Override - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter buildPartial() { - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter result = - new com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(this); - int from_bitField0_ = bitField0_; - result.all_ = all_; - if (((bitField0_ & 0x00000001) != 0)) { - osShortNames_ = osShortNames_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_Inventory_descriptor; } - result.osShortNames_ = osShortNames_; - if (inclusionLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - inclusionLabels_ = java.util.Collections.unmodifiableList(inclusionLabels_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.inclusionLabels_ = inclusionLabels_; - } else { - result.inclusionLabels_ = inclusionLabelsBuilder_.build(); + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + .getDefaultInstance(); } - if (exclusionLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - exclusionLabels_ = java.util.Collections.unmodifiableList(exclusionLabels_); - bitField0_ = (bitField0_ & ~0x00000004); + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + build() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - result.exclusionLabels_ = exclusionLabels_; - } else { - result.exclusionLabels_ = exclusionLabelsBuilder_.build(); + return result; } - onBuilt(); - return result; - } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory result = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory( + this); + result.osShortName_ = osShortName_; + result.osVersion_ = osVersion_; + onBuilt(); + return result; + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) { - return mergeFrom( - (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) other); - } else { - super.mergeFrom(other); + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + .getDefaultInstance()) return this; + if (!other.getOsShortName().isEmpty()) { + osShortName_ = other.osShortName_; + onChanged(); + } + if (!other.getOsVersion().isEmpty()) { + osVersion_ = other.osVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } - } - public Builder mergeFrom( - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter other) { - if (other - == com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter - .getDefaultInstance()) return this; - if (other.getAll() != false) { - setAll(other.getAll()); + @java.lang.Override + public final boolean isInitialized() { + return true; } - if (!other.osShortNames_.isEmpty()) { - if (osShortNames_.isEmpty()) { - osShortNames_ = other.osShortNames_; - bitField0_ = (bitField0_ & ~0x00000001); + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object osShortName_ = ""; + /** + * + * + *
+         * Required. The OS short name
+         * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The osShortName. + */ + public java.lang.String getOsShortName() { + java.lang.Object ref = osShortName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osShortName_ = s; + return s; } else { - ensureOsShortNamesIsMutable(); - osShortNames_.addAll(other.osShortNames_); + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. The OS short name
+         * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for osShortName. + */ + public com.google.protobuf.ByteString getOsShortNameBytes() { + java.lang.Object ref = osShortName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osShortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. The OS short name
+         * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The osShortName to set. + * @return This builder for chaining. + */ + public Builder setOsShortName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + + osShortName_ = value; onChanged(); + return this; } - if (inclusionLabelsBuilder_ == null) { - if (!other.inclusionLabels_.isEmpty()) { - if (inclusionLabels_.isEmpty()) { - inclusionLabels_ = other.inclusionLabels_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureInclusionLabelsIsMutable(); - inclusionLabels_.addAll(other.inclusionLabels_); - } - onChanged(); + /** + * + * + *
+         * Required. The OS short name
+         * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearOsShortName() { + + osShortName_ = getDefaultInstance().getOsShortName(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The OS short name
+         * 
+ * + * string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for osShortName to set. + * @return This builder for chaining. + */ + public Builder setOsShortNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osShortName_ = value; + onChanged(); + return this; + } + + private java.lang.Object osVersion_ = ""; + /** + * + * + *
+         * The OS version
+         * Prefix matches are supported if asterisk(*) is provided as the
+         * last character. For example, to match all versions with a major
+         * version of `7`, specify the following value for this field `7.*`
+         * An empty string matches all OS versions.
+         * 
+ * + * string os_version = 2; + * + * @return The osVersion. + */ + public java.lang.String getOsVersion() { + java.lang.Object ref = osVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The OS version
+         * Prefix matches are supported if asterisk(*) is provided as the
+         * last character. For example, to match all versions with a major
+         * version of `7`, specify the following value for this field `7.*`
+         * An empty string matches all OS versions.
+         * 
+ * + * string os_version = 2; + * + * @return The bytes for osVersion. + */ + public com.google.protobuf.ByteString getOsVersionBytes() { + java.lang.Object ref = osVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The OS version
+         * Prefix matches are supported if asterisk(*) is provided as the
+         * last character. For example, to match all versions with a major
+         * version of `7`, specify the following value for this field `7.*`
+         * An empty string matches all OS versions.
+         * 
+ * + * string os_version = 2; + * + * @param value The osVersion to set. + * @return This builder for chaining. + */ + public Builder setOsVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The OS version
+         * Prefix matches are supported if asterisk(*) is provided as the
+         * last character. For example, to match all versions with a major
+         * version of `7`, specify the following value for this field `7.*`
+         * An empty string matches all OS versions.
+         * 
+ * + * string os_version = 2; + * + * @return This builder for chaining. + */ + public Builder clearOsVersion() { + + osVersion_ = getDefaultInstance().getOsVersion(); + onChanged(); + return this; + } + /** + * + * + *
+         * The OS version
+         * Prefix matches are supported if asterisk(*) is provided as the
+         * last character. For example, to match all versions with a major
+         * version of `7`, specify the following value for this field `7.*`
+         * An empty string matches all OS versions.
+         * 
+ * + * string os_version = 2; + * + * @param value The bytes for osVersion to set. + * @return This builder for chaining. + */ + public Builder setOsVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + + osVersion_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .Inventory + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Inventory parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Inventory(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ALL_FIELD_NUMBER = 1; + private boolean all_; + /** + * + * + *
+     * Target all VMs in the project. If true, no other criteria is
+     * permitted.
+     * 
+ * + * bool all = 1; + * + * @return The all. + */ + @java.lang.Override + public boolean getAll() { + return all_; + } + + public static final int OS_SHORT_NAMES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList osShortNames_; + /** + * + * + *
+     * Deprecated. Use the `inventories` field instead.
+     * A VM is selected if it's OS short name matches with any of the
+     * values provided in this list.
+     * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @return A list containing the osShortNames. + */ + @java.lang.Deprecated + public com.google.protobuf.ProtocolStringList getOsShortNamesList() { + return osShortNames_; + } + /** + * + * + *
+     * Deprecated. Use the `inventories` field instead.
+     * A VM is selected if it's OS short name matches with any of the
+     * values provided in this list.
+     * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @return The count of osShortNames. + */ + @java.lang.Deprecated + public int getOsShortNamesCount() { + return osShortNames_.size(); + } + /** + * + * + *
+     * Deprecated. Use the `inventories` field instead.
+     * A VM is selected if it's OS short name matches with any of the
+     * values provided in this list.
+     * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @param index The index of the element to return. + * @return The osShortNames at the given index. + */ + @java.lang.Deprecated + public java.lang.String getOsShortNames(int index) { + return osShortNames_.get(index); + } + /** + * + * + *
+     * Deprecated. Use the `inventories` field instead.
+     * A VM is selected if it's OS short name matches with any of the
+     * values provided in this list.
+     * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @param index The index of the value to return. + * @return The bytes of the osShortNames at the given index. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getOsShortNamesBytes(int index) { + return osShortNames_.getByteString(index); + } + + public static final int INCLUSION_LABELS_FIELD_NUMBER = 3; + private java.util.List + inclusionLabels_; + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + @java.lang.Override + public java.util.List + getInclusionLabelsList() { + return inclusionLabels_; + } + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + getInclusionLabelsOrBuilderList() { + return inclusionLabels_; + } + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + @java.lang.Override + public int getInclusionLabelsCount() { + return inclusionLabels_.size(); + } + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getInclusionLabels( + int index) { + return inclusionLabels_.get(index); + } + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder + getInclusionLabelsOrBuilder(int index) { + return inclusionLabels_.get(index); + } + + public static final int EXCLUSION_LABELS_FIELD_NUMBER = 4; + private java.util.List + exclusionLabels_; + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + @java.lang.Override + public java.util.List + getExclusionLabelsList() { + return exclusionLabels_; + } + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + getExclusionLabelsOrBuilderList() { + return exclusionLabels_; + } + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + @java.lang.Override + public int getExclusionLabelsCount() { + return exclusionLabels_.size(); + } + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getExclusionLabels( + int index) { + return exclusionLabels_.get(index); + } + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder + getExclusionLabelsOrBuilder(int index) { + return exclusionLabels_.get(index); + } + + public static final int INVENTORIES_FIELD_NUMBER = 5; + private java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory> + inventories_; + /** + * + * + *
+     * List of inventories to select VMs.
+     * A VM is selected if its inventory data matches at least one of the
+     * following inventories.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory> + getInventoriesList() { + return inventories_; + } + /** + * + * + *
+     * List of inventories to select VMs.
+     * A VM is selected if its inventory data matches at least one of the
+     * following inventories.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .InventoryOrBuilder> + getInventoriesOrBuilderList() { + return inventories_; + } + /** + * + * + *
+     * List of inventories to select VMs.
+     * A VM is selected if its inventory data matches at least one of the
+     * following inventories.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; + * + */ + @java.lang.Override + public int getInventoriesCount() { + return inventories_.size(); + } + /** + * + * + *
+     * List of inventories to select VMs.
+     * A VM is selected if its inventory data matches at least one of the
+     * following inventories.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + getInventories(int index) { + return inventories_.get(index); + } + /** + * + * + *
+     * List of inventories to select VMs.
+     * A VM is selected if its inventory data matches at least one of the
+     * following inventories.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.InventoryOrBuilder + getInventoriesOrBuilder(int index) { + return inventories_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (all_ != false) { + output.writeBool(1, all_); + } + for (int i = 0; i < osShortNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, osShortNames_.getRaw(i)); + } + for (int i = 0; i < inclusionLabels_.size(); i++) { + output.writeMessage(3, inclusionLabels_.get(i)); + } + for (int i = 0; i < exclusionLabels_.size(); i++) { + output.writeMessage(4, exclusionLabels_.get(i)); + } + for (int i = 0; i < inventories_.size(); i++) { + output.writeMessage(5, inventories_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (all_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, all_); + } + { + int dataSize = 0; + for (int i = 0; i < osShortNames_.size(); i++) { + dataSize += computeStringSizeNoTag(osShortNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getOsShortNamesList().size(); + } + for (int i = 0; i < inclusionLabels_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, inclusionLabels_.get(i)); + } + for (int i = 0; i < exclusionLabels_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, exclusionLabels_.get(i)); + } + for (int i = 0; i < inventories_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, inventories_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter other = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) obj; + + if (getAll() != other.getAll()) return false; + if (!getOsShortNamesList().equals(other.getOsShortNamesList())) return false; + if (!getInclusionLabelsList().equals(other.getInclusionLabelsList())) return false; + if (!getExclusionLabelsList().equals(other.getExclusionLabelsList())) return false; + if (!getInventoriesList().equals(other.getInventoriesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAll()); + if (getOsShortNamesCount() > 0) { + hash = (37 * hash) + OS_SHORT_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getOsShortNamesList().hashCode(); + } + if (getInclusionLabelsCount() > 0) { + hash = (37 * hash) + INCLUSION_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getInclusionLabelsList().hashCode(); + } + if (getExclusionLabelsCount() > 0) { + hash = (37 * hash) + EXCLUSION_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getExclusionLabelsList().hashCode(); + } + if (getInventoriesCount() > 0) { + hash = (37 * hash) + INVENTORIES_FIELD_NUMBER; + hash = (53 * hash) + getInventoriesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Filters to select target VMs for an assignment.
+     * If more than one filter criteria is specified below, a VM will be selected
+     * if and only if it satisfies all of them.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInclusionLabelsFieldBuilder(); + getExclusionLabelsFieldBuilder(); + getInventoriesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + all_ = false; + + osShortNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (inclusionLabelsBuilder_ == null) { + inclusionLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + inclusionLabelsBuilder_.clear(); + } + if (exclusionLabelsBuilder_ == null) { + exclusionLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + exclusionLabelsBuilder_.clear(); + } + if (inventoriesBuilder_ == null) { + inventories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + inventoriesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter build() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter result = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(this); + int from_bitField0_ = bitField0_; + result.all_ = all_; + if (((bitField0_ & 0x00000001) != 0)) { + osShortNames_ = osShortNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.osShortNames_ = osShortNames_; + if (inclusionLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + inclusionLabels_ = java.util.Collections.unmodifiableList(inclusionLabels_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.inclusionLabels_ = inclusionLabels_; + } else { + result.inclusionLabels_ = inclusionLabelsBuilder_.build(); + } + if (exclusionLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + exclusionLabels_ = java.util.Collections.unmodifiableList(exclusionLabels_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.exclusionLabels_ = exclusionLabels_; + } else { + result.exclusionLabels_ = exclusionLabelsBuilder_.build(); + } + if (inventoriesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + inventories_ = java.util.Collections.unmodifiableList(inventories_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.inventories_ = inventories_; + } else { + result.inventories_ = inventoriesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .getDefaultInstance()) return this; + if (other.getAll() != false) { + setAll(other.getAll()); + } + if (!other.osShortNames_.isEmpty()) { + if (osShortNames_.isEmpty()) { + osShortNames_ = other.osShortNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOsShortNamesIsMutable(); + osShortNames_.addAll(other.osShortNames_); + } + onChanged(); + } + if (inclusionLabelsBuilder_ == null) { + if (!other.inclusionLabels_.isEmpty()) { + if (inclusionLabels_.isEmpty()) { + inclusionLabels_ = other.inclusionLabels_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureInclusionLabelsIsMutable(); + inclusionLabels_.addAll(other.inclusionLabels_); + } + onChanged(); + } + } else { + if (!other.inclusionLabels_.isEmpty()) { + if (inclusionLabelsBuilder_.isEmpty()) { + inclusionLabelsBuilder_.dispose(); + inclusionLabelsBuilder_ = null; + inclusionLabels_ = other.inclusionLabels_; + bitField0_ = (bitField0_ & ~0x00000002); + inclusionLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInclusionLabelsFieldBuilder() + : null; + } else { + inclusionLabelsBuilder_.addAllMessages(other.inclusionLabels_); + } + } + } + if (exclusionLabelsBuilder_ == null) { + if (!other.exclusionLabels_.isEmpty()) { + if (exclusionLabels_.isEmpty()) { + exclusionLabels_ = other.exclusionLabels_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureExclusionLabelsIsMutable(); + exclusionLabels_.addAll(other.exclusionLabels_); + } + onChanged(); + } + } else { + if (!other.exclusionLabels_.isEmpty()) { + if (exclusionLabelsBuilder_.isEmpty()) { + exclusionLabelsBuilder_.dispose(); + exclusionLabelsBuilder_ = null; + exclusionLabels_ = other.exclusionLabels_; + bitField0_ = (bitField0_ & ~0x00000004); + exclusionLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExclusionLabelsFieldBuilder() + : null; + } else { + exclusionLabelsBuilder_.addAllMessages(other.exclusionLabels_); + } + } + } + if (inventoriesBuilder_ == null) { + if (!other.inventories_.isEmpty()) { + if (inventories_.isEmpty()) { + inventories_ = other.inventories_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureInventoriesIsMutable(); + inventories_.addAll(other.inventories_); + } + onChanged(); + } + } else { + if (!other.inventories_.isEmpty()) { + if (inventoriesBuilder_.isEmpty()) { + inventoriesBuilder_.dispose(); + inventoriesBuilder_ = null; + inventories_ = other.inventories_; + bitField0_ = (bitField0_ & ~0x00000008); + inventoriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInventoriesFieldBuilder() + : null; + } else { + inventoriesBuilder_.addAllMessages(other.inventories_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private boolean all_; + /** + * + * + *
+       * Target all VMs in the project. If true, no other criteria is
+       * permitted.
+       * 
+ * + * bool all = 1; + * + * @return The all. + */ + @java.lang.Override + public boolean getAll() { + return all_; + } + /** + * + * + *
+       * Target all VMs in the project. If true, no other criteria is
+       * permitted.
+       * 
+ * + * bool all = 1; + * + * @param value The all to set. + * @return This builder for chaining. + */ + public Builder setAll(boolean value) { + + all_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Target all VMs in the project. If true, no other criteria is
+       * permitted.
+       * 
+ * + * bool all = 1; + * + * @return This builder for chaining. + */ + public Builder clearAll() { + + all_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList osShortNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureOsShortNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + osShortNames_ = new com.google.protobuf.LazyStringArrayList(osShortNames_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Deprecated. Use the `inventories` field instead.
+       * A VM is selected if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @return A list containing the osShortNames. + */ + @java.lang.Deprecated + public com.google.protobuf.ProtocolStringList getOsShortNamesList() { + return osShortNames_.getUnmodifiableView(); + } + /** + * + * + *
+       * Deprecated. Use the `inventories` field instead.
+       * A VM is selected if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @return The count of osShortNames. + */ + @java.lang.Deprecated + public int getOsShortNamesCount() { + return osShortNames_.size(); + } + /** + * + * + *
+       * Deprecated. Use the `inventories` field instead.
+       * A VM is selected if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @param index The index of the element to return. + * @return The osShortNames at the given index. + */ + @java.lang.Deprecated + public java.lang.String getOsShortNames(int index) { + return osShortNames_.get(index); + } + /** + * + * + *
+       * Deprecated. Use the `inventories` field instead.
+       * A VM is selected if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @param index The index of the value to return. + * @return The bytes of the osShortNames at the given index. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getOsShortNamesBytes(int index) { + return osShortNames_.getByteString(index); + } + /** + * + * + *
+       * Deprecated. Use the `inventories` field instead.
+       * A VM is selected if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @param index The index to set the value at. + * @param value The osShortNames to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setOsShortNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsShortNamesIsMutable(); + osShortNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Deprecated. Use the `inventories` field instead.
+       * A VM is selected if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @param value The osShortNames to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addOsShortNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsShortNamesIsMutable(); + osShortNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Deprecated. Use the `inventories` field instead.
+       * A VM is selected if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @param values The osShortNames to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addAllOsShortNames(java.lang.Iterable values) { + ensureOsShortNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, osShortNames_); + onChanged(); + return this; + } + /** + * + * + *
+       * Deprecated. Use the `inventories` field instead.
+       * A VM is selected if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearOsShortNames() { + osShortNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Deprecated. Use the `inventories` field instead.
+       * A VM is selected if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2 [deprecated = true]; + * + * @param value The bytes of the osShortNames to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addOsShortNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureOsShortNamesIsMutable(); + osShortNames_.add(value); + onChanged(); + return this; + } + + private java.util.List + inclusionLabels_ = java.util.Collections.emptyList(); + + private void ensureInclusionLabelsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + inclusionLabels_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet>(inclusionLabels_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + inclusionLabelsBuilder_; + + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public java.util.List + getInclusionLabelsList() { + if (inclusionLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(inclusionLabels_); + } else { + return inclusionLabelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public int getInclusionLabelsCount() { + if (inclusionLabelsBuilder_ == null) { + return inclusionLabels_.size(); + } else { + return inclusionLabelsBuilder_.getCount(); + } + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getInclusionLabels( + int index) { + if (inclusionLabelsBuilder_ == null) { + return inclusionLabels_.get(index); } else { - if (!other.inclusionLabels_.isEmpty()) { - if (inclusionLabelsBuilder_.isEmpty()) { - inclusionLabelsBuilder_.dispose(); - inclusionLabelsBuilder_ = null; - inclusionLabels_ = other.inclusionLabels_; - bitField0_ = (bitField0_ & ~0x00000002); - inclusionLabelsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getInclusionLabelsFieldBuilder() - : null; - } else { - inclusionLabelsBuilder_.addAllMessages(other.inclusionLabels_); - } - } + return inclusionLabelsBuilder_.getMessage(index); } - if (exclusionLabelsBuilder_ == null) { - if (!other.exclusionLabels_.isEmpty()) { - if (exclusionLabels_.isEmpty()) { - exclusionLabels_ = other.exclusionLabels_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureExclusionLabelsIsMutable(); - exclusionLabels_.addAll(other.exclusionLabels_); - } - onChanged(); + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public Builder setInclusionLabels( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { + if (inclusionLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureInclusionLabelsIsMutable(); + inclusionLabels_.set(index, value); + onChanged(); } else { - if (!other.exclusionLabels_.isEmpty()) { - if (exclusionLabelsBuilder_.isEmpty()) { - exclusionLabelsBuilder_.dispose(); - exclusionLabelsBuilder_ = null; - exclusionLabels_ = other.exclusionLabels_; - bitField0_ = (bitField0_ & ~0x00000004); - exclusionLabelsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getExclusionLabelsFieldBuilder() - : null; - } else { - exclusionLabelsBuilder_.addAllMessages(other.exclusionLabels_); - } - } + inclusionLabelsBuilder_.setMessage(index, value); } - this.mergeUnknownFields(other.unknownFields); - onChanged(); return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public Builder setInclusionLabels( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { + if (inclusionLabelsBuilder_ == null) { + ensureInclusionLabelsIsMutable(); + inclusionLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + inclusionLabelsBuilder_.setMessage(index, builderForValue.build()); } return this; } - - private int bitField0_; - - private boolean all_; /** * * *
-       * Target all VMs in the project. If true, no other criteria is
-       * permitted.
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
        * 
* - * bool all = 1; - * - * @return The all. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * */ - @java.lang.Override - public boolean getAll() { - return all_; + public Builder addInclusionLabels( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { + if (inclusionLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInclusionLabelsIsMutable(); + inclusionLabels_.add(value); + onChanged(); + } else { + inclusionLabelsBuilder_.addMessage(value); + } + return this; } /** * * *
-       * Target all VMs in the project. If true, no other criteria is
-       * permitted.
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
        * 
* - * bool all = 1; - * - * @param value The all to set. - * @return This builder for chaining. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * */ - public Builder setAll(boolean value) { - - all_ = value; - onChanged(); + public Builder addInclusionLabels( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { + if (inclusionLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInclusionLabelsIsMutable(); + inclusionLabels_.add(index, value); + onChanged(); + } else { + inclusionLabelsBuilder_.addMessage(index, value); + } return this; } /** * * *
-       * Target all VMs in the project. If true, no other criteria is
-       * permitted.
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
        * 
* - * bool all = 1; - * - * @return This builder for chaining. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * */ - public Builder clearAll() { - - all_ = false; - onChanged(); + public Builder addInclusionLabels( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { + if (inclusionLabelsBuilder_ == null) { + ensureInclusionLabelsIsMutable(); + inclusionLabels_.add(builderForValue.build()); + onChanged(); + } else { + inclusionLabelsBuilder_.addMessage(builderForValue.build()); + } return this; } - - private com.google.protobuf.LazyStringList osShortNames_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureOsShortNamesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - osShortNames_ = new com.google.protobuf.LazyStringArrayList(osShortNames_); - bitField0_ |= 0x00000001; + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public Builder addInclusionLabels( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { + if (inclusionLabelsBuilder_ == null) { + ensureInclusionLabelsIsMutable(); + inclusionLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + inclusionLabelsBuilder_.addMessage(index, builderForValue.build()); } + return this; } /** * * *
-       * A VM is included if it's OS short name matches with any of the
-       * values provided in this list.
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
        * 
* - * repeated string os_short_names = 2; - * - * @return A list containing the osShortNames. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * */ - public com.google.protobuf.ProtocolStringList getOsShortNamesList() { - return osShortNames_.getUnmodifiableView(); + public Builder addAllInclusionLabels( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet> + values) { + if (inclusionLabelsBuilder_ == null) { + ensureInclusionLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inclusionLabels_); + onChanged(); + } else { + inclusionLabelsBuilder_.addAllMessages(values); + } + return this; } /** * * *
-       * A VM is included if it's OS short name matches with any of the
-       * values provided in this list.
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
        * 
* - * repeated string os_short_names = 2; - * - * @return The count of osShortNames. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * */ - public int getOsShortNamesCount() { - return osShortNames_.size(); + public Builder clearInclusionLabels() { + if (inclusionLabelsBuilder_ == null) { + inclusionLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + inclusionLabelsBuilder_.clear(); + } + return this; } /** * * *
-       * A VM is included if it's OS short name matches with any of the
-       * values provided in this list.
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
        * 
* - * repeated string os_short_names = 2; - * - * @param index The index of the element to return. - * @return The osShortNames at the given index. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * */ - public java.lang.String getOsShortNames(int index) { - return osShortNames_.get(index); + public Builder removeInclusionLabels(int index) { + if (inclusionLabelsBuilder_ == null) { + ensureInclusionLabelsIsMutable(); + inclusionLabels_.remove(index); + onChanged(); + } else { + inclusionLabelsBuilder_.remove(index); + } + return this; } /** * * *
-       * A VM is included if it's OS short name matches with any of the
-       * values provided in this list.
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
        * 
* - * repeated string os_short_names = 2; - * - * @param index The index of the value to return. - * @return The bytes of the osShortNames at the given index. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * */ - public com.google.protobuf.ByteString getOsShortNamesBytes(int index) { - return osShortNames_.getByteString(index); + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder + getInclusionLabelsBuilder(int index) { + return getInclusionLabelsFieldBuilder().getBuilder(index); } /** * * *
-       * A VM is included if it's OS short name matches with any of the
-       * values provided in this list.
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
        * 
* - * repeated string os_short_names = 2; - * - * @param index The index to set the value at. - * @param value The osShortNames to set. - * @return This builder for chaining. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * */ - public Builder setOsShortNames(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder + getInclusionLabelsOrBuilder(int index) { + if (inclusionLabelsBuilder_ == null) { + return inclusionLabels_.get(index); + } else { + return inclusionLabelsBuilder_.getMessageOrBuilder(index); } - ensureOsShortNamesIsMutable(); - osShortNames_.set(index, value); - onChanged(); - return this; } /** * * *
-       * A VM is included if it's OS short name matches with any of the
-       * values provided in this list.
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
        * 
* - * repeated string os_short_names = 2; - * - * @param value The osShortNames to add. - * @return This builder for chaining. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * */ - public Builder addOsShortNames(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + getInclusionLabelsOrBuilderList() { + if (inclusionLabelsBuilder_ != null) { + return inclusionLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inclusionLabels_); } - ensureOsShortNamesIsMutable(); - osShortNames_.add(value); - onChanged(); - return this; } /** * * *
-       * A VM is included if it's OS short name matches with any of the
-       * values provided in this list.
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
        * 
* - * repeated string os_short_names = 2; - * - * @param values The osShortNames to add. - * @return This builder for chaining. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * */ - public Builder addAllOsShortNames(java.lang.Iterable values) { - ensureOsShortNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, osShortNames_); - onChanged(); - return this; + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder + addInclusionLabelsBuilder() { + return getInclusionLabelsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.getDefaultInstance()); } /** * * *
-       * A VM is included if it's OS short name matches with any of the
-       * values provided in this list.
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
        * 
* - * repeated string os_short_names = 2; - * - * @return This builder for chaining. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * */ - public Builder clearOsShortNames() { - osShortNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder + addInclusionLabelsBuilder(int index) { + return getInclusionLabelsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.getDefaultInstance()); } /** * * *
-       * A VM is included if it's OS short name matches with any of the
-       * values provided in this list.
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
        * 
* - * repeated string os_short_names = 2; - * - * @param value The bytes of the osShortNames to add. - * @return This builder for chaining. + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * */ - public Builder addOsShortNamesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List + getInclusionLabelsBuilderList() { + return getInclusionLabelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + getInclusionLabelsFieldBuilder() { + if (inclusionLabelsBuilder_ == null) { + inclusionLabelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder>( + inclusionLabels_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + inclusionLabels_ = null; } - checkByteStringIsUtf8(value); - ensureOsShortNamesIsMutable(); - osShortNames_.add(value); - onChanged(); - return this; + return inclusionLabelsBuilder_; } private java.util.List - inclusionLabels_ = java.util.Collections.emptyList(); + exclusionLabels_ = java.util.Collections.emptyList(); - private void ensureInclusionLabelsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - inclusionLabels_ = + private void ensureExclusionLabelsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + exclusionLabels_ = new java.util.ArrayList< - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet>(inclusionLabels_); - bitField0_ |= 0x00000002; + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet>(exclusionLabels_); + bitField0_ |= 0x00000004; } } @@ -2710,94 +4349,94 @@ private void ensureInclusionLabelsIsMutable() { com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> - inclusionLabelsBuilder_; + exclusionLabelsBuilder_; /** * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ public java.util.List - getInclusionLabelsList() { - if (inclusionLabelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(inclusionLabels_); + getExclusionLabelsList() { + if (exclusionLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(exclusionLabels_); } else { - return inclusionLabelsBuilder_.getMessageList(); + return exclusionLabelsBuilder_.getMessageList(); } } /** * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ - public int getInclusionLabelsCount() { - if (inclusionLabelsBuilder_ == null) { - return inclusionLabels_.size(); + public int getExclusionLabelsCount() { + if (exclusionLabelsBuilder_ == null) { + return exclusionLabels_.size(); } else { - return inclusionLabelsBuilder_.getCount(); + return exclusionLabelsBuilder_.getCount(); } } /** * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getInclusionLabels( + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getExclusionLabels( int index) { - if (inclusionLabelsBuilder_ == null) { - return inclusionLabels_.get(index); + if (exclusionLabelsBuilder_ == null) { + return exclusionLabels_.get(index); } else { - return inclusionLabelsBuilder_.getMessage(index); + return exclusionLabelsBuilder_.getMessage(index); } } /** * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ - public Builder setInclusionLabels( + public Builder setExclusionLabels( int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { - if (inclusionLabelsBuilder_ == null) { + if (exclusionLabelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureInclusionLabelsIsMutable(); - inclusionLabels_.set(index, value); + ensureExclusionLabelsIsMutable(); + exclusionLabels_.set(index, value); onChanged(); } else { - inclusionLabelsBuilder_.setMessage(index, value); + exclusionLabelsBuilder_.setMessage(index, value); } return this; } @@ -2805,24 +4444,24 @@ public Builder setInclusionLabels( * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ - public Builder setInclusionLabels( + public Builder setExclusionLabels( int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { - if (inclusionLabelsBuilder_ == null) { - ensureInclusionLabelsIsMutable(); - inclusionLabels_.set(index, builderForValue.build()); + if (exclusionLabelsBuilder_ == null) { + ensureExclusionLabelsIsMutable(); + exclusionLabels_.set(index, builderForValue.build()); onChanged(); } else { - inclusionLabelsBuilder_.setMessage(index, builderForValue.build()); + exclusionLabelsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -2830,26 +4469,26 @@ public Builder setInclusionLabels( * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ - public Builder addInclusionLabels( + public Builder addExclusionLabels( com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { - if (inclusionLabelsBuilder_ == null) { + if (exclusionLabelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureInclusionLabelsIsMutable(); - inclusionLabels_.add(value); + ensureExclusionLabelsIsMutable(); + exclusionLabels_.add(value); onChanged(); } else { - inclusionLabelsBuilder_.addMessage(value); + exclusionLabelsBuilder_.addMessage(value); } return this; } @@ -2857,26 +4496,26 @@ public Builder addInclusionLabels( * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ - public Builder addInclusionLabels( + public Builder addExclusionLabels( int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { - if (inclusionLabelsBuilder_ == null) { + if (exclusionLabelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureInclusionLabelsIsMutable(); - inclusionLabels_.add(index, value); + ensureExclusionLabelsIsMutable(); + exclusionLabels_.add(index, value); onChanged(); } else { - inclusionLabelsBuilder_.addMessage(index, value); + exclusionLabelsBuilder_.addMessage(index, value); } return this; } @@ -2884,23 +4523,23 @@ public Builder addInclusionLabels( * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ - public Builder addInclusionLabels( + public Builder addExclusionLabels( com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { - if (inclusionLabelsBuilder_ == null) { - ensureInclusionLabelsIsMutable(); - inclusionLabels_.add(builderForValue.build()); + if (exclusionLabelsBuilder_ == null) { + ensureExclusionLabelsIsMutable(); + exclusionLabels_.add(builderForValue.build()); onChanged(); } else { - inclusionLabelsBuilder_.addMessage(builderForValue.build()); + exclusionLabelsBuilder_.addMessage(builderForValue.build()); } return this; } @@ -2908,24 +4547,24 @@ public Builder addInclusionLabels( * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ - public Builder addInclusionLabels( + public Builder addExclusionLabels( int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { - if (inclusionLabelsBuilder_ == null) { - ensureInclusionLabelsIsMutable(); - inclusionLabels_.add(index, builderForValue.build()); + if (exclusionLabelsBuilder_ == null) { + ensureExclusionLabelsIsMutable(); + exclusionLabels_.add(index, builderForValue.build()); onChanged(); } else { - inclusionLabelsBuilder_.addMessage(index, builderForValue.build()); + exclusionLabelsBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -2933,25 +4572,25 @@ public Builder addInclusionLabels( * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ - public Builder addAllInclusionLabels( + public Builder addAllExclusionLabels( java.lang.Iterable< ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet> values) { - if (inclusionLabelsBuilder_ == null) { - ensureInclusionLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inclusionLabels_); + if (exclusionLabelsBuilder_ == null) { + ensureExclusionLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exclusionLabels_); onChanged(); } else { - inclusionLabelsBuilder_.addAllMessages(values); + exclusionLabelsBuilder_.addAllMessages(values); } return this; } @@ -2959,22 +4598,22 @@ public Builder addAllInclusionLabels( * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ - public Builder clearInclusionLabels() { - if (inclusionLabelsBuilder_ == null) { - inclusionLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearExclusionLabels() { + if (exclusionLabelsBuilder_ == null) { + exclusionLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { - inclusionLabelsBuilder_.clear(); + exclusionLabelsBuilder_.clear(); } return this; } @@ -2982,22 +4621,22 @@ public Builder clearInclusionLabels() { * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ - public Builder removeInclusionLabels(int index) { - if (inclusionLabelsBuilder_ == null) { - ensureInclusionLabelsIsMutable(); - inclusionLabels_.remove(index); + public Builder removeExclusionLabels(int index) { + if (exclusionLabelsBuilder_ == null) { + ensureExclusionLabelsIsMutable(); + exclusionLabels_.remove(index); onChanged(); } else { - inclusionLabelsBuilder_.remove(index); + exclusionLabelsBuilder_.remove(index); } return this; } @@ -3005,78 +4644,78 @@ public Builder removeInclusionLabels(int index) { * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder - getInclusionLabelsBuilder(int index) { - return getInclusionLabelsFieldBuilder().getBuilder(index); + getExclusionLabelsBuilder(int index) { + return getExclusionLabelsFieldBuilder().getBuilder(index); } /** * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder - getInclusionLabelsOrBuilder(int index) { - if (inclusionLabelsBuilder_ == null) { - return inclusionLabels_.get(index); + getExclusionLabelsOrBuilder(int index) { + if (exclusionLabelsBuilder_ == null) { + return exclusionLabels_.get(index); } else { - return inclusionLabelsBuilder_.getMessageOrBuilder(index); + return exclusionLabelsBuilder_.getMessageOrBuilder(index); } } /** * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ public java.util.List< ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> - getInclusionLabelsOrBuilderList() { - if (inclusionLabelsBuilder_ != null) { - return inclusionLabelsBuilder_.getMessageOrBuilderList(); + getExclusionLabelsOrBuilderList() { + if (exclusionLabelsBuilder_ != null) { + return exclusionLabelsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(inclusionLabels_); + return java.util.Collections.unmodifiableList(exclusionLabels_); } } /** * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder - addInclusionLabelsBuilder() { - return getInclusionLabelsFieldBuilder() + addExclusionLabelsBuilder() { + return getExclusionLabelsFieldBuilder() .addBuilder( com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.getDefaultInstance()); } @@ -3084,18 +4723,18 @@ public Builder removeInclusionLabels(int index) { * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder - addInclusionLabelsBuilder(int index) { - return getInclusionLabelsFieldBuilder() + addExclusionLabelsBuilder(int index) { + return getExclusionLabelsFieldBuilder() .addBuilder( index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.getDefaultInstance()); @@ -3104,156 +4743,149 @@ public Builder removeInclusionLabels(int index) { * * *
-       * List of label sets used for VM inclusion.
-       * If the list has more than one `LabelSet`, the VM is included if any
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
        * of the label sets are applicable for the VM.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; * */ public java.util.List - getInclusionLabelsBuilderList() { - return getInclusionLabelsFieldBuilder().getBuilderList(); + getExclusionLabelsBuilderList() { + return getExclusionLabelsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> - getInclusionLabelsFieldBuilder() { - if (inclusionLabelsBuilder_ == null) { - inclusionLabelsBuilder_ = + getExclusionLabelsFieldBuilder() { + if (exclusionLabelsBuilder_ == null) { + exclusionLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder>( - inclusionLabels_, - ((bitField0_ & 0x00000002) != 0), + exclusionLabels_, + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - inclusionLabels_ = null; + exclusionLabels_ = null; } - return inclusionLabelsBuilder_; + return exclusionLabelsBuilder_; } - private java.util.List - exclusionLabels_ = java.util.Collections.emptyList(); + private java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory> + inventories_ = java.util.Collections.emptyList(); - private void ensureExclusionLabelsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - exclusionLabels_ = + private void ensureInventoriesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + inventories_ = new java.util.ArrayList< - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet>(exclusionLabels_); - bitField0_ |= 0x00000004; + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory>( + inventories_); + bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> - exclusionLabelsBuilder_; + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .InventoryOrBuilder> + inventoriesBuilder_; /** * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public java.util.List - getExclusionLabelsList() { - if (exclusionLabelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(exclusionLabels_); + public java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory> + getInventoriesList() { + if (inventoriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(inventories_); } else { - return exclusionLabelsBuilder_.getMessageList(); + return inventoriesBuilder_.getMessageList(); } } /** * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public int getExclusionLabelsCount() { - if (exclusionLabelsBuilder_ == null) { - return exclusionLabels_.size(); + public int getInventoriesCount() { + if (inventoriesBuilder_ == null) { + return inventories_.size(); } else { - return exclusionLabelsBuilder_.getCount(); + return inventoriesBuilder_.getCount(); } } /** * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getExclusionLabels( - int index) { - if (exclusionLabelsBuilder_ == null) { - return exclusionLabels_.get(index); + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + getInventories(int index) { + if (inventoriesBuilder_ == null) { + return inventories_.get(index); } else { - return exclusionLabelsBuilder_.getMessage(index); + return inventoriesBuilder_.getMessage(index); } } /** * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public Builder setExclusionLabels( - int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { - if (exclusionLabelsBuilder_ == null) { + public Builder setInventories( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory value) { + if (inventoriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureExclusionLabelsIsMutable(); - exclusionLabels_.set(index, value); + ensureInventoriesIsMutable(); + inventories_.set(index, value); onChanged(); } else { - exclusionLabelsBuilder_.setMessage(index, value); + inventoriesBuilder_.setMessage(index, value); } return this; } @@ -3261,27 +4893,25 @@ public Builder setExclusionLabels( * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public Builder setExclusionLabels( + public Builder setInventories( int index, - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { - if (exclusionLabelsBuilder_ == null) { - ensureExclusionLabelsIsMutable(); - exclusionLabels_.set(index, builderForValue.build()); + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.Builder + builderForValue) { + if (inventoriesBuilder_ == null) { + ensureInventoriesIsMutable(); + inventories_.set(index, builderForValue.build()); onChanged(); } else { - exclusionLabelsBuilder_.setMessage(index, builderForValue.build()); + inventoriesBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -3289,29 +4919,26 @@ public Builder setExclusionLabels( * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public Builder addExclusionLabels( - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { - if (exclusionLabelsBuilder_ == null) { + public Builder addInventories( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory value) { + if (inventoriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureExclusionLabelsIsMutable(); - exclusionLabels_.add(value); + ensureInventoriesIsMutable(); + inventories_.add(value); onChanged(); } else { - exclusionLabelsBuilder_.addMessage(value); + inventoriesBuilder_.addMessage(value); } return this; } @@ -3319,29 +4946,27 @@ public Builder addExclusionLabels( * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public Builder addExclusionLabels( - int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { - if (exclusionLabelsBuilder_ == null) { + public Builder addInventories( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory value) { + if (inventoriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureExclusionLabelsIsMutable(); - exclusionLabels_.add(index, value); + ensureInventoriesIsMutable(); + inventories_.add(index, value); onChanged(); } else { - exclusionLabelsBuilder_.addMessage(index, value); + inventoriesBuilder_.addMessage(index, value); } return this; } @@ -3349,26 +4974,24 @@ public Builder addExclusionLabels( * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public Builder addExclusionLabels( - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { - if (exclusionLabelsBuilder_ == null) { - ensureExclusionLabelsIsMutable(); - exclusionLabels_.add(builderForValue.build()); + public Builder addInventories( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.Builder + builderForValue) { + if (inventoriesBuilder_ == null) { + ensureInventoriesIsMutable(); + inventories_.add(builderForValue.build()); onChanged(); } else { - exclusionLabelsBuilder_.addMessage(builderForValue.build()); + inventoriesBuilder_.addMessage(builderForValue.build()); } return this; } @@ -3376,27 +4999,25 @@ public Builder addExclusionLabels( * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public Builder addExclusionLabels( + public Builder addInventories( int index, - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { - if (exclusionLabelsBuilder_ == null) { - ensureExclusionLabelsIsMutable(); - exclusionLabels_.add(index, builderForValue.build()); + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.Builder + builderForValue) { + if (inventoriesBuilder_ == null) { + ensureInventoriesIsMutable(); + inventories_.add(index, builderForValue.build()); onChanged(); } else { - exclusionLabelsBuilder_.addMessage(index, builderForValue.build()); + inventoriesBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -3404,28 +5025,26 @@ public Builder addExclusionLabels( * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public Builder addAllExclusionLabels( + public Builder addAllInventories( java.lang.Iterable< - ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet> + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory> values) { - if (exclusionLabelsBuilder_ == null) { - ensureExclusionLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exclusionLabels_); + if (inventoriesBuilder_ == null) { + ensureInventoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inventories_); onChanged(); } else { - exclusionLabelsBuilder_.addAllMessages(values); + inventoriesBuilder_.addAllMessages(values); } return this; } @@ -3433,25 +5052,22 @@ public Builder addAllExclusionLabels( * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public Builder clearExclusionLabels() { - if (exclusionLabelsBuilder_ == null) { - exclusionLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + public Builder clearInventories() { + if (inventoriesBuilder_ == null) { + inventories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { - exclusionLabelsBuilder_.clear(); + inventoriesBuilder_.clear(); } return this; } @@ -3459,25 +5075,22 @@ public Builder clearExclusionLabels() { * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public Builder removeExclusionLabels(int index) { - if (exclusionLabelsBuilder_ == null) { - ensureExclusionLabelsIsMutable(); - exclusionLabels_.remove(index); + public Builder removeInventories(int index) { + if (inventoriesBuilder_ == null) { + ensureInventoriesIsMutable(); + inventories_.remove(index); onChanged(); } else { - exclusionLabelsBuilder_.remove(index); + inventoriesBuilder_.remove(index); } return this; } @@ -3485,155 +5098,145 @@ public Builder removeExclusionLabels(int index) { * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder - getExclusionLabelsBuilder(int index) { - return getExclusionLabelsFieldBuilder().getBuilder(index); + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.Builder + getInventoriesBuilder(int index) { + return getInventoriesFieldBuilder().getBuilder(index); } /** * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder - getExclusionLabelsOrBuilder(int index) { - if (exclusionLabelsBuilder_ == null) { - return exclusionLabels_.get(index); + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.InventoryOrBuilder + getInventoriesOrBuilder(int index) { + if (inventoriesBuilder_ == null) { + return inventories_.get(index); } else { - return exclusionLabelsBuilder_.getMessageOrBuilder(index); + return inventoriesBuilder_.getMessageOrBuilder(index); } } /** * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ public java.util.List< - ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> - getExclusionLabelsOrBuilderList() { - if (exclusionLabelsBuilder_ != null) { - return exclusionLabelsBuilder_.getMessageOrBuilderList(); + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .InventoryOrBuilder> + getInventoriesOrBuilderList() { + if (inventoriesBuilder_ != null) { + return inventoriesBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(exclusionLabels_); + return java.util.Collections.unmodifiableList(inventories_); } } /** * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder - addExclusionLabelsBuilder() { - return getExclusionLabelsFieldBuilder() + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.Builder + addInventoriesBuilder() { + return getInventoriesFieldBuilder() .addBuilder( - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.getDefaultInstance()); + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + .getDefaultInstance()); } /** * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder - addExclusionLabelsBuilder(int index) { - return getExclusionLabelsFieldBuilder() + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.Builder + addInventoriesBuilder(int index) { + return getInventoriesFieldBuilder() .addBuilder( index, - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.getDefaultInstance()); + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + .getDefaultInstance()); } /** * * *
-       * List of label sets used for VM exclusion.
-       * If the list has more than one label set, the VM is excluded if any
-       * of the label sets are applicable for the VM.
-       * This filter is applied last in the filtering chain and therefore a
-       * VM is guaranteed to be excluded if it satisfies one of the below
-       * label sets.
+       * List of inventories to select VMs.
+       * A VM is selected if its inventory data matches at least one of the
+       * following inventories.
        * 
* * - * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory inventories = 5; * */ - public java.util.List - getExclusionLabelsBuilderList() { - return getExclusionLabelsFieldBuilder().getBuilderList(); + public java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.Builder> + getInventoriesBuilderList() { + return getInventoriesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> - getExclusionLabelsFieldBuilder() { - if (exclusionLabelsBuilder_ == null) { - exclusionLabelsBuilder_ = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .InventoryOrBuilder> + getInventoriesFieldBuilder() { + if (inventoriesBuilder_ == null) { + inventoriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, - com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder>( - exclusionLabels_, - ((bitField0_ & 0x00000004) != 0), + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Inventory + .Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .InventoryOrBuilder>( + inventories_, + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); - exclusionLabels_ = null; + inventories_ = null; } - return exclusionLabelsBuilder_; + return inventoriesBuilder_; } @java.lang.Override @@ -3896,14 +5499,14 @@ private Rollout( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.class, @@ -4230,14 +5833,14 @@ public static final class Builder // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout) com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.class, @@ -4278,7 +5881,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_descriptor; } @@ -5332,6 +6935,57 @@ public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { return getRevisionCreateTime(); } + public static final int ETAG_FIELD_NUMBER = 8; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * The etag for this OS policy assignment.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 8; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * The etag for this OS policy assignment.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int ROLLOUT_STATE_FIELD_NUMBER = 9; private int rolloutState_; /** @@ -5518,6 +7172,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (revisionCreateTime_ != null) { output.writeMessage(7, getRevisionCreateTime()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_); + } if (rolloutState_ != com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState .ROLLOUT_STATE_UNSPECIFIED @@ -5566,6 +7223,9 @@ public int getSerializedSize() { if (revisionCreateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getRevisionCreateTime()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_); + } if (rolloutState_ != com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState .ROLLOUT_STATE_UNSPECIFIED @@ -5616,6 +7276,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRevisionCreateTime()) { if (!getRevisionCreateTime().equals(other.getRevisionCreateTime())) return false; } + if (!getEtag().equals(other.getEtag())) return false; if (rolloutState_ != other.rolloutState_) return false; if (getBaseline() != other.getBaseline()) return false; if (getDeleted() != other.getDeleted()) return false; @@ -5654,6 +7315,8 @@ public int hashCode() { hash = (37 * hash) + REVISION_CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getRevisionCreateTime().hashCode(); } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + ROLLOUT_STATE_FIELD_NUMBER; hash = (53 * hash) + rolloutState_; hash = (37 * hash) + BASELINE_FIELD_NUMBER; @@ -5786,14 +7449,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment) com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.class, @@ -5849,6 +7512,8 @@ public Builder clear() { revisionCreateTime_ = null; revisionCreateTimeBuilder_ = null; } + etag_ = ""; + rolloutState_ = 0; baseline_ = false; @@ -5864,7 +7529,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor; } @@ -5914,6 +7579,7 @@ public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment buildPartial() { } else { result.revisionCreateTime_ = revisionCreateTimeBuilder_.build(); } + result.etag_ = etag_; result.rolloutState_ = rolloutState_; result.baseline_ = baseline_; result.deleted_ = deleted_; @@ -6017,6 +7683,10 @@ public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicyAssignment ot if (other.hasRevisionCreateTime()) { mergeRevisionCreateTime(other.getRevisionCreateTime()); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } if (other.rolloutState_ != 0) { setRolloutStateValue(other.getRolloutStateValue()); } @@ -7485,6 +9155,117 @@ public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { return revisionCreateTimeBuilder_; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * The etag for this OS policy assignment.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 8; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The etag for this OS policy assignment.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The etag for this OS policy assignment.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 8; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The etag for this OS policy assignment.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 8; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The etag for this OS policy assignment.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 8; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + private int rolloutState_ = 0; /** * diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOperationMetadata.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOperationMetadata.java index 5368786e..c81dcb80 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOperationMetadata.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOperationMetadata.java @@ -146,14 +146,14 @@ private OSPolicyAssignmentOperationMetadata( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.class, @@ -1019,14 +1019,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata) com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.class, @@ -1074,7 +1074,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_descriptor; } diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOrBuilder.java index 16945c87..9ceb0d21 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOrBuilder.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOrBuilder.java @@ -317,6 +317,33 @@ public interface OSPolicyAssignmentOrBuilder */ com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder(); + /** + * + * + *
+   * The etag for this OS policy assignment.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 8; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * The etag for this OS policy assignment.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + /** * * diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentReport.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentReport.java new file mode 100644 index 00000000..6813afb0 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentReport.java @@ -0,0 +1,8751 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A report of the OS policy assignment status for a given instance.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport} + */ +public final class OSPolicyAssignmentReport extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport) + OSPolicyAssignmentReportOrBuilder { + private static final long serialVersionUID = 0L; + // Use OSPolicyAssignmentReport.newBuilder() to construct. + private OSPolicyAssignmentReport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OSPolicyAssignmentReport() { + name_ = ""; + instance_ = ""; + osPolicyAssignment_ = ""; + osPolicyCompliances_ = java.util.Collections.emptyList(); + lastRunId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OSPolicyAssignmentReport(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OSPolicyAssignmentReport( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instance_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + osPolicyAssignment_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + osPolicyCompliances_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance>(); + mutable_bitField0_ |= 0x00000001; + } + osPolicyCompliances_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .parser(), + extensionRegistry)); + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + lastRunId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + osPolicyCompliances_ = java.util.Collections.unmodifiableList(osPolicyCompliances_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.Builder.class); + } + + public interface OSPolicyComplianceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The OS policy id
+     * 
+ * + * string os_policy_id = 1; + * + * @return The osPolicyId. + */ + java.lang.String getOsPolicyId(); + /** + * + * + *
+     * The OS policy id
+     * 
+ * + * string os_policy_id = 1; + * + * @return The bytes for osPolicyId. + */ + com.google.protobuf.ByteString getOsPolicyIdBytes(); + + /** + * + * + *
+     * The compliance state of the OS policy.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; + * + * + * @return The enum numeric value on the wire for complianceState. + */ + int getComplianceStateValue(); + /** + * + * + *
+     * The compliance state of the OS policy.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; + * + * + * @return The complianceState. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState + getComplianceState(); + + /** + * + * + *
+     * The reason for the OS policy to be in an unknown compliance state.
+     * This field is always populated when `compliance_state` is `UNKNOWN`.
+     * If populated, the field can contain one of the following values:
+     * * `vm-not-running`: The VM was not running.
+     * * `os-policies-not-supported-by-agent`: The version of the OS Config
+     * agent running on the VM does not support running OS policies.
+     * * `no-agent-detected`: The OS Config agent is not detected for the VM.
+     * * `resource-execution-errors`: The OS Config agent encountered errors
+     * while executing one or more resources in the policy. See
+     * `os_policy_resource_compliances` for details.
+     * * `task-timeout`: The task sent to the agent to apply the policy timed
+     * out.
+     * * `unexpected-agent-state`: The OS Config agent did not report the final
+     * status of the task that attempted to apply the policy. Instead, the agent
+     * unexpectedly started working on a different task. This mostly happens
+     * when the agent or VM unexpectedly restarts while applying OS policies.
+     * * `internal-service-errors`: Internal service errors were encountered
+     * while attempting to apply the policy.
+     * 
+ * + * string compliance_state_reason = 3; + * + * @return The complianceStateReason. + */ + java.lang.String getComplianceStateReason(); + /** + * + * + *
+     * The reason for the OS policy to be in an unknown compliance state.
+     * This field is always populated when `compliance_state` is `UNKNOWN`.
+     * If populated, the field can contain one of the following values:
+     * * `vm-not-running`: The VM was not running.
+     * * `os-policies-not-supported-by-agent`: The version of the OS Config
+     * agent running on the VM does not support running OS policies.
+     * * `no-agent-detected`: The OS Config agent is not detected for the VM.
+     * * `resource-execution-errors`: The OS Config agent encountered errors
+     * while executing one or more resources in the policy. See
+     * `os_policy_resource_compliances` for details.
+     * * `task-timeout`: The task sent to the agent to apply the policy timed
+     * out.
+     * * `unexpected-agent-state`: The OS Config agent did not report the final
+     * status of the task that attempted to apply the policy. Instead, the agent
+     * unexpectedly started working on a different task. This mostly happens
+     * when the agent or VM unexpectedly restarts while applying OS policies.
+     * * `internal-service-errors`: Internal service errors were encountered
+     * while attempting to apply the policy.
+     * 
+ * + * string compliance_state_reason = 3; + * + * @return The bytes for complianceStateReason. + */ + com.google.protobuf.ByteString getComplianceStateReasonBytes(); + + /** + * + * + *
+     * Compliance data for each resource within the policy that is applied to
+     * the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance> + getOsPolicyResourceCompliancesList(); + /** + * + * + *
+     * Compliance data for each resource within the policy that is applied to
+     * the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + getOsPolicyResourceCompliances(int index); + /** + * + * + *
+     * Compliance data for each resource within the policy that is applied to
+     * the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + int getOsPolicyResourceCompliancesCount(); + /** + * + * + *
+     * Compliance data for each resource within the policy that is applied to
+     * the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceComplianceOrBuilder> + getOsPolicyResourceCompliancesOrBuilderList(); + /** + * + * + *
+     * Compliance data for each resource within the policy that is applied to
+     * the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceComplianceOrBuilder + getOsPolicyResourceCompliancesOrBuilder(int index); + } + /** + * + * + *
+   * Compliance data for an OS policy
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance} + */ + public static final class OSPolicyCompliance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance) + OSPolicyComplianceOrBuilder { + private static final long serialVersionUID = 0L; + // Use OSPolicyCompliance.newBuilder() to construct. + private OSPolicyCompliance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OSPolicyCompliance() { + osPolicyId_ = ""; + complianceState_ = 0; + complianceStateReason_ = ""; + osPolicyResourceCompliances_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OSPolicyCompliance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OSPolicyCompliance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + osPolicyId_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + complianceState_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + complianceStateReason_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + osPolicyResourceCompliances_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance>(); + mutable_bitField0_ |= 0x00000001; + } + osPolicyResourceCompliances_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + osPolicyResourceCompliances_ = + java.util.Collections.unmodifiableList(osPolicyResourceCompliances_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.Builder + .class); + } + + /** + * + * + *
+     * Possible compliance states for an os policy.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState} + */ + public enum ComplianceState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The policy is in an unknown compliance state.
+       * Refer to the field `compliance_state_reason` to learn the exact reason
+       * for the policy to be in this compliance state.
+       * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * + * + *
+       * Policy is compliant.
+       * The policy is compliant if all the underlying resources are also
+       * compliant.
+       * 
+ * + * COMPLIANT = 1; + */ + COMPLIANT(1), + /** + * + * + *
+       * Policy is non-compliant.
+       * The policy is non-compliant if one or more underlying resources are
+       * non-compliant.
+       * 
+ * + * NON_COMPLIANT = 2; + */ + NON_COMPLIANT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The policy is in an unknown compliance state.
+       * Refer to the field `compliance_state_reason` to learn the exact reason
+       * for the policy to be in this compliance state.
+       * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * + * + *
+       * Policy is compliant.
+       * The policy is compliant if all the underlying resources are also
+       * compliant.
+       * 
+ * + * COMPLIANT = 1; + */ + public static final int COMPLIANT_VALUE = 1; + /** + * + * + *
+       * Policy is non-compliant.
+       * The policy is non-compliant if one or more underlying resources are
+       * non-compliant.
+       * 
+ * + * NON_COMPLIANT = 2; + */ + public static final int NON_COMPLIANT_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ComplianceState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ComplianceState forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN; + case 1: + return COMPLIANT; + case 2: + return NON_COMPLIANT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ComplianceState findValueByNumber(int number) { + return ComplianceState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ComplianceState[] VALUES = values(); + + public static ComplianceState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ComplianceState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState) + } + + public interface OSPolicyResourceComplianceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The ID of the OS policy resource.
+       * 
+ * + * string os_policy_resource_id = 1; + * + * @return The osPolicyResourceId. + */ + java.lang.String getOsPolicyResourceId(); + /** + * + * + *
+       * The ID of the OS policy resource.
+       * 
+ * + * string os_policy_resource_id = 1; + * + * @return The bytes for osPolicyResourceId. + */ + com.google.protobuf.ByteString getOsPolicyResourceIdBytes(); + + /** + * + * + *
+       * Ordered list of configuration completed by the agent for the OS policy
+       * resource.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep> + getConfigStepsList(); + /** + * + * + *
+       * Ordered list of configuration completed by the agent for the OS policy
+       * resource.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + getConfigSteps(int index); + /** + * + * + *
+       * Ordered list of configuration completed by the agent for the OS policy
+       * resource.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + int getConfigStepsCount(); + /** + * + * + *
+       * Ordered list of configuration completed by the agent for the OS policy
+       * resource.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStepOrBuilder> + getConfigStepsOrBuilderList(); + /** + * + * + *
+       * Ordered list of configuration completed by the agent for the OS policy
+       * resource.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStepOrBuilder + getConfigStepsOrBuilder(int index); + + /** + * + * + *
+       * The compliance state of the resource.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; + * + * + * @return The enum numeric value on the wire for complianceState. + */ + int getComplianceStateValue(); + /** + * + * + *
+       * The compliance state of the resource.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; + * + * + * @return The complianceState. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ComplianceState + getComplianceState(); + + /** + * + * + *
+       * A reason for the resource to be in the given compliance state.
+       * This field is always populated when `compliance_state` is `UNKNOWN`.
+       * The following values are supported when `compliance_state == UNKNOWN`
+       * * `execution-errors`: Errors were encountered by the agent while
+       * executing the resource and the compliance state couldn't be
+       * determined.
+       * * `execution-skipped-by-agent`: Resource execution was skipped by the
+       * agent because errors were encountered while executing prior resources
+       * in the OS policy.
+       * * `os-policy-execution-attempt-failed`: The execution of the OS policy
+       * containing this resource failed and the compliance state couldn't be
+       * determined.
+       * 
+ * + * string compliance_state_reason = 4; + * + * @return The complianceStateReason. + */ + java.lang.String getComplianceStateReason(); + /** + * + * + *
+       * A reason for the resource to be in the given compliance state.
+       * This field is always populated when `compliance_state` is `UNKNOWN`.
+       * The following values are supported when `compliance_state == UNKNOWN`
+       * * `execution-errors`: Errors were encountered by the agent while
+       * executing the resource and the compliance state couldn't be
+       * determined.
+       * * `execution-skipped-by-agent`: Resource execution was skipped by the
+       * agent because errors were encountered while executing prior resources
+       * in the OS policy.
+       * * `os-policy-execution-attempt-failed`: The execution of the OS policy
+       * containing this resource failed and the compliance state couldn't be
+       * determined.
+       * 
+ * + * string compliance_state_reason = 4; + * + * @return The bytes for complianceStateReason. + */ + com.google.protobuf.ByteString getComplianceStateReasonBytes(); + + /** + * + * + *
+       * ExecResource specific output.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + * + * @return Whether the execResourceOutput field is set. + */ + boolean hasExecResourceOutput(); + /** + * + * + *
+       * ExecResource specific output.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + * + * @return The execResourceOutput. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + getExecResourceOutput(); + /** + * + * + *
+       * ExecResource specific output.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutputOrBuilder + getExecResourceOutputOrBuilder(); + + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OutputCase + getOutputCase(); + } + /** + * + * + *
+     * Compliance data for an OS policy resource.
+     * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance} + */ + public static final class OSPolicyResourceCompliance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance) + OSPolicyResourceComplianceOrBuilder { + private static final long serialVersionUID = 0L; + // Use OSPolicyResourceCompliance.newBuilder() to construct. + private OSPolicyResourceCompliance( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OSPolicyResourceCompliance() { + osPolicyResourceId_ = ""; + configSteps_ = java.util.Collections.emptyList(); + complianceState_ = 0; + complianceStateReason_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OSPolicyResourceCompliance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OSPolicyResourceCompliance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + osPolicyResourceId_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + configSteps_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance + .OSPolicyResourceConfigStep>(); + mutable_bitField0_ |= 0x00000001; + } + configSteps_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance + .OSPolicyResourceConfigStep.parser(), + extensionRegistry)); + break; + } + case 24: + { + int rawValue = input.readEnum(); + + complianceState_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + complianceStateReason_ = s; + break; + } + case 42: + { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.Builder + subBuilder = null; + if (outputCase_ == 5) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance + .ExecResourceOutput) + output_) + .toBuilder(); + } + output_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput) + output_); + output_ = subBuilder.buildPartial(); + } + outputCase_ = 5; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + configSteps_ = java.util.Collections.unmodifiableList(configSteps_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.Builder.class); + } + + /** + * + * + *
+       * Possible compliance states for a resource.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState} + */ + public enum ComplianceState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * The resource is in an unknown compliance state.
+         * To get more details about why the policy is in this state, review
+         * the output of the `compliance_state_reason` field.
+         * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * + * + *
+         * Resource is compliant.
+         * 
+ * + * COMPLIANT = 1; + */ + COMPLIANT(1), + /** + * + * + *
+         * Resource is non-compliant.
+         * 
+ * + * NON_COMPLIANT = 2; + */ + NON_COMPLIANT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * The resource is in an unknown compliance state.
+         * To get more details about why the policy is in this state, review
+         * the output of the `compliance_state_reason` field.
+         * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * + * + *
+         * Resource is compliant.
+         * 
+ * + * COMPLIANT = 1; + */ + public static final int COMPLIANT_VALUE = 1; + /** + * + * + *
+         * Resource is non-compliant.
+         * 
+ * + * NON_COMPLIANT = 2; + */ + public static final int NON_COMPLIANT_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ComplianceState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ComplianceState forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN; + case 1: + return COMPLIANT; + case 2: + return NON_COMPLIANT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ComplianceState findValueByNumber(int number) { + return ComplianceState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ComplianceState[] VALUES = values(); + + public static ComplianceState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ComplianceState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState) + } + + public interface OSPolicyResourceConfigStepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Configuration step type.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+         * Configuration step type.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; + * + * + * @return The type. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type + getType(); + + /** + * + * + *
+         * An error message recorded during the execution of this step.
+         * Only populated if errors were encountered during this step execution.
+         * 
+ * + * string error_message = 2; + * + * @return The errorMessage. + */ + java.lang.String getErrorMessage(); + /** + * + * + *
+         * An error message recorded during the execution of this step.
+         * Only populated if errors were encountered during this step execution.
+         * 
+ * + * string error_message = 2; + * + * @return The bytes for errorMessage. + */ + com.google.protobuf.ByteString getErrorMessageBytes(); + } + /** + * + * + *
+       * Step performed by the OS Config agent for configuring an
+       * `OSPolicy` resource to its desired state.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep} + */ + public static final class OSPolicyResourceConfigStep + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep) + OSPolicyResourceConfigStepOrBuilder { + private static final long serialVersionUID = 0L; + // Use OSPolicyResourceConfigStep.newBuilder() to construct. + private OSPolicyResourceConfigStep( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OSPolicyResourceConfigStep() { + type_ = 0; + errorMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OSPolicyResourceConfigStep(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OSPolicyResourceConfigStep( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + errorMessage_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Builder.class); + } + + /** + * + * + *
+         * Supported configuration step types
+         * 
+ * + * Protobuf enum {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+           * Default value. This value is unused.
+           * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+           * Checks for resource conflicts such as schema errors.
+           * 
+ * + * VALIDATION = 1; + */ + VALIDATION(1), + /** + * + * + *
+           * Checks the current status of the desired state for a resource.
+           * 
+ * + * DESIRED_STATE_CHECK = 2; + */ + DESIRED_STATE_CHECK(2), + /** + * + * + *
+           * Enforces the desired state for a resource that is not in desired
+           * state.
+           * 
+ * + * DESIRED_STATE_ENFORCEMENT = 3; + */ + DESIRED_STATE_ENFORCEMENT(3), + /** + * + * + *
+           * Re-checks the status of the desired state. This check is done
+           * for a resource after the enforcement of all OS policies.
+           * This step is used to determine the final desired state status for
+           * the resource. It accounts for any resources that might have drifted
+           * from their desired state due to side effects from executing other
+           * resources.
+           * 
+ * + * DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; + */ + DESIRED_STATE_CHECK_POST_ENFORCEMENT(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+           * Default value. This value is unused.
+           * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+           * Checks for resource conflicts such as schema errors.
+           * 
+ * + * VALIDATION = 1; + */ + public static final int VALIDATION_VALUE = 1; + /** + * + * + *
+           * Checks the current status of the desired state for a resource.
+           * 
+ * + * DESIRED_STATE_CHECK = 2; + */ + public static final int DESIRED_STATE_CHECK_VALUE = 2; + /** + * + * + *
+           * Enforces the desired state for a resource that is not in desired
+           * state.
+           * 
+ * + * DESIRED_STATE_ENFORCEMENT = 3; + */ + public static final int DESIRED_STATE_ENFORCEMENT_VALUE = 3; + /** + * + * + *
+           * Re-checks the status of the desired state. This check is done
+           * for a resource after the enforcement of all OS policies.
+           * This step is used to determine the final desired state status for
+           * the resource. It accounts for any resources that might have drifted
+           * from their desired state due to side effects from executing other
+           * resources.
+           * 
+ * + * DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; + */ + public static final int DESIRED_STATE_CHECK_POST_ENFORCEMENT_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return VALIDATION; + case 2: + return DESIRED_STATE_CHECK; + case 3: + return DESIRED_STATE_ENFORCEMENT; + case 4: + return DESIRED_STATE_CHECK_POST_ENFORCEMENT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+         * Configuration step type.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+         * Configuration step type.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type + getType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type + result = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type.valueOf(type_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type.UNRECOGNIZED + : result; + } + + public static final int ERROR_MESSAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object errorMessage_; + /** + * + * + *
+         * An error message recorded during the execution of this step.
+         * Only populated if errors were encountered during this step execution.
+         * 
+ * + * string error_message = 2; + * + * @return The errorMessage. + */ + @java.lang.Override + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorMessage_ = s; + return s; + } + } + /** + * + * + *
+         * An error message recorded during the execution of this step.
+         * Only populated if errors were encountered during this step execution.
+         * 
+ * + * string error_message = 2; + * + * @return The bytes for errorMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type.TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorMessage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type.TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorMessage_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + other = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep) + obj; + + if (type_ != other.type_) return false; + if (!getErrorMessage().equals(other.getErrorMessage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getErrorMessage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Step performed by the OS Config agent for configuring an
+         * `OSPolicy` resource to its desired state.
+         * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep) + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + errorMessage_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + build() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + result = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep( + this); + result.type_ = type_; + result.errorMessage_ = errorMessage_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getErrorMessage().isEmpty()) { + errorMessage_ = other.errorMessage_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * + * + *
+           * Configuration step type.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+           * Configuration step type.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Configuration step type.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type + getType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type + result = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type.valueOf(type_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+           * Configuration step type.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type + value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+           * Configuration step type.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object errorMessage_ = ""; + /** + * + * + *
+           * An error message recorded during the execution of this step.
+           * Only populated if errors were encountered during this step execution.
+           * 
+ * + * string error_message = 2; + * + * @return The errorMessage. + */ + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * An error message recorded during the execution of this step.
+           * Only populated if errors were encountered during this step execution.
+           * 
+ * + * string error_message = 2; + * + * @return The bytes for errorMessage. + */ + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * An error message recorded during the execution of this step.
+           * Only populated if errors were encountered during this step execution.
+           * 
+ * + * string error_message = 2; + * + * @param value The errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + errorMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * An error message recorded during the execution of this step.
+           * Only populated if errors were encountered during this step execution.
+           * 
+ * + * string error_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearErrorMessage() { + + errorMessage_ = getDefaultInstance().getErrorMessage(); + onChanged(); + return this; + } + /** + * + * + *
+           * An error message recorded during the execution of this step.
+           * Only populated if errors were encountered during this step execution.
+           * 
+ * + * string error_message = 2; + * + * @param value The bytes for errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + errorMessage_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OSPolicyResourceConfigStep parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OSPolicyResourceConfigStep(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExecResourceOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Output from enforcement phase output file (if run).
+         * Output size is limited to 100K bytes.
+         * 
+ * + * bytes enforcement_output = 2; + * + * @return The enforcementOutput. + */ + com.google.protobuf.ByteString getEnforcementOutput(); + } + /** + * + * + *
+       * ExecResource specific output.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput} + */ + public static final class ExecResourceOutput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput) + ExecResourceOutputOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecResourceOutput.newBuilder() to construct. + private ExecResourceOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecResourceOutput() { + enforcementOutput_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecResourceOutput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExecResourceOutput( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + enforcementOutput_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.Builder.class); + } + + public static final int ENFORCEMENT_OUTPUT_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString enforcementOutput_; + /** + * + * + *
+         * Output from enforcement phase output file (if run).
+         * Output size is limited to 100K bytes.
+         * 
+ * + * bytes enforcement_output = 2; + * + * @return The enforcementOutput. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnforcementOutput() { + return enforcementOutput_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!enforcementOutput_.isEmpty()) { + output.writeBytes(2, enforcementOutput_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!enforcementOutput_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, enforcementOutput_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + other = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput) + obj; + + if (!getEnforcementOutput().equals(other.getEnforcementOutput())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENFORCEMENT_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getEnforcementOutput().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * ExecResource specific output.
+         * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput) + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enforcementOutput_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + build() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + result = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput(this); + result.enforcementOutput_ = enforcementOutput_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.getDefaultInstance()) + return this; + if (other.getEnforcementOutput() != com.google.protobuf.ByteString.EMPTY) { + setEnforcementOutput(other.getEnforcementOutput()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString enforcementOutput_ = + com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+           * Output from enforcement phase output file (if run).
+           * Output size is limited to 100K bytes.
+           * 
+ * + * bytes enforcement_output = 2; + * + * @return The enforcementOutput. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnforcementOutput() { + return enforcementOutput_; + } + /** + * + * + *
+           * Output from enforcement phase output file (if run).
+           * Output size is limited to 100K bytes.
+           * 
+ * + * bytes enforcement_output = 2; + * + * @param value The enforcementOutput to set. + * @return This builder for chaining. + */ + public Builder setEnforcementOutput(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + enforcementOutput_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Output from enforcement phase output file (if run).
+           * Output size is limited to 100K bytes.
+           * 
+ * + * bytes enforcement_output = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnforcementOutput() { + + enforcementOutput_ = getDefaultInstance().getEnforcementOutput(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecResourceOutput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecResourceOutput(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int outputCase_ = 0; + private java.lang.Object output_; + + public enum OutputCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EXEC_RESOURCE_OUTPUT(5), + OUTPUT_NOT_SET(0); + private final int value; + + private OutputCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OutputCase valueOf(int value) { + return forNumber(value); + } + + public static OutputCase forNumber(int value) { + switch (value) { + case 5: + return EXEC_RESOURCE_OUTPUT; + case 0: + return OUTPUT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OutputCase getOutputCase() { + return OutputCase.forNumber(outputCase_); + } + + public static final int OS_POLICY_RESOURCE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object osPolicyResourceId_; + /** + * + * + *
+       * The ID of the OS policy resource.
+       * 
+ * + * string os_policy_resource_id = 1; + * + * @return The osPolicyResourceId. + */ + @java.lang.Override + public java.lang.String getOsPolicyResourceId() { + java.lang.Object ref = osPolicyResourceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyResourceId_ = s; + return s; + } + } + /** + * + * + *
+       * The ID of the OS policy resource.
+       * 
+ * + * string os_policy_resource_id = 1; + * + * @return The bytes for osPolicyResourceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsPolicyResourceIdBytes() { + java.lang.Object ref = osPolicyResourceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyResourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_STEPS_FIELD_NUMBER = 2; + private java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep> + configSteps_; + /** + * + * + *
+       * Ordered list of configuration completed by the agent for the OS policy
+       * resource.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep> + getConfigStepsList() { + return configSteps_; + } + /** + * + * + *
+       * Ordered list of configuration completed by the agent for the OS policy
+       * resource.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStepOrBuilder> + getConfigStepsOrBuilderList() { + return configSteps_; + } + /** + * + * + *
+       * Ordered list of configuration completed by the agent for the OS policy
+       * resource.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + @java.lang.Override + public int getConfigStepsCount() { + return configSteps_.size(); + } + /** + * + * + *
+       * Ordered list of configuration completed by the agent for the OS policy
+       * resource.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + getConfigSteps(int index) { + return configSteps_.get(index); + } + /** + * + * + *
+       * Ordered list of configuration completed by the agent for the OS policy
+       * resource.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStepOrBuilder + getConfigStepsOrBuilder(int index) { + return configSteps_.get(index); + } + + public static final int COMPLIANCE_STATE_FIELD_NUMBER = 3; + private int complianceState_; + /** + * + * + *
+       * The compliance state of the resource.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; + * + * + * @return The enum numeric value on the wire for complianceState. + */ + @java.lang.Override + public int getComplianceStateValue() { + return complianceState_; + } + /** + * + * + *
+       * The compliance state of the resource.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; + * + * + * @return The complianceState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ComplianceState + getComplianceState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ComplianceState + result = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ComplianceState.valueOf(complianceState_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ComplianceState.UNRECOGNIZED + : result; + } + + public static final int COMPLIANCE_STATE_REASON_FIELD_NUMBER = 4; + private volatile java.lang.Object complianceStateReason_; + /** + * + * + *
+       * A reason for the resource to be in the given compliance state.
+       * This field is always populated when `compliance_state` is `UNKNOWN`.
+       * The following values are supported when `compliance_state == UNKNOWN`
+       * * `execution-errors`: Errors were encountered by the agent while
+       * executing the resource and the compliance state couldn't be
+       * determined.
+       * * `execution-skipped-by-agent`: Resource execution was skipped by the
+       * agent because errors were encountered while executing prior resources
+       * in the OS policy.
+       * * `os-policy-execution-attempt-failed`: The execution of the OS policy
+       * containing this resource failed and the compliance state couldn't be
+       * determined.
+       * 
+ * + * string compliance_state_reason = 4; + * + * @return The complianceStateReason. + */ + @java.lang.Override + public java.lang.String getComplianceStateReason() { + java.lang.Object ref = complianceStateReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + complianceStateReason_ = s; + return s; + } + } + /** + * + * + *
+       * A reason for the resource to be in the given compliance state.
+       * This field is always populated when `compliance_state` is `UNKNOWN`.
+       * The following values are supported when `compliance_state == UNKNOWN`
+       * * `execution-errors`: Errors were encountered by the agent while
+       * executing the resource and the compliance state couldn't be
+       * determined.
+       * * `execution-skipped-by-agent`: Resource execution was skipped by the
+       * agent because errors were encountered while executing prior resources
+       * in the OS policy.
+       * * `os-policy-execution-attempt-failed`: The execution of the OS policy
+       * containing this resource failed and the compliance state couldn't be
+       * determined.
+       * 
+ * + * string compliance_state_reason = 4; + * + * @return The bytes for complianceStateReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString getComplianceStateReasonBytes() { + java.lang.Object ref = complianceStateReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + complianceStateReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXEC_RESOURCE_OUTPUT_FIELD_NUMBER = 5; + /** + * + * + *
+       * ExecResource specific output.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + * + * @return Whether the execResourceOutput field is set. + */ + @java.lang.Override + public boolean hasExecResourceOutput() { + return outputCase_ == 5; + } + /** + * + * + *
+       * ExecResource specific output.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + * + * @return The execResourceOutput. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + getExecResourceOutput() { + if (outputCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput) + output_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.getDefaultInstance(); + } + /** + * + * + *
+       * ExecResource specific output.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutputOrBuilder + getExecResourceOutputOrBuilder() { + if (outputCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput) + output_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osPolicyResourceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, osPolicyResourceId_); + } + for (int i = 0; i < configSteps_.size(); i++) { + output.writeMessage(2, configSteps_.get(i)); + } + if (complianceState_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ComplianceState.UNKNOWN + .getNumber()) { + output.writeEnum(3, complianceState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(complianceStateReason_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, complianceStateReason_); + } + if (outputCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput) + output_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osPolicyResourceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, osPolicyResourceId_); + } + for (int i = 0; i < configSteps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, configSteps_.get(i)); + } + if (complianceState_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ComplianceState.UNKNOWN + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, complianceState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(complianceStateReason_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(4, complianceStateReason_); + } + if (outputCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput) + output_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + other = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance) + obj; + + if (!getOsPolicyResourceId().equals(other.getOsPolicyResourceId())) return false; + if (!getConfigStepsList().equals(other.getConfigStepsList())) return false; + if (complianceState_ != other.complianceState_) return false; + if (!getComplianceStateReason().equals(other.getComplianceStateReason())) return false; + if (!getOutputCase().equals(other.getOutputCase())) return false; + switch (outputCase_) { + case 5: + if (!getExecResourceOutput().equals(other.getExecResourceOutput())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OS_POLICY_RESOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyResourceId().hashCode(); + if (getConfigStepsCount() > 0) { + hash = (37 * hash) + CONFIG_STEPS_FIELD_NUMBER; + hash = (53 * hash) + getConfigStepsList().hashCode(); + } + hash = (37 * hash) + COMPLIANCE_STATE_FIELD_NUMBER; + hash = (53 * hash) + complianceState_; + hash = (37 * hash) + COMPLIANCE_STATE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getComplianceStateReason().hashCode(); + switch (outputCase_) { + case 5: + hash = (37 * hash) + EXEC_RESOURCE_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getExecResourceOutput().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Compliance data for an OS policy resource.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance) + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceComplianceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConfigStepsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + osPolicyResourceId_ = ""; + + if (configStepsBuilder_ == null) { + configSteps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + configStepsBuilder_.clear(); + } + complianceState_ = 0; + + complianceStateReason_ = ""; + + outputCase_ = 0; + output_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + build() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + result = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance(this); + int from_bitField0_ = bitField0_; + result.osPolicyResourceId_ = osPolicyResourceId_; + if (configStepsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + configSteps_ = java.util.Collections.unmodifiableList(configSteps_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.configSteps_ = configSteps_; + } else { + result.configSteps_ = configStepsBuilder_.build(); + } + result.complianceState_ = complianceState_; + result.complianceStateReason_ = complianceStateReason_; + if (outputCase_ == 5) { + if (execResourceOutputBuilder_ == null) { + result.output_ = output_; + } else { + result.output_ = execResourceOutputBuilder_.build(); + } + } + result.outputCase_ = outputCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.getDefaultInstance()) return this; + if (!other.getOsPolicyResourceId().isEmpty()) { + osPolicyResourceId_ = other.osPolicyResourceId_; + onChanged(); + } + if (configStepsBuilder_ == null) { + if (!other.configSteps_.isEmpty()) { + if (configSteps_.isEmpty()) { + configSteps_ = other.configSteps_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfigStepsIsMutable(); + configSteps_.addAll(other.configSteps_); + } + onChanged(); + } + } else { + if (!other.configSteps_.isEmpty()) { + if (configStepsBuilder_.isEmpty()) { + configStepsBuilder_.dispose(); + configStepsBuilder_ = null; + configSteps_ = other.configSteps_; + bitField0_ = (bitField0_ & ~0x00000001); + configStepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConfigStepsFieldBuilder() + : null; + } else { + configStepsBuilder_.addAllMessages(other.configSteps_); + } + } + } + if (other.complianceState_ != 0) { + setComplianceStateValue(other.getComplianceStateValue()); + } + if (!other.getComplianceStateReason().isEmpty()) { + complianceStateReason_ = other.complianceStateReason_; + onChanged(); + } + switch (other.getOutputCase()) { + case EXEC_RESOURCE_OUTPUT: + { + mergeExecResourceOutput(other.getExecResourceOutput()); + break; + } + case OUTPUT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int outputCase_ = 0; + private java.lang.Object output_; + + public OutputCase getOutputCase() { + return OutputCase.forNumber(outputCase_); + } + + public Builder clearOutput() { + outputCase_ = 0; + output_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object osPolicyResourceId_ = ""; + /** + * + * + *
+         * The ID of the OS policy resource.
+         * 
+ * + * string os_policy_resource_id = 1; + * + * @return The osPolicyResourceId. + */ + public java.lang.String getOsPolicyResourceId() { + java.lang.Object ref = osPolicyResourceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyResourceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The ID of the OS policy resource.
+         * 
+ * + * string os_policy_resource_id = 1; + * + * @return The bytes for osPolicyResourceId. + */ + public com.google.protobuf.ByteString getOsPolicyResourceIdBytes() { + java.lang.Object ref = osPolicyResourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyResourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The ID of the OS policy resource.
+         * 
+ * + * string os_policy_resource_id = 1; + * + * @param value The osPolicyResourceId to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyResourceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osPolicyResourceId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The ID of the OS policy resource.
+         * 
+ * + * string os_policy_resource_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearOsPolicyResourceId() { + + osPolicyResourceId_ = getDefaultInstance().getOsPolicyResourceId(); + onChanged(); + return this; + } + /** + * + * + *
+         * The ID of the OS policy resource.
+         * 
+ * + * string os_policy_resource_id = 1; + * + * @param value The bytes for osPolicyResourceId to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyResourceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osPolicyResourceId_ = value; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep> + configSteps_ = java.util.Collections.emptyList(); + + private void ensureConfigStepsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + configSteps_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep>(configSteps_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStepOrBuilder> + configStepsBuilder_; + + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep> + getConfigStepsList() { + if (configStepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(configSteps_); + } else { + return configStepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public int getConfigStepsCount() { + if (configStepsBuilder_ == null) { + return configSteps_.size(); + } else { + return configStepsBuilder_.getCount(); + } + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + getConfigSteps(int index) { + if (configStepsBuilder_ == null) { + return configSteps_.get(index); + } else { + return configStepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder setConfigSteps( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + value) { + if (configStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigStepsIsMutable(); + configSteps_.set(index, value); + onChanged(); + } else { + configStepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder setConfigSteps( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Builder + builderForValue) { + if (configStepsBuilder_ == null) { + ensureConfigStepsIsMutable(); + configSteps_.set(index, builderForValue.build()); + onChanged(); + } else { + configStepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder addConfigSteps( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + value) { + if (configStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigStepsIsMutable(); + configSteps_.add(value); + onChanged(); + } else { + configStepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder addConfigSteps( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep + value) { + if (configStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigStepsIsMutable(); + configSteps_.add(index, value); + onChanged(); + } else { + configStepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder addConfigSteps( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Builder + builderForValue) { + if (configStepsBuilder_ == null) { + ensureConfigStepsIsMutable(); + configSteps_.add(builderForValue.build()); + onChanged(); + } else { + configStepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder addConfigSteps( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Builder + builderForValue) { + if (configStepsBuilder_ == null) { + ensureConfigStepsIsMutable(); + configSteps_.add(index, builderForValue.build()); + onChanged(); + } else { + configStepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder addAllConfigSteps( + java.lang.Iterable< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance + .OSPolicyResourceConfigStep> + values) { + if (configStepsBuilder_ == null) { + ensureConfigStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, configSteps_); + onChanged(); + } else { + configStepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder clearConfigSteps() { + if (configStepsBuilder_ == null) { + configSteps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + configStepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder removeConfigSteps(int index) { + if (configStepsBuilder_ == null) { + ensureConfigStepsIsMutable(); + configSteps_.remove(index); + onChanged(); + } else { + configStepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Builder + getConfigStepsBuilder(int index) { + return getConfigStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStepOrBuilder + getConfigStepsOrBuilder(int index) { + if (configStepsBuilder_ == null) { + return configSteps_.get(index); + } else { + return configStepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStepOrBuilder> + getConfigStepsOrBuilderList() { + if (configStepsBuilder_ != null) { + return configStepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configSteps_); + } + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Builder + addConfigStepsBuilder() { + return getConfigStepsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.getDefaultInstance()); + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Builder + addConfigStepsBuilder(int index) { + return getConfigStepsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.getDefaultInstance()); + } + /** + * + * + *
+         * Ordered list of configuration completed by the agent for the OS policy
+         * resource.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Builder> + getConfigStepsBuilderList() { + return getConfigStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStepOrBuilder> + getConfigStepsFieldBuilder() { + if (configStepsBuilder_ == null) { + configStepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.OSPolicyResourceConfigStepOrBuilder>( + configSteps_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + configSteps_ = null; + } + return configStepsBuilder_; + } + + private int complianceState_ = 0; + /** + * + * + *
+         * The compliance state of the resource.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; + * + * + * @return The enum numeric value on the wire for complianceState. + */ + @java.lang.Override + public int getComplianceStateValue() { + return complianceState_; + } + /** + * + * + *
+         * The compliance state of the resource.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; + * + * + * @param value The enum numeric value on the wire for complianceState to set. + * @return This builder for chaining. + */ + public Builder setComplianceStateValue(int value) { + + complianceState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The compliance state of the resource.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; + * + * + * @return The complianceState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ComplianceState + getComplianceState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ComplianceState + result = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ComplianceState.valueOf(complianceState_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ComplianceState.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * The compliance state of the resource.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; + * + * + * @param value The complianceState to set. + * @return This builder for chaining. + */ + public Builder setComplianceState( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ComplianceState + value) { + if (value == null) { + throw new NullPointerException(); + } + + complianceState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * The compliance state of the resource.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearComplianceState() { + + complianceState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object complianceStateReason_ = ""; + /** + * + * + *
+         * A reason for the resource to be in the given compliance state.
+         * This field is always populated when `compliance_state` is `UNKNOWN`.
+         * The following values are supported when `compliance_state == UNKNOWN`
+         * * `execution-errors`: Errors were encountered by the agent while
+         * executing the resource and the compliance state couldn't be
+         * determined.
+         * * `execution-skipped-by-agent`: Resource execution was skipped by the
+         * agent because errors were encountered while executing prior resources
+         * in the OS policy.
+         * * `os-policy-execution-attempt-failed`: The execution of the OS policy
+         * containing this resource failed and the compliance state couldn't be
+         * determined.
+         * 
+ * + * string compliance_state_reason = 4; + * + * @return The complianceStateReason. + */ + public java.lang.String getComplianceStateReason() { + java.lang.Object ref = complianceStateReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + complianceStateReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * A reason for the resource to be in the given compliance state.
+         * This field is always populated when `compliance_state` is `UNKNOWN`.
+         * The following values are supported when `compliance_state == UNKNOWN`
+         * * `execution-errors`: Errors were encountered by the agent while
+         * executing the resource and the compliance state couldn't be
+         * determined.
+         * * `execution-skipped-by-agent`: Resource execution was skipped by the
+         * agent because errors were encountered while executing prior resources
+         * in the OS policy.
+         * * `os-policy-execution-attempt-failed`: The execution of the OS policy
+         * containing this resource failed and the compliance state couldn't be
+         * determined.
+         * 
+ * + * string compliance_state_reason = 4; + * + * @return The bytes for complianceStateReason. + */ + public com.google.protobuf.ByteString getComplianceStateReasonBytes() { + java.lang.Object ref = complianceStateReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + complianceStateReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * A reason for the resource to be in the given compliance state.
+         * This field is always populated when `compliance_state` is `UNKNOWN`.
+         * The following values are supported when `compliance_state == UNKNOWN`
+         * * `execution-errors`: Errors were encountered by the agent while
+         * executing the resource and the compliance state couldn't be
+         * determined.
+         * * `execution-skipped-by-agent`: Resource execution was skipped by the
+         * agent because errors were encountered while executing prior resources
+         * in the OS policy.
+         * * `os-policy-execution-attempt-failed`: The execution of the OS policy
+         * containing this resource failed and the compliance state couldn't be
+         * determined.
+         * 
+ * + * string compliance_state_reason = 4; + * + * @param value The complianceStateReason to set. + * @return This builder for chaining. + */ + public Builder setComplianceStateReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + complianceStateReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * A reason for the resource to be in the given compliance state.
+         * This field is always populated when `compliance_state` is `UNKNOWN`.
+         * The following values are supported when `compliance_state == UNKNOWN`
+         * * `execution-errors`: Errors were encountered by the agent while
+         * executing the resource and the compliance state couldn't be
+         * determined.
+         * * `execution-skipped-by-agent`: Resource execution was skipped by the
+         * agent because errors were encountered while executing prior resources
+         * in the OS policy.
+         * * `os-policy-execution-attempt-failed`: The execution of the OS policy
+         * containing this resource failed and the compliance state couldn't be
+         * determined.
+         * 
+ * + * string compliance_state_reason = 4; + * + * @return This builder for chaining. + */ + public Builder clearComplianceStateReason() { + + complianceStateReason_ = getDefaultInstance().getComplianceStateReason(); + onChanged(); + return this; + } + /** + * + * + *
+         * A reason for the resource to be in the given compliance state.
+         * This field is always populated when `compliance_state` is `UNKNOWN`.
+         * The following values are supported when `compliance_state == UNKNOWN`
+         * * `execution-errors`: Errors were encountered by the agent while
+         * executing the resource and the compliance state couldn't be
+         * determined.
+         * * `execution-skipped-by-agent`: Resource execution was skipped by the
+         * agent because errors were encountered while executing prior resources
+         * in the OS policy.
+         * * `os-policy-execution-attempt-failed`: The execution of the OS policy
+         * containing this resource failed and the compliance state couldn't be
+         * determined.
+         * 
+ * + * string compliance_state_reason = 4; + * + * @param value The bytes for complianceStateReason to set. + * @return This builder for chaining. + */ + public Builder setComplianceStateReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + complianceStateReason_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutputOrBuilder> + execResourceOutputBuilder_; + /** + * + * + *
+         * ExecResource specific output.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + * + * @return Whether the execResourceOutput field is set. + */ + @java.lang.Override + public boolean hasExecResourceOutput() { + return outputCase_ == 5; + } + /** + * + * + *
+         * ExecResource specific output.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + * + * @return The execResourceOutput. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + getExecResourceOutput() { + if (execResourceOutputBuilder_ == null) { + if (outputCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput) + output_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.getDefaultInstance(); + } else { + if (outputCase_ == 5) { + return execResourceOutputBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.getDefaultInstance(); + } + } + /** + * + * + *
+         * ExecResource specific output.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + */ + public Builder setExecResourceOutput( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + value) { + if (execResourceOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + output_ = value; + onChanged(); + } else { + execResourceOutputBuilder_.setMessage(value); + } + outputCase_ = 5; + return this; + } + /** + * + * + *
+         * ExecResource specific output.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + */ + public Builder setExecResourceOutput( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.Builder + builderForValue) { + if (execResourceOutputBuilder_ == null) { + output_ = builderForValue.build(); + onChanged(); + } else { + execResourceOutputBuilder_.setMessage(builderForValue.build()); + } + outputCase_ = 5; + return this; + } + /** + * + * + *
+         * ExecResource specific output.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + */ + public Builder mergeExecResourceOutput( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput + value) { + if (execResourceOutputBuilder_ == null) { + if (outputCase_ == 5 + && output_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.getDefaultInstance()) { + output_ = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput) + output_) + .mergeFrom(value) + .buildPartial(); + } else { + output_ = value; + } + onChanged(); + } else { + if (outputCase_ == 5) { + execResourceOutputBuilder_.mergeFrom(value); + } + execResourceOutputBuilder_.setMessage(value); + } + outputCase_ = 5; + return this; + } + /** + * + * + *
+         * ExecResource specific output.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + */ + public Builder clearExecResourceOutput() { + if (execResourceOutputBuilder_ == null) { + if (outputCase_ == 5) { + outputCase_ = 0; + output_ = null; + onChanged(); + } + } else { + if (outputCase_ == 5) { + outputCase_ = 0; + output_ = null; + } + execResourceOutputBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * ExecResource specific output.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.Builder + getExecResourceOutputBuilder() { + return getExecResourceOutputFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * ExecResource specific output.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutputOrBuilder + getExecResourceOutputOrBuilder() { + if ((outputCase_ == 5) && (execResourceOutputBuilder_ != null)) { + return execResourceOutputBuilder_.getMessageOrBuilder(); + } else { + if (outputCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput) + output_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.getDefaultInstance(); + } + } + /** + * + * + *
+         * ExecResource specific output.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutputOrBuilder> + getExecResourceOutputFieldBuilder() { + if (execResourceOutputBuilder_ == null) { + if (!(outputCase_ == 5)) { + output_ = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.getDefaultInstance(); + } + execResourceOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutputOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.ExecResourceOutput) + output_, + getParentForChildren(), + isClean()); + output_ = null; + } + outputCase_ = 5; + onChanged(); + ; + return execResourceOutputBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance.OSPolicyResourceCompliance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OSPolicyResourceCompliance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OSPolicyResourceCompliance(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int OS_POLICY_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object osPolicyId_; + /** + * + * + *
+     * The OS policy id
+     * 
+ * + * string os_policy_id = 1; + * + * @return The osPolicyId. + */ + @java.lang.Override + public java.lang.String getOsPolicyId() { + java.lang.Object ref = osPolicyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyId_ = s; + return s; + } + } + /** + * + * + *
+     * The OS policy id
+     * 
+ * + * string os_policy_id = 1; + * + * @return The bytes for osPolicyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsPolicyIdBytes() { + java.lang.Object ref = osPolicyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPLIANCE_STATE_FIELD_NUMBER = 2; + private int complianceState_; + /** + * + * + *
+     * The compliance state of the OS policy.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; + * + * + * @return The enum numeric value on the wire for complianceState. + */ + @java.lang.Override + public int getComplianceStateValue() { + return complianceState_; + } + /** + * + * + *
+     * The compliance state of the OS policy.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; + * + * + * @return The complianceState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .ComplianceState + getComplianceState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState + result = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .ComplianceState.valueOf(complianceState_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .ComplianceState.UNRECOGNIZED + : result; + } + + public static final int COMPLIANCE_STATE_REASON_FIELD_NUMBER = 3; + private volatile java.lang.Object complianceStateReason_; + /** + * + * + *
+     * The reason for the OS policy to be in an unknown compliance state.
+     * This field is always populated when `compliance_state` is `UNKNOWN`.
+     * If populated, the field can contain one of the following values:
+     * * `vm-not-running`: The VM was not running.
+     * * `os-policies-not-supported-by-agent`: The version of the OS Config
+     * agent running on the VM does not support running OS policies.
+     * * `no-agent-detected`: The OS Config agent is not detected for the VM.
+     * * `resource-execution-errors`: The OS Config agent encountered errors
+     * while executing one or more resources in the policy. See
+     * `os_policy_resource_compliances` for details.
+     * * `task-timeout`: The task sent to the agent to apply the policy timed
+     * out.
+     * * `unexpected-agent-state`: The OS Config agent did not report the final
+     * status of the task that attempted to apply the policy. Instead, the agent
+     * unexpectedly started working on a different task. This mostly happens
+     * when the agent or VM unexpectedly restarts while applying OS policies.
+     * * `internal-service-errors`: Internal service errors were encountered
+     * while attempting to apply the policy.
+     * 
+ * + * string compliance_state_reason = 3; + * + * @return The complianceStateReason. + */ + @java.lang.Override + public java.lang.String getComplianceStateReason() { + java.lang.Object ref = complianceStateReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + complianceStateReason_ = s; + return s; + } + } + /** + * + * + *
+     * The reason for the OS policy to be in an unknown compliance state.
+     * This field is always populated when `compliance_state` is `UNKNOWN`.
+     * If populated, the field can contain one of the following values:
+     * * `vm-not-running`: The VM was not running.
+     * * `os-policies-not-supported-by-agent`: The version of the OS Config
+     * agent running on the VM does not support running OS policies.
+     * * `no-agent-detected`: The OS Config agent is not detected for the VM.
+     * * `resource-execution-errors`: The OS Config agent encountered errors
+     * while executing one or more resources in the policy. See
+     * `os_policy_resource_compliances` for details.
+     * * `task-timeout`: The task sent to the agent to apply the policy timed
+     * out.
+     * * `unexpected-agent-state`: The OS Config agent did not report the final
+     * status of the task that attempted to apply the policy. Instead, the agent
+     * unexpectedly started working on a different task. This mostly happens
+     * when the agent or VM unexpectedly restarts while applying OS policies.
+     * * `internal-service-errors`: Internal service errors were encountered
+     * while attempting to apply the policy.
+     * 
+ * + * string compliance_state_reason = 3; + * + * @return The bytes for complianceStateReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString getComplianceStateReasonBytes() { + java.lang.Object ref = complianceStateReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + complianceStateReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_POLICY_RESOURCE_COMPLIANCES_FIELD_NUMBER = 4; + private java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance> + osPolicyResourceCompliances_; + /** + * + * + *
+     * Compliance data for each resource within the policy that is applied to
+     * the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance> + getOsPolicyResourceCompliancesList() { + return osPolicyResourceCompliances_; + } + /** + * + * + *
+     * Compliance data for each resource within the policy that is applied to
+     * the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceComplianceOrBuilder> + getOsPolicyResourceCompliancesOrBuilderList() { + return osPolicyResourceCompliances_; + } + /** + * + * + *
+     * Compliance data for each resource within the policy that is applied to
+     * the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + @java.lang.Override + public int getOsPolicyResourceCompliancesCount() { + return osPolicyResourceCompliances_.size(); + } + /** + * + * + *
+     * Compliance data for each resource within the policy that is applied to
+     * the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + getOsPolicyResourceCompliances(int index) { + return osPolicyResourceCompliances_.get(index); + } + /** + * + * + *
+     * Compliance data for each resource within the policy that is applied to
+     * the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceComplianceOrBuilder + getOsPolicyResourceCompliancesOrBuilder(int index) { + return osPolicyResourceCompliances_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osPolicyId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, osPolicyId_); + } + if (complianceState_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .ComplianceState.UNKNOWN + .getNumber()) { + output.writeEnum(2, complianceState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(complianceStateReason_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, complianceStateReason_); + } + for (int i = 0; i < osPolicyResourceCompliances_.size(); i++) { + output.writeMessage(4, osPolicyResourceCompliances_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osPolicyId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, osPolicyId_); + } + if (complianceState_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .ComplianceState.UNKNOWN + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, complianceState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(complianceStateReason_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, complianceStateReason_); + } + for (int i = 0; i < osPolicyResourceCompliances_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, osPolicyResourceCompliances_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance other = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance) obj; + + if (!getOsPolicyId().equals(other.getOsPolicyId())) return false; + if (complianceState_ != other.complianceState_) return false; + if (!getComplianceStateReason().equals(other.getComplianceStateReason())) return false; + if (!getOsPolicyResourceCompliancesList().equals(other.getOsPolicyResourceCompliancesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OS_POLICY_ID_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyId().hashCode(); + hash = (37 * hash) + COMPLIANCE_STATE_FIELD_NUMBER; + hash = (53 * hash) + complianceState_; + hash = (37 * hash) + COMPLIANCE_STATE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getComplianceStateReason().hashCode(); + if (getOsPolicyResourceCompliancesCount() > 0) { + hash = (37 * hash) + OS_POLICY_RESOURCE_COMPLIANCES_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyResourceCompliancesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Compliance data for an OS policy
+     * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance) + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyComplianceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOsPolicyResourceCompliancesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + osPolicyId_ = ""; + + complianceState_ = 0; + + complianceStateReason_ = ""; + + if (osPolicyResourceCompliancesBuilder_ == null) { + osPolicyResourceCompliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + osPolicyResourceCompliancesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance build() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance result = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance(this); + int from_bitField0_ = bitField0_; + result.osPolicyId_ = osPolicyId_; + result.complianceState_ = complianceState_; + result.complianceStateReason_ = complianceStateReason_; + if (osPolicyResourceCompliancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + osPolicyResourceCompliances_ = + java.util.Collections.unmodifiableList(osPolicyResourceCompliances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.osPolicyResourceCompliances_ = osPolicyResourceCompliances_; + } else { + result.osPolicyResourceCompliances_ = osPolicyResourceCompliancesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .getDefaultInstance()) return this; + if (!other.getOsPolicyId().isEmpty()) { + osPolicyId_ = other.osPolicyId_; + onChanged(); + } + if (other.complianceState_ != 0) { + setComplianceStateValue(other.getComplianceStateValue()); + } + if (!other.getComplianceStateReason().isEmpty()) { + complianceStateReason_ = other.complianceStateReason_; + onChanged(); + } + if (osPolicyResourceCompliancesBuilder_ == null) { + if (!other.osPolicyResourceCompliances_.isEmpty()) { + if (osPolicyResourceCompliances_.isEmpty()) { + osPolicyResourceCompliances_ = other.osPolicyResourceCompliances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.addAll(other.osPolicyResourceCompliances_); + } + onChanged(); + } + } else { + if (!other.osPolicyResourceCompliances_.isEmpty()) { + if (osPolicyResourceCompliancesBuilder_.isEmpty()) { + osPolicyResourceCompliancesBuilder_.dispose(); + osPolicyResourceCompliancesBuilder_ = null; + osPolicyResourceCompliances_ = other.osPolicyResourceCompliances_; + bitField0_ = (bitField0_ & ~0x00000001); + osPolicyResourceCompliancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOsPolicyResourceCompliancesFieldBuilder() + : null; + } else { + osPolicyResourceCompliancesBuilder_.addAllMessages( + other.osPolicyResourceCompliances_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object osPolicyId_ = ""; + /** + * + * + *
+       * The OS policy id
+       * 
+ * + * string os_policy_id = 1; + * + * @return The osPolicyId. + */ + public java.lang.String getOsPolicyId() { + java.lang.Object ref = osPolicyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The OS policy id
+       * 
+ * + * string os_policy_id = 1; + * + * @return The bytes for osPolicyId. + */ + public com.google.protobuf.ByteString getOsPolicyIdBytes() { + java.lang.Object ref = osPolicyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The OS policy id
+       * 
+ * + * string os_policy_id = 1; + * + * @param value The osPolicyId to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osPolicyId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The OS policy id
+       * 
+ * + * string os_policy_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearOsPolicyId() { + + osPolicyId_ = getDefaultInstance().getOsPolicyId(); + onChanged(); + return this; + } + /** + * + * + *
+       * The OS policy id
+       * 
+ * + * string os_policy_id = 1; + * + * @param value The bytes for osPolicyId to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osPolicyId_ = value; + onChanged(); + return this; + } + + private int complianceState_ = 0; + /** + * + * + *
+       * The compliance state of the OS policy.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; + * + * + * @return The enum numeric value on the wire for complianceState. + */ + @java.lang.Override + public int getComplianceStateValue() { + return complianceState_; + } + /** + * + * + *
+       * The compliance state of the OS policy.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; + * + * + * @param value The enum numeric value on the wire for complianceState to set. + * @return This builder for chaining. + */ + public Builder setComplianceStateValue(int value) { + + complianceState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The compliance state of the OS policy.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; + * + * + * @return The complianceState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .ComplianceState + getComplianceState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .ComplianceState + result = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .ComplianceState.valueOf(complianceState_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .ComplianceState.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The compliance state of the OS policy.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; + * + * + * @param value The complianceState to set. + * @return This builder for chaining. + */ + public Builder setComplianceState( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .ComplianceState + value) { + if (value == null) { + throw new NullPointerException(); + } + + complianceState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The compliance state of the OS policy.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearComplianceState() { + + complianceState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object complianceStateReason_ = ""; + /** + * + * + *
+       * The reason for the OS policy to be in an unknown compliance state.
+       * This field is always populated when `compliance_state` is `UNKNOWN`.
+       * If populated, the field can contain one of the following values:
+       * * `vm-not-running`: The VM was not running.
+       * * `os-policies-not-supported-by-agent`: The version of the OS Config
+       * agent running on the VM does not support running OS policies.
+       * * `no-agent-detected`: The OS Config agent is not detected for the VM.
+       * * `resource-execution-errors`: The OS Config agent encountered errors
+       * while executing one or more resources in the policy. See
+       * `os_policy_resource_compliances` for details.
+       * * `task-timeout`: The task sent to the agent to apply the policy timed
+       * out.
+       * * `unexpected-agent-state`: The OS Config agent did not report the final
+       * status of the task that attempted to apply the policy. Instead, the agent
+       * unexpectedly started working on a different task. This mostly happens
+       * when the agent or VM unexpectedly restarts while applying OS policies.
+       * * `internal-service-errors`: Internal service errors were encountered
+       * while attempting to apply the policy.
+       * 
+ * + * string compliance_state_reason = 3; + * + * @return The complianceStateReason. + */ + public java.lang.String getComplianceStateReason() { + java.lang.Object ref = complianceStateReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + complianceStateReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The reason for the OS policy to be in an unknown compliance state.
+       * This field is always populated when `compliance_state` is `UNKNOWN`.
+       * If populated, the field can contain one of the following values:
+       * * `vm-not-running`: The VM was not running.
+       * * `os-policies-not-supported-by-agent`: The version of the OS Config
+       * agent running on the VM does not support running OS policies.
+       * * `no-agent-detected`: The OS Config agent is not detected for the VM.
+       * * `resource-execution-errors`: The OS Config agent encountered errors
+       * while executing one or more resources in the policy. See
+       * `os_policy_resource_compliances` for details.
+       * * `task-timeout`: The task sent to the agent to apply the policy timed
+       * out.
+       * * `unexpected-agent-state`: The OS Config agent did not report the final
+       * status of the task that attempted to apply the policy. Instead, the agent
+       * unexpectedly started working on a different task. This mostly happens
+       * when the agent or VM unexpectedly restarts while applying OS policies.
+       * * `internal-service-errors`: Internal service errors were encountered
+       * while attempting to apply the policy.
+       * 
+ * + * string compliance_state_reason = 3; + * + * @return The bytes for complianceStateReason. + */ + public com.google.protobuf.ByteString getComplianceStateReasonBytes() { + java.lang.Object ref = complianceStateReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + complianceStateReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The reason for the OS policy to be in an unknown compliance state.
+       * This field is always populated when `compliance_state` is `UNKNOWN`.
+       * If populated, the field can contain one of the following values:
+       * * `vm-not-running`: The VM was not running.
+       * * `os-policies-not-supported-by-agent`: The version of the OS Config
+       * agent running on the VM does not support running OS policies.
+       * * `no-agent-detected`: The OS Config agent is not detected for the VM.
+       * * `resource-execution-errors`: The OS Config agent encountered errors
+       * while executing one or more resources in the policy. See
+       * `os_policy_resource_compliances` for details.
+       * * `task-timeout`: The task sent to the agent to apply the policy timed
+       * out.
+       * * `unexpected-agent-state`: The OS Config agent did not report the final
+       * status of the task that attempted to apply the policy. Instead, the agent
+       * unexpectedly started working on a different task. This mostly happens
+       * when the agent or VM unexpectedly restarts while applying OS policies.
+       * * `internal-service-errors`: Internal service errors were encountered
+       * while attempting to apply the policy.
+       * 
+ * + * string compliance_state_reason = 3; + * + * @param value The complianceStateReason to set. + * @return This builder for chaining. + */ + public Builder setComplianceStateReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + complianceStateReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The reason for the OS policy to be in an unknown compliance state.
+       * This field is always populated when `compliance_state` is `UNKNOWN`.
+       * If populated, the field can contain one of the following values:
+       * * `vm-not-running`: The VM was not running.
+       * * `os-policies-not-supported-by-agent`: The version of the OS Config
+       * agent running on the VM does not support running OS policies.
+       * * `no-agent-detected`: The OS Config agent is not detected for the VM.
+       * * `resource-execution-errors`: The OS Config agent encountered errors
+       * while executing one or more resources in the policy. See
+       * `os_policy_resource_compliances` for details.
+       * * `task-timeout`: The task sent to the agent to apply the policy timed
+       * out.
+       * * `unexpected-agent-state`: The OS Config agent did not report the final
+       * status of the task that attempted to apply the policy. Instead, the agent
+       * unexpectedly started working on a different task. This mostly happens
+       * when the agent or VM unexpectedly restarts while applying OS policies.
+       * * `internal-service-errors`: Internal service errors were encountered
+       * while attempting to apply the policy.
+       * 
+ * + * string compliance_state_reason = 3; + * + * @return This builder for chaining. + */ + public Builder clearComplianceStateReason() { + + complianceStateReason_ = getDefaultInstance().getComplianceStateReason(); + onChanged(); + return this; + } + /** + * + * + *
+       * The reason for the OS policy to be in an unknown compliance state.
+       * This field is always populated when `compliance_state` is `UNKNOWN`.
+       * If populated, the field can contain one of the following values:
+       * * `vm-not-running`: The VM was not running.
+       * * `os-policies-not-supported-by-agent`: The version of the OS Config
+       * agent running on the VM does not support running OS policies.
+       * * `no-agent-detected`: The OS Config agent is not detected for the VM.
+       * * `resource-execution-errors`: The OS Config agent encountered errors
+       * while executing one or more resources in the policy. See
+       * `os_policy_resource_compliances` for details.
+       * * `task-timeout`: The task sent to the agent to apply the policy timed
+       * out.
+       * * `unexpected-agent-state`: The OS Config agent did not report the final
+       * status of the task that attempted to apply the policy. Instead, the agent
+       * unexpectedly started working on a different task. This mostly happens
+       * when the agent or VM unexpectedly restarts while applying OS policies.
+       * * `internal-service-errors`: Internal service errors were encountered
+       * while attempting to apply the policy.
+       * 
+ * + * string compliance_state_reason = 3; + * + * @param value The bytes for complianceStateReason to set. + * @return This builder for chaining. + */ + public Builder setComplianceStateReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + complianceStateReason_ = value; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance> + osPolicyResourceCompliances_ = java.util.Collections.emptyList(); + + private void ensureOsPolicyResourceCompliancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + osPolicyResourceCompliances_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance>(osPolicyResourceCompliances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceComplianceOrBuilder> + osPolicyResourceCompliancesBuilder_; + + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance> + getOsPolicyResourceCompliancesList() { + if (osPolicyResourceCompliancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(osPolicyResourceCompliances_); + } else { + return osPolicyResourceCompliancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public int getOsPolicyResourceCompliancesCount() { + if (osPolicyResourceCompliancesBuilder_ == null) { + return osPolicyResourceCompliances_.size(); + } else { + return osPolicyResourceCompliancesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + getOsPolicyResourceCompliances(int index) { + if (osPolicyResourceCompliancesBuilder_ == null) { + return osPolicyResourceCompliances_.get(index); + } else { + return osPolicyResourceCompliancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public Builder setOsPolicyResourceCompliances( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + value) { + if (osPolicyResourceCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.set(index, value); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public Builder setOsPolicyResourceCompliances( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.Builder + builderForValue) { + if (osPolicyResourceCompliancesBuilder_ == null) { + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.set(index, builderForValue.build()); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public Builder addOsPolicyResourceCompliances( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + value) { + if (osPolicyResourceCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.add(value); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public Builder addOsPolicyResourceCompliances( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance + value) { + if (osPolicyResourceCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.add(index, value); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public Builder addOsPolicyResourceCompliances( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.Builder + builderForValue) { + if (osPolicyResourceCompliancesBuilder_ == null) { + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.add(builderForValue.build()); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public Builder addOsPolicyResourceCompliances( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.Builder + builderForValue) { + if (osPolicyResourceCompliancesBuilder_ == null) { + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.add(index, builderForValue.build()); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public Builder addAllOsPolicyResourceCompliances( + java.lang.Iterable< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance> + values) { + if (osPolicyResourceCompliancesBuilder_ == null) { + ensureOsPolicyResourceCompliancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, osPolicyResourceCompliances_); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public Builder clearOsPolicyResourceCompliances() { + if (osPolicyResourceCompliancesBuilder_ == null) { + osPolicyResourceCompliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public Builder removeOsPolicyResourceCompliances(int index) { + if (osPolicyResourceCompliancesBuilder_ == null) { + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.remove(index); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.Builder + getOsPolicyResourceCompliancesBuilder(int index) { + return getOsPolicyResourceCompliancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceComplianceOrBuilder + getOsPolicyResourceCompliancesOrBuilder(int index) { + if (osPolicyResourceCompliancesBuilder_ == null) { + return osPolicyResourceCompliances_.get(index); + } else { + return osPolicyResourceCompliancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceComplianceOrBuilder> + getOsPolicyResourceCompliancesOrBuilderList() { + if (osPolicyResourceCompliancesBuilder_ != null) { + return osPolicyResourceCompliancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(osPolicyResourceCompliances_); + } + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.Builder + addOsPolicyResourceCompliancesBuilder() { + return getOsPolicyResourceCompliancesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.getDefaultInstance()); + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.Builder + addOsPolicyResourceCompliancesBuilder(int index) { + return getOsPolicyResourceCompliancesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.getDefaultInstance()); + } + /** + * + * + *
+       * Compliance data for each resource within the policy that is applied to
+       * the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.Builder> + getOsPolicyResourceCompliancesBuilderList() { + return getOsPolicyResourceCompliancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceComplianceOrBuilder> + getOsPolicyResourceCompliancesFieldBuilder() { + if (osPolicyResourceCompliancesBuilder_ == null) { + osPolicyResourceCompliancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceCompliance.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .OSPolicyResourceComplianceOrBuilder>( + osPolicyResourceCompliances_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + osPolicyResourceCompliances_ = null; + } + return osPolicyResourceCompliancesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyCompliance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OSPolicyCompliance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OSPolicyCompliance(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The `OSPolicyAssignmentReport` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The `OSPolicyAssignmentReport` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 2; + private volatile java.lang.Object instance_; + /** + * + * + *
+   * The Compute Engine VM instance name.
+   * 
+ * + * string instance = 2; + * + * @return The instance. + */ + @java.lang.Override + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } + } + /** + * + * + *
+   * The Compute Engine VM instance name.
+   * 
+ * + * string instance = 2; + * + * @return The bytes for instance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_POLICY_ASSIGNMENT_FIELD_NUMBER = 3; + private volatile java.lang.Object osPolicyAssignment_; + /** + * + * + *
+   * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+   * belongs to.
+   * Format:
+   * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+   * 
+ * + * string os_policy_assignment = 3 [(.google.api.resource_reference) = { ... } + * + * @return The osPolicyAssignment. + */ + @java.lang.Override + public java.lang.String getOsPolicyAssignment() { + java.lang.Object ref = osPolicyAssignment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyAssignment_ = s; + return s; + } + } + /** + * + * + *
+   * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+   * belongs to.
+   * Format:
+   * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+   * 
+ * + * string os_policy_assignment = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for osPolicyAssignment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsPolicyAssignmentBytes() { + java.lang.Object ref = osPolicyAssignment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyAssignment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_POLICY_COMPLIANCES_FIELD_NUMBER = 4; + private java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance> + osPolicyCompliances_; + /** + * + * + *
+   * Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance> + getOsPolicyCompliancesList() { + return osPolicyCompliances_; + } + /** + * + * + *
+   * Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyComplianceOrBuilder> + getOsPolicyCompliancesOrBuilderList() { + return osPolicyCompliances_; + } + /** + * + * + *
+   * Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + @java.lang.Override + public int getOsPolicyCompliancesCount() { + return osPolicyCompliances_.size(); + } + /** + * + * + *
+   * Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + getOsPolicyCompliances(int index) { + return osPolicyCompliances_.get(index); + } + /** + * + * + *
+   * Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyComplianceOrBuilder + getOsPolicyCompliancesOrBuilder(int index) { + return osPolicyCompliances_.get(index); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Timestamp for when the report was last generated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Timestamp for when the report was last generated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Timestamp for when the report was last generated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LAST_RUN_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object lastRunId_; + /** + * + * + *
+   * Unique identifier of the last attempted run to apply the OS policies
+   * associated with this assignment on the VM.
+   * This ID is logged by the OS Config agent while applying the OS
+   * policies associated with this assignment on the VM.
+   * NOTE: If the service is unable to successfully connect to the agent for
+   * this run, then this id will not be available in the agent logs.
+   * 
+ * + * string last_run_id = 6; + * + * @return The lastRunId. + */ + @java.lang.Override + public java.lang.String getLastRunId() { + java.lang.Object ref = lastRunId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastRunId_ = s; + return s; + } + } + /** + * + * + *
+   * Unique identifier of the last attempted run to apply the OS policies
+   * associated with this assignment on the VM.
+   * This ID is logged by the OS Config agent while applying the OS
+   * policies associated with this assignment on the VM.
+   * NOTE: If the service is unable to successfully connect to the agent for
+   * this run, then this id will not be available in the agent logs.
+   * 
+ * + * string last_run_id = 6; + * + * @return The bytes for lastRunId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLastRunIdBytes() { + java.lang.Object ref = lastRunId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lastRunId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instance_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osPolicyAssignment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, osPolicyAssignment_); + } + for (int i = 0; i < osPolicyCompliances_.size(); i++) { + output.writeMessage(4, osPolicyCompliances_.get(i)); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastRunId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, lastRunId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instance_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osPolicyAssignment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, osPolicyAssignment_); + } + for (int i = 0; i < osPolicyCompliances_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, osPolicyCompliances_.get(i)); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastRunId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, lastRunId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport other = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport) obj; + + if (!getName().equals(other.getName())) return false; + if (!getInstance().equals(other.getInstance())) return false; + if (!getOsPolicyAssignment().equals(other.getOsPolicyAssignment())) return false; + if (!getOsPolicyCompliancesList().equals(other.getOsPolicyCompliancesList())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getLastRunId().equals(other.getLastRunId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (37 * hash) + OS_POLICY_ASSIGNMENT_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyAssignment().hashCode(); + if (getOsPolicyCompliancesCount() > 0) { + hash = (37 * hash) + OS_POLICY_COMPLIANCES_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyCompliancesList().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + LAST_RUN_ID_FIELD_NUMBER; + hash = (53 * hash) + getLastRunId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A report of the OS policy assignment status for a given instance.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport) + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOsPolicyCompliancesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + instance_ = ""; + + osPolicyAssignment_ = ""; + + if (osPolicyCompliancesBuilder_ == null) { + osPolicyCompliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + osPolicyCompliancesBuilder_.clear(); + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + lastRunId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReportsProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport build() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport result = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.instance_ = instance_; + result.osPolicyAssignment_ = osPolicyAssignment_; + if (osPolicyCompliancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + osPolicyCompliances_ = java.util.Collections.unmodifiableList(osPolicyCompliances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.osPolicyCompliances_ = osPolicyCompliances_; + } else { + result.osPolicyCompliances_ = osPolicyCompliancesBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.lastRunId_ = lastRunId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport other) { + if (other == com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; + onChanged(); + } + if (!other.getOsPolicyAssignment().isEmpty()) { + osPolicyAssignment_ = other.osPolicyAssignment_; + onChanged(); + } + if (osPolicyCompliancesBuilder_ == null) { + if (!other.osPolicyCompliances_.isEmpty()) { + if (osPolicyCompliances_.isEmpty()) { + osPolicyCompliances_ = other.osPolicyCompliances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.addAll(other.osPolicyCompliances_); + } + onChanged(); + } + } else { + if (!other.osPolicyCompliances_.isEmpty()) { + if (osPolicyCompliancesBuilder_.isEmpty()) { + osPolicyCompliancesBuilder_.dispose(); + osPolicyCompliancesBuilder_ = null; + osPolicyCompliances_ = other.osPolicyCompliances_; + bitField0_ = (bitField0_ & ~0x00000001); + osPolicyCompliancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOsPolicyCompliancesFieldBuilder() + : null; + } else { + osPolicyCompliancesBuilder_.addAllMessages(other.osPolicyCompliances_); + } + } + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getLastRunId().isEmpty()) { + lastRunId_ = other.lastRunId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The `OSPolicyAssignmentReport` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The `OSPolicyAssignmentReport` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The `OSPolicyAssignmentReport` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The `OSPolicyAssignmentReport` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The `OSPolicyAssignmentReport` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object instance_ = ""; + /** + * + * + *
+     * The Compute Engine VM instance name.
+     * 
+ * + * string instance = 2; + * + * @return The instance. + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Compute Engine VM instance name.
+     * 
+ * + * string instance = 2; + * + * @return The bytes for instance. + */ + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Compute Engine VM instance name.
+     * 
+ * + * string instance = 2; + * + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine VM instance name.
+     * 
+ * + * string instance = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstance() { + + instance_ = getDefaultInstance().getInstance(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine VM instance name.
+     * 
+ * + * string instance = 2; + * + * @param value The bytes for instance to set. + * @return This builder for chaining. + */ + public Builder setInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instance_ = value; + onChanged(); + return this; + } + + private java.lang.Object osPolicyAssignment_ = ""; + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+     * belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 3 [(.google.api.resource_reference) = { ... } + * + * @return The osPolicyAssignment. + */ + public java.lang.String getOsPolicyAssignment() { + java.lang.Object ref = osPolicyAssignment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyAssignment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+     * belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for osPolicyAssignment. + */ + public com.google.protobuf.ByteString getOsPolicyAssignmentBytes() { + java.lang.Object ref = osPolicyAssignment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyAssignment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+     * belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The osPolicyAssignment to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyAssignment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osPolicyAssignment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+     * belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 3 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearOsPolicyAssignment() { + + osPolicyAssignment_ = getDefaultInstance().getOsPolicyAssignment(); + onChanged(); + return this; + } + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+     * belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for osPolicyAssignment to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyAssignmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osPolicyAssignment_ = value; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance> + osPolicyCompliances_ = java.util.Collections.emptyList(); + + private void ensureOsPolicyCompliancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + osPolicyCompliances_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance>( + osPolicyCompliances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyComplianceOrBuilder> + osPolicyCompliancesBuilder_; + + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance> + getOsPolicyCompliancesList() { + if (osPolicyCompliancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(osPolicyCompliances_); + } else { + return osPolicyCompliancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public int getOsPolicyCompliancesCount() { + if (osPolicyCompliancesBuilder_ == null) { + return osPolicyCompliances_.size(); + } else { + return osPolicyCompliancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + getOsPolicyCompliances(int index) { + if (osPolicyCompliancesBuilder_ == null) { + return osPolicyCompliances_.get(index); + } else { + return osPolicyCompliancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public Builder setOsPolicyCompliances( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance value) { + if (osPolicyCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.set(index, value); + onChanged(); + } else { + osPolicyCompliancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public Builder setOsPolicyCompliances( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.Builder + builderForValue) { + if (osPolicyCompliancesBuilder_ == null) { + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.set(index, builderForValue.build()); + onChanged(); + } else { + osPolicyCompliancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public Builder addOsPolicyCompliances( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance value) { + if (osPolicyCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.add(value); + onChanged(); + } else { + osPolicyCompliancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public Builder addOsPolicyCompliances( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance value) { + if (osPolicyCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.add(index, value); + onChanged(); + } else { + osPolicyCompliancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public Builder addOsPolicyCompliances( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.Builder + builderForValue) { + if (osPolicyCompliancesBuilder_ == null) { + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.add(builderForValue.build()); + onChanged(); + } else { + osPolicyCompliancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public Builder addOsPolicyCompliances( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.Builder + builderForValue) { + if (osPolicyCompliancesBuilder_ == null) { + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.add(index, builderForValue.build()); + onChanged(); + } else { + osPolicyCompliancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public Builder addAllOsPolicyCompliances( + java.lang.Iterable< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance> + values) { + if (osPolicyCompliancesBuilder_ == null) { + ensureOsPolicyCompliancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, osPolicyCompliances_); + onChanged(); + } else { + osPolicyCompliancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public Builder clearOsPolicyCompliances() { + if (osPolicyCompliancesBuilder_ == null) { + osPolicyCompliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + osPolicyCompliancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public Builder removeOsPolicyCompliances(int index) { + if (osPolicyCompliancesBuilder_ == null) { + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.remove(index); + onChanged(); + } else { + osPolicyCompliancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.Builder + getOsPolicyCompliancesBuilder(int index) { + return getOsPolicyCompliancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyComplianceOrBuilder + getOsPolicyCompliancesOrBuilder(int index) { + if (osPolicyCompliancesBuilder_ == null) { + return osPolicyCompliances_.get(index); + } else { + return osPolicyCompliancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyComplianceOrBuilder> + getOsPolicyCompliancesOrBuilderList() { + if (osPolicyCompliancesBuilder_ != null) { + return osPolicyCompliancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(osPolicyCompliances_); + } + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.Builder + addOsPolicyCompliancesBuilder() { + return getOsPolicyCompliancesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .getDefaultInstance()); + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.Builder + addOsPolicyCompliancesBuilder(int index) { + return getOsPolicyCompliancesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .getDefaultInstance()); + } + /** + * + * + *
+     * Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.Builder> + getOsPolicyCompliancesBuilderList() { + return getOsPolicyCompliancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyComplianceOrBuilder> + getOsPolicyCompliancesFieldBuilder() { + if (osPolicyCompliancesBuilder_ == null) { + osPolicyCompliancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + .Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyComplianceOrBuilder>( + osPolicyCompliances_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + osPolicyCompliances_ = null; + } + return osPolicyCompliancesBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Timestamp for when the report was last generated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Timestamp for when the report was last generated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Timestamp for when the report was last generated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Timestamp for when the report was last generated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Timestamp for when the report was last generated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Timestamp for when the report was last generated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Timestamp for when the report was last generated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Timestamp for when the report was last generated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Timestamp for when the report was last generated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object lastRunId_ = ""; + /** + * + * + *
+     * Unique identifier of the last attempted run to apply the OS policies
+     * associated with this assignment on the VM.
+     * This ID is logged by the OS Config agent while applying the OS
+     * policies associated with this assignment on the VM.
+     * NOTE: If the service is unable to successfully connect to the agent for
+     * this run, then this id will not be available in the agent logs.
+     * 
+ * + * string last_run_id = 6; + * + * @return The lastRunId. + */ + public java.lang.String getLastRunId() { + java.lang.Object ref = lastRunId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastRunId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Unique identifier of the last attempted run to apply the OS policies
+     * associated with this assignment on the VM.
+     * This ID is logged by the OS Config agent while applying the OS
+     * policies associated with this assignment on the VM.
+     * NOTE: If the service is unable to successfully connect to the agent for
+     * this run, then this id will not be available in the agent logs.
+     * 
+ * + * string last_run_id = 6; + * + * @return The bytes for lastRunId. + */ + public com.google.protobuf.ByteString getLastRunIdBytes() { + java.lang.Object ref = lastRunId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lastRunId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Unique identifier of the last attempted run to apply the OS policies
+     * associated with this assignment on the VM.
+     * This ID is logged by the OS Config agent while applying the OS
+     * policies associated with this assignment on the VM.
+     * NOTE: If the service is unable to successfully connect to the agent for
+     * this run, then this id will not be available in the agent logs.
+     * 
+ * + * string last_run_id = 6; + * + * @param value The lastRunId to set. + * @return This builder for chaining. + */ + public Builder setLastRunId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + lastRunId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the last attempted run to apply the OS policies
+     * associated with this assignment on the VM.
+     * This ID is logged by the OS Config agent while applying the OS
+     * policies associated with this assignment on the VM.
+     * NOTE: If the service is unable to successfully connect to the agent for
+     * this run, then this id will not be available in the agent logs.
+     * 
+ * + * string last_run_id = 6; + * + * @return This builder for chaining. + */ + public Builder clearLastRunId() { + + lastRunId_ = getDefaultInstance().getLastRunId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the last attempted run to apply the OS policies
+     * associated with this assignment on the VM.
+     * This ID is logged by the OS Config agent while applying the OS
+     * policies associated with this assignment on the VM.
+     * NOTE: If the service is unable to successfully connect to the agent for
+     * this run, then this id will not be available in the agent logs.
+     * 
+ * + * string last_run_id = 6; + * + * @param value The bytes for lastRunId to set. + * @return This builder for chaining. + */ + public Builder setLastRunIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + lastRunId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OSPolicyAssignmentReport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OSPolicyAssignmentReport(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentReportName.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentReportName.java new file mode 100644 index 00000000..d71860be --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentReportName.java @@ -0,0 +1,262 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class OSPolicyAssignmentReportName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE_ASSIGNMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + private final String assignment; + + @Deprecated + protected OSPolicyAssignmentReportName() { + project = null; + location = null; + instance = null; + assignment = null; + } + + private OSPolicyAssignmentReportName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + assignment = Preconditions.checkNotNull(builder.getAssignment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public String getAssignment() { + return assignment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OSPolicyAssignmentReportName of( + String project, String location, String instance, String assignment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .setAssignment(assignment) + .build(); + } + + public static String format(String project, String location, String instance, String assignment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .setAssignment(assignment) + .build() + .toString(); + } + + public static OSPolicyAssignmentReportName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE_ASSIGNMENT.validatedMatch( + formattedString, + "OSPolicyAssignmentReportName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("instance"), + matchMap.get("assignment")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (OSPolicyAssignmentReportName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE_ASSIGNMENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + if (assignment != null) { + fieldMapBuilder.put("assignment", assignment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE_ASSIGNMENT.instantiate( + "project", project, "location", location, "instance", instance, "assignment", assignment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + OSPolicyAssignmentReportName that = ((OSPolicyAssignmentReportName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance) + && Objects.equals(this.assignment, that.assignment); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(instance); + h *= 1000003; + h ^= Objects.hashCode(assignment); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report. + */ + public static class Builder { + private String project; + private String location; + private String instance; + private String assignment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public String getAssignment() { + return assignment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + public Builder setAssignment(String assignment) { + this.assignment = assignment; + return this; + } + + private Builder(OSPolicyAssignmentReportName oSPolicyAssignmentReportName) { + this.project = oSPolicyAssignmentReportName.project; + this.location = oSPolicyAssignmentReportName.location; + this.instance = oSPolicyAssignmentReportName.instance; + this.assignment = oSPolicyAssignmentReportName.assignment; + } + + public OSPolicyAssignmentReportName build() { + return new OSPolicyAssignmentReportName(this); + } + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentReportOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentReportOrBuilder.java new file mode 100644 index 00000000..93602867 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentReportOrBuilder.java @@ -0,0 +1,248 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface OSPolicyAssignmentReportOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The `OSPolicyAssignmentReport` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The `OSPolicyAssignmentReport` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The Compute Engine VM instance name.
+   * 
+ * + * string instance = 2; + * + * @return The instance. + */ + java.lang.String getInstance(); + /** + * + * + *
+   * The Compute Engine VM instance name.
+   * 
+ * + * string instance = 2; + * + * @return The bytes for instance. + */ + com.google.protobuf.ByteString getInstanceBytes(); + + /** + * + * + *
+   * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+   * belongs to.
+   * Format:
+   * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+   * 
+ * + * string os_policy_assignment = 3 [(.google.api.resource_reference) = { ... } + * + * @return The osPolicyAssignment. + */ + java.lang.String getOsPolicyAssignment(); + /** + * + * + *
+   * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+   * belongs to.
+   * Format:
+   * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+   * 
+ * + * string os_policy_assignment = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for osPolicyAssignment. + */ + com.google.protobuf.ByteString getOsPolicyAssignmentBytes(); + + /** + * + * + *
+   * Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + java.util.List + getOsPolicyCompliancesList(); + /** + * + * + *
+   * Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance + getOsPolicyCompliances(int index); + /** + * + * + *
+   * Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + int getOsPolicyCompliancesCount(); + /** + * + * + *
+   * Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport + .OSPolicyComplianceOrBuilder> + getOsPolicyCompliancesOrBuilderList(); + /** + * + * + *
+   * Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyComplianceOrBuilder + getOsPolicyCompliancesOrBuilder(int index); + + /** + * + * + *
+   * Timestamp for when the report was last generated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Timestamp for when the report was last generated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Timestamp for when the report was last generated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Unique identifier of the last attempted run to apply the OS policies
+   * associated with this assignment on the VM.
+   * This ID is logged by the OS Config agent while applying the OS
+   * policies associated with this assignment on the VM.
+   * NOTE: If the service is unable to successfully connect to the agent for
+   * this run, then this id will not be available in the agent logs.
+   * 
+ * + * string last_run_id = 6; + * + * @return The lastRunId. + */ + java.lang.String getLastRunId(); + /** + * + * + *
+   * Unique identifier of the last attempted run to apply the OS policies
+   * associated with this assignment on the VM.
+   * This ID is logged by the OS Config agent while applying the OS
+   * policies associated with this assignment on the VM.
+   * NOTE: If the service is unable to successfully connect to the agent for
+   * this run, then this id will not be available in the agent logs.
+   * 
+ * + * string last_run_id = 6; + * + * @return The bytes for lastRunId. + */ + com.google.protobuf.ByteString getLastRunIdBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentReportsProto.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentReportsProto.java new file mode 100644 index 00000000..301da0a5 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentReportsProto.java @@ -0,0 +1,256 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto + +package com.google.cloud.osconfig.v1alpha; + +public final class OSPolicyAssignmentReportsProto { + private OSPolicyAssignmentReportsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentReportRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentReportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n@google/cloud/osconfig/v1alpha/os_polic" + + "y_assignment_reports.proto\022\035google.cloud" + + ".osconfig.v1alpha\032\034google/api/annotation" + + "s.proto\032\037google/api/field_behavior.proto" + + "\032\031google/api/resource.proto\032\037google/prot" + + "obuf/timestamp.proto\"l\n\"GetOSPolicyAssig" + + "nmentReportRequest\022F\n\004name\030\001 \001(\tB8\340A\002\372A2" + + "\n0osconfig.googleapis.com/OSPolicyAssign" + + "mentReport\"\250\001\n$ListOSPolicyAssignmentRep" + + "ortsRequest\022I\n\006parent\030\001 \001(\tB9\340A\002\372A3\n1com" + + "pute.googleapis.com/InstanceOSPolicyAssi" + + "gnment\022\021\n\tpage_size\030\002 \001(\005\022\016\n\006filter\030\003 \001(" + + "\t\022\022\n\npage_token\030\004 \001(\t\"\237\001\n%ListOSPolicyAs" + + "signmentReportsResponse\022]\n\034os_policy_ass" + + "ignment_reports\030\001 \003(\01327.google.cloud.osc" + + "onfig.v1alpha.OSPolicyAssignmentReport\022\027" + + "\n\017next_page_token\030\002 \001(\t\"\361\016\n\030OSPolicyAssi" + + "gnmentReport\022\014\n\004name\030\001 \001(\t\022\020\n\010instance\030\002" + + " \001(\t\022M\n\024os_policy_assignment\030\003 \001(\tB/\372A,\n" + + "*osconfig.googleapis.com/OSPolicyAssignm" + + "ent\022i\n\025os_policy_compliances\030\004 \003(\0132J.goo" + + "gle.cloud.osconfig.v1alpha.OSPolicyAssig" + + "nmentReport.OSPolicyCompliance\022/\n\013update" + + "_time\030\005 \001(\0132\032.google.protobuf.Timestamp\022" + + "\023\n\013last_run_id\030\006 \001(\t\032\225\013\n\022OSPolicyComplia" + + "nce\022\024\n\014os_policy_id\030\001 \001(\t\022t\n\020compliance_" + + "state\030\002 \001(\0162Z.google.cloud.osconfig.v1al" + + "pha.OSPolicyAssignmentReport.OSPolicyCom" + + "pliance.ComplianceState\022\037\n\027compliance_st" + + "ate_reason\030\003 \001(\t\022\215\001\n\036os_policy_resource_" + + "compliances\030\004 \003(\0132e.google.cloud.osconfi" + + "g.v1alpha.OSPolicyAssignmentReport.OSPol" + + "icyCompliance.OSPolicyResourceCompliance" + + "\032\377\007\n\032OSPolicyResourceCompliance\022\035\n\025os_po" + + "licy_resource_id\030\001 \001(\t\022\227\001\n\014config_steps\030" + + "\002 \003(\0132\200\001.google.cloud.osconfig.v1alpha.O" + + "SPolicyAssignmentReport.OSPolicyComplian" + + "ce.OSPolicyResourceCompliance.OSPolicyRe" + + "sourceConfigStep\022\217\001\n\020compliance_state\030\003 " + + "\001(\0162u.google.cloud.osconfig.v1alpha.OSPo" + + "licyAssignmentReport.OSPolicyCompliance." + + "OSPolicyResourceCompliance.ComplianceSta" + + "te\022\037\n\027compliance_state_reason\030\004 \001(\t\022\230\001\n\024" + + "exec_resource_output\030\005 \001(\0132x.google.clou" + + "d.osconfig.v1alpha.OSPolicyAssignmentRep" + + "ort.OSPolicyCompliance.OSPolicyResourceC" + + "ompliance.ExecResourceOutputH\000\032\333\002\n\032OSPol" + + "icyResourceConfigStep\022\224\001\n\004type\030\001 \001(\0162\205\001." + + "google.cloud.osconfig.v1alpha.OSPolicyAs" + + "signmentReport.OSPolicyCompliance.OSPoli" + + "cyResourceCompliance.OSPolicyResourceCon" + + "figStep.Type\022\025\n\rerror_message\030\002 \001(\t\"\216\001\n\004" + + "Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\016\n\nVALIDATION" + + "\020\001\022\027\n\023DESIRED_STATE_CHECK\020\002\022\035\n\031DESIRED_S" + + "TATE_ENFORCEMENT\020\003\022(\n$DESIRED_STATE_CHEC" + + "K_POST_ENFORCEMENT\020\004\0320\n\022ExecResourceOutp" + + "ut\022\032\n\022enforcement_output\030\002 \001(\014\"@\n\017Compli" + + "anceState\022\013\n\007UNKNOWN\020\000\022\r\n\tCOMPLIANT\020\001\022\021\n" + + "\rNON_COMPLIANT\020\002B\010\n\006output\"@\n\017Compliance" + + "State\022\013\n\007UNKNOWN\020\000\022\r\n\tCOMPLIANT\020\001\022\021\n\rNON" + + "_COMPLIANT\020\002:\234\001\352A\230\001\n0osconfig.googleapis" + + ".com/OSPolicyAssignmentReport\022dprojects/" + + "{project}/locations/{location}/instances" + + "/{instance}/osPolicyAssignments/{assignm" + + "ent}/reportB\205\003\n!com.google.cloud.osconfi" + + "g.v1alphaB\036OSPolicyAssignmentReportsProt" + + "oP\001ZEgoogle.golang.org/genproto/googleap" + + "is/cloud/osconfig/v1alpha;osconfig\252\002\035Goo" + + "gle.Cloud.OsConfig.V1Alpha\312\002\035Google\\Clou" + + "d\\OsConfig\\V1alpha\352\002 Google::Cloud::OsCo" + + "nfig::V1alpha\352A\222\001\n1compute.googleapis.co" + + "m/InstanceOSPolicyAssignment\022]projects/{" + + "project}/locations/{location}/instances/" + + "{instance}/osPolicyAssignments/{assignme" + + "nt}b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentReportRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentReportRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentReportRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "Filter", "PageToken", + }); + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentReportsResponse_descriptor, + new java.lang.String[] { + "OsPolicyAssignmentReports", "NextPageToken", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_descriptor, + new java.lang.String[] { + "Name", + "Instance", + "OsPolicyAssignment", + "OsPolicyCompliances", + "UpdateTime", + "LastRunId", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_descriptor, + new java.lang.String[] { + "OsPolicyId", + "ComplianceState", + "ComplianceStateReason", + "OsPolicyResourceCompliances", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_descriptor, + new java.lang.String[] { + "OsPolicyResourceId", + "ConfigSteps", + "ComplianceState", + "ComplianceStateReason", + "ExecResourceOutput", + "Output", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep_descriptor, + new java.lang.String[] { + "Type", "ErrorMessage", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput_descriptor, + new java.lang.String[] { + "EnforcementOutput", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyComplianceState.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyComplianceState.java index 890f3d82..4753cd62 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyComplianceState.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyComplianceState.java @@ -27,6 +27,7 @@ * * Protobuf enum {@code google.cloud.osconfig.v1alpha.OSPolicyComplianceState} */ +@java.lang.Deprecated public enum OSPolicyComplianceState implements com.google.protobuf.ProtocolMessageEnum { /** * diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceCompliance.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceCompliance.java index 3592c908..016fabd9 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceCompliance.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceCompliance.java @@ -27,6 +27,7 @@ * * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} */ +@java.lang.Deprecated public final class OSPolicyResourceCompliance extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance) @@ -165,6 +166,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.Builder.class); } + @java.lang.Deprecated public interface ExecResourceOutputOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) @@ -194,6 +196,7 @@ public interface ExecResourceOutputOrBuilder * Protobuf type {@code * google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} */ + @java.lang.Deprecated public static final class ExecResourceOutput extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceComplianceOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceComplianceOrBuilder.java index 555e0c0a..baf97d88 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceComplianceOrBuilder.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceComplianceOrBuilder.java @@ -18,6 +18,7 @@ package com.google.cloud.osconfig.v1alpha; +@java.lang.Deprecated public interface OSPolicyResourceComplianceOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance) diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStep.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStep.java index 2c047627..eb89d265 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStep.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStep.java @@ -28,6 +28,7 @@ * * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} */ +@java.lang.Deprecated public final class OSPolicyResourceConfigStep extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep) @@ -137,6 +138,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * Protobuf enum {@code google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type} */ + @java.lang.Deprecated public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** * @@ -350,6 +352,7 @@ private Type(int value) { * * Protobuf enum {@code google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome} */ + @java.lang.Deprecated public enum Outcome implements com.google.protobuf.ProtocolMessageEnum { /** * diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStepOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStepOrBuilder.java index 8f93fc58..b3eca981 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStepOrBuilder.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStepOrBuilder.java @@ -18,6 +18,7 @@ package com.google.cloud.osconfig.v1alpha; +@java.lang.Deprecated public interface OSPolicyResourceConfigStepOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep) diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceProto.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceProto.java index 31d74462..39edb95e 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceProto.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceProto.java @@ -42,98 +42,113 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "esource.proto\032Cgoogle/cloud/osconfig/v1a" + "lpha/instance_os_policies_compliance.pro" + "to\032-google/cloud/osconfig/v1alpha/invent" - + "ory.proto\0329google/cloud/osconfig/v1alpha" - + "/os_policy_assignments.proto\0321google/clo" - + "ud/osconfig/v1alpha/vulnerability.proto\032" - + "#google/longrunning/operations.proto2\324\030\n" - + "\024OsConfigZonalService\022\310\002\n\030CreateOSPolicy" - + "Assignment\022>.google.cloud.osconfig.v1alp" - + "ha.CreateOSPolicyAssignmentRequest\032\035.goo" - + "gle.longrunning.Operation\"\314\001\202\323\344\223\002T\".google.cloud.osc" - + "onfig.v1alpha.UpdateOSPolicyAssignmentRe" - + "quest\032\035.google.longrunning.Operation\"\316\001\202" - + "\323\344\223\002i2Q/v1alpha/{os_policy_assignment.na" - + "me=projects/*/locations/*/osPolicyAssign" - + "ments/*}:\024os_policy_assignment\332A os_poli" - + "cy_assignment,update_mask\312A9\n\022OSPolicyAs" - + "signment\022#OSPolicyAssignmentOperationMet" - + "adata\022\324\001\n\025GetOSPolicyAssignment\022;.google" - + ".cloud.osconfig.v1alpha.GetOSPolicyAssig" - + "nmentRequest\0321.google.cloud.osconfig.v1a" - + "lpha.OSPolicyAssignment\"K\202\323\344\223\002>\022.google" - + ".cloud.osconfig.v1alpha.ListOSPolicyAssi" - + "gnmentsResponse\"M\202\323\344\223\002>\022.goog" - + "le.cloud.osconfig.v1alpha.DeleteOSPolicy" - + "AssignmentRequest\032\035.google.longrunning.O" - + "peration\"\212\001\202\323\344\223\002>*.g" + + "oogle.cloud.osconfig.v1alpha.CreateOSPol" + + "icyAssignmentRequest\032\035.google.longrunnin" + + "g.Operation\"\314\001\202\323\344\223\002T\".google.cloud.osconfig.v1alpha." + + "UpdateOSPolicyAssignmentRequest\032\035.google" + + ".longrunning.Operation\"\316\001\202\323\344\223\002i2Q/v1alph" + + "a/{os_policy_assignment.name=projects/*/" + + "locations/*/osPolicyAssignments/*}:\024os_p" + + "olicy_assignment\332A os_policy_assignment," + + "update_mask\312A9\n\022OSPolicyAssignment\022#OSPo" + + "licyAssignmentOperationMetadata\022\324\001\n\025GetO" + + "SPolicyAssignment\022;.google.cloud.osconfi" + + "g.v1alpha.GetOSPolicyAssignmentRequest\0321" + + ".google.cloud.osconfig.v1alpha.OSPolicyA" + + "ssignment\"K\202\323\344\223\002>\022\022.google.cloud.osconfi" - + "g.v1alpha.ListVulnerabilityReportsReques" - + "t\032?.google.cloud.osconfig.v1alpha.ListVu" - + "lnerabilityReportsResponse\"Z\202\323\344\223\002K\022I/v1a" - + "lpha/{parent=projects/*/locations/*/inst" - + "ances/*}/vulnerabilityReports\332A\006parent\032K" - + "\312A\027osconfig.googleapis.com\322A.https://www" - + ".googleapis.com/auth/cloud-platformB\314\002\n!" - + "com.google.cloud.osconfig.v1alphaB\031OsCon" - + "figZonalServiceProtoP\001ZEgoogle.golang.or" - + "g/genproto/googleapis/cloud/osconfig/v1a" - + "lpha;osconfig\252\002\035Google.Cloud.OsConfig.V1" - + "Alpha\312\002\035Google\\Cloud\\OsConfig\\V1alpha\352\002 " - + "Google::Cloud::OsConfig::V1alpha\352A_\n\037com" - + "pute.googleapis.com/Instance\022.google.cloud.osconfi" + + "g.v1alpha.ListOSPolicyAssignmentsRespons" + + "e\"M\202\323\344\223\002>\022.google.cloud.oscon" + + "fig.v1alpha.DeleteOSPolicyAssignmentRequ" + + "est\032\035.google.longrunning.Operation\"\212\001\202\323\344" + + "\223\002>*\022.google.cloud.osconfig." + + "v1alpha.ListVulnerabilityReportsRequest\032" + + "?.google.cloud.osconfig.v1alpha.ListVuln" + + "erabilityReportsResponse\"Z\202\323\344\223\002K\022I/v1alp" + + "ha/{parent=projects/*/locations/*/instan" + + "ces/*}/vulnerabilityReports\332A\006parent\032K\312A" + + "\027osconfig.googleapis.com\322A.https://www.g" + + "oogleapis.com/auth/cloud-platformB\314\002\n!co" + + "m.google.cloud.osconfig.v1alphaB\031OsConfi" + + "gZonalServiceProtoP\001ZEgoogle.golang.org/" + + "genproto/googleapis/cloud/osconfig/v1alp" + + "ha;osconfig\252\002\035Google.Cloud.OsConfig.V1Al" + + "pha\312\002\035Google\\Cloud\\OsConfig\\V1alpha\352\002 Go" + + "ogle::Cloud::OsConfig::V1alpha\352A_\n\037compu" + + "te.googleapis.com/Instance\022.google.cloud.osconfig.v1alpha.OSPo" - + "licyAssignment.RolloutStateB\003\340A\003\022\025\n\010base" - + "line\030\n \001(\010B\003\340A\003\022\024\n\007deleted\030\013 \001(\010B\003\340A\003\022\030\n" - + "\013reconciling\030\014 \001(\010B\003\340A\003\022\020\n\003uid\030\r \001(\tB\003\340A" - + "\003\032\221\001\n\010LabelSet\022V\n\006labels\030\001 \003(\0132F.google." - + "cloud.osconfig.v1alpha.OSPolicyAssignmen" - + "t.LabelSet.LabelsEntry\032-\n\013LabelsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032\341\001\n\016Instan" - + "ceFilter\022\013\n\003all\030\001 \001(\010\022\026\n\016os_short_names\030" - + "\002 \003(\t\022T\n\020inclusion_labels\030\003 \003(\0132:.google" - + ".cloud.osconfig.v1alpha.OSPolicyAssignme" - + "nt.LabelSet\022T\n\020exclusion_labels\030\004 \003(\0132:." + + "ig.v1alpha\032\034google/api/annotations.proto" + + "\032\037google/api/field_behavior.proto\032\031googl" + + "e/api/resource.proto\032-google/cloud/oscon" + + "fig/v1alpha/os_policy.proto\0323google/clou" + + "d/osconfig/v1alpha/osconfig_common.proto" + + "\032\036google/protobuf/duration.proto\032 google" + + "/protobuf/field_mask.proto\032\037google/proto" + + "buf/timestamp.proto\"\354\013\n\022OSPolicyAssignme" + + "nt\022\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022A\n" + + "\013os_policies\030\003 \003(\0132\'.google.cloud.osconf" + + "ig.v1alpha.OSPolicyB\003\340A\002\022^\n\017instance_fil" + + "ter\030\004 \001(\0132@.google.cloud.osconfig.v1alph" + + "a.OSPolicyAssignment.InstanceFilterB\003\340A\002" + + "\022O\n\007rollout\030\005 \001(\01329.google.cloud.osconfi" + + "g.v1alpha.OSPolicyAssignment.RolloutB\003\340A" + + "\002\022\030\n\013revision_id\030\006 \001(\tB\003\340A\003\022=\n\024revision_" + + "create_time\030\007 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\022\014\n\004etag\030\010 \001(\t\022Z\n\rrollout_stat" + + "e\030\t \001(\0162>.google.cloud.osconfig.v1alpha." + + "OSPolicyAssignment.RolloutStateB\003\340A\003\022\025\n\010" + + "baseline\030\n \001(\010B\003\340A\003\022\024\n\007deleted\030\013 \001(\010B\003\340A" + + "\003\022\030\n\013reconciling\030\014 \001(\010B\003\340A\003\022\020\n\003uid\030\r \001(\t" + + "B\003\340A\003\032\221\001\n\010LabelSet\022V\n\006labels\030\001 \003(\0132F.goo" + + "gle.cloud.osconfig.v1alpha.OSPolicyAssig" + + "nment.LabelSet.LabelsEntry\032-\n\013LabelsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032\203\003\n\016In" + + "stanceFilter\022\013\n\003all\030\001 \001(\010\022\032\n\016os_short_na" + + "mes\030\002 \003(\tB\002\030\001\022T\n\020inclusion_labels\030\003 \003(\0132" + + ":.google.cloud.osconfig.v1alpha.OSPolicy" + + "Assignment.LabelSet\022T\n\020exclusion_labels\030" + + "\004 \003(\0132:.google.cloud.osconfig.v1alpha.OS" + + "PolicyAssignment.LabelSet\022_\n\013inventories" + + "\030\005 \003(\0132J.google.cloud.osconfig.v1alpha.O" + + "SPolicyAssignment.InstanceFilter.Invento" + + "ry\032;\n\tInventory\022\032\n\ros_short_name\030\001 \001(\tB\003" + + "\340A\002\022\022\n\nos_version\030\002 \001(\t\032\223\001\n\007Rollout\022M\n\021d" + + "isruption_budget\030\001 \001(\0132-.google.cloud.os" + + "config.v1alpha.FixedOrPercentB\003\340A\002\0229\n\021mi" + + "n_wait_duration\030\002 \001(\0132\031.google.protobuf." + + "DurationB\003\340A\002\"l\n\014RolloutState\022\035\n\031ROLLOUT" + + "_STATE_UNSPECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\016\n" + + "\nCANCELLING\020\002\022\r\n\tCANCELLED\020\003\022\r\n\tSUCCEEDE" + + "D\020\004:\204\001\352A\200\001\n*osconfig.googleapis.com/OSPo" + + "licyAssignment\022Rprojects/{project}/locat" + + "ions/{location}/osPolicyAssignments/{os_" + + "policy_assignment}\"\352\004\n#OSPolicyAssignmen" + + "tOperationMetadata\022M\n\024os_policy_assignme" + + "nt\030\001 \001(\tB/\372A,\n*osconfig.googleapis.com/O" + + "SPolicyAssignment\022`\n\napi_method\030\002 \001(\0162L." + "google.cloud.osconfig.v1alpha.OSPolicyAs" - + "signment.LabelSet\032\223\001\n\007Rollout\022M\n\021disrupt" - + "ion_budget\030\001 \001(\0132-.google.cloud.osconfig" - + ".v1alpha.FixedOrPercentB\003\340A\002\0229\n\021min_wait" - + "_duration\030\002 \001(\0132\031.google.protobuf.Durati" - + "onB\003\340A\002\"l\n\014RolloutState\022\035\n\031ROLLOUT_STATE" - + "_UNSPECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\016\n\nCANCE" - + "LLING\020\002\022\r\n\tCANCELLED\020\003\022\r\n\tSUCCEEDED\020\004:\204\001" - + "\352A\200\001\n*osconfig.googleapis.com/OSPolicyAs" - + "signment\022Rprojects/{project}/locations/{" - + "location}/osPolicyAssignments/{os_policy" - + "_assignment}\"\352\004\n#OSPolicyAssignmentOpera" - + "tionMetadata\022M\n\024os_policy_assignment\030\001 \001" - + "(\tB/\372A,\n*osconfig.googleapis.com/OSPolic" - + "yAssignment\022`\n\napi_method\030\002 \001(\0162L.google" + + "signmentOperationMetadata.APIMethod\022f\n\rr" + + "ollout_state\030\003 \001(\0162O.google.cloud.osconf" + + "ig.v1alpha.OSPolicyAssignmentOperationMe" + + "tadata.RolloutState\0226\n\022rollout_start_tim" + + "e\030\004 \001(\0132\032.google.protobuf.Timestamp\0227\n\023r" + + "ollout_update_time\030\005 \001(\0132\032.google.protob" + + "uf.Timestamp\"K\n\tAPIMethod\022\032\n\026API_METHOD_" + + "UNSPECIFIED\020\000\022\n\n\006CREATE\020\001\022\n\n\006UPDATE\020\002\022\n\n" + + "\006DELETE\020\003\"l\n\014RolloutState\022\035\n\031ROLLOUT_STA" + + "TE_UNSPECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\016\n\nCAN" + + "CELLING\020\002\022\r\n\tCANCELLED\020\003\022\r\n\tSUCCEEDED\020\004\"" + + "\330\001\n\037CreateOSPolicyAssignmentRequest\0229\n\006p" + + "arent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapi" + + "s.com/Location\022T\n\024os_policy_assignment\030\002" + + " \001(\01321.google.cloud.osconfig.v1alpha.OSP" + + "olicyAssignmentB\003\340A\002\022$\n\027os_policy_assign" + + "ment_id\030\003 \001(\tB\003\340A\002\"\255\001\n\037UpdateOSPolicyAss" + + "ignmentRequest\022T\n\024os_policy_assignment\030\001" + + " \001(\01321.google.cloud.osconfig.v1alpha.OSP" + + "olicyAssignmentB\003\340A\002\0224\n\013update_mask\030\002 \001(" + + "\0132\032.google.protobuf.FieldMaskB\003\340A\001\"`\n\034Ge" + + "tOSPolicyAssignmentRequest\022@\n\004name\030\001 \001(\t" + + "B2\340A\002\372A,\n*osconfig.googleapis.com/OSPoli" + + "cyAssignment\"\202\001\n\036ListOSPolicyAssignments" + + "Request\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locatio" + + "ns.googleapis.com/Location\022\021\n\tpage_size\030" + + "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\214\001\n\037ListOSPoli" + + "cyAssignmentsResponse\022P\n\025os_policy_assig" + + "nments\030\001 \003(\01321.google.cloud.osconfig.v1a" + + "lpha.OSPolicyAssignment\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\"\221\001\n&ListOSPolicyAssignmentRevis" + + "ionsRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*oscon" + + "fig.googleapis.com/OSPolicyAssignment\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\224\001\n" + + "\'ListOSPolicyAssignmentRevisionsResponse" + + "\022P\n\025os_policy_assignments\030\001 \003(\01321.google" + ".cloud.osconfig.v1alpha.OSPolicyAssignme" - + "ntOperationMetadata.APIMethod\022f\n\rrollout" - + "_state\030\003 \001(\0162O.google.cloud.osconfig.v1a" - + "lpha.OSPolicyAssignmentOperationMetadata" - + ".RolloutState\0226\n\022rollout_start_time\030\004 \001(" - + "\0132\032.google.protobuf.Timestamp\0227\n\023rollout" - + "_update_time\030\005 \001(\0132\032.google.protobuf.Tim" - + "estamp\"K\n\tAPIMethod\022\032\n\026API_METHOD_UNSPEC" - + "IFIED\020\000\022\n\n\006CREATE\020\001\022\n\n\006UPDATE\020\002\022\n\n\006DELET" - + "E\020\003\"l\n\014RolloutState\022\035\n\031ROLLOUT_STATE_UNS" - + "PECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\016\n\nCANCELLIN" - + "G\020\002\022\r\n\tCANCELLED\020\003\022\r\n\tSUCCEEDED\020\004\"\330\001\n\037Cr" - + "eateOSPolicyAssignmentRequest\0229\n\006parent\030" - + "\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com/" - + "Location\022T\n\024os_policy_assignment\030\002 \001(\01321" - + ".google.cloud.osconfig.v1alpha.OSPolicyA" - + "ssignmentB\003\340A\002\022$\n\027os_policy_assignment_i" - + "d\030\003 \001(\tB\003\340A\002\"\255\001\n\037UpdateOSPolicyAssignmen" - + "tRequest\022T\n\024os_policy_assignment\030\001 \001(\01321" - + ".google.cloud.osconfig.v1alpha.OSPolicyA" - + "ssignmentB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.go" - + "ogle.protobuf.FieldMaskB\003\340A\001\"`\n\034GetOSPol" - + "icyAssignmentRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372" - + "A,\n*osconfig.googleapis.com/OSPolicyAssi" - + "gnment\"\202\001\n\036ListOSPolicyAssignmentsReques" - + "t\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.goo" - + "gleapis.com/Location\022\021\n\tpage_size\030\002 \001(\005\022" - + "\022\n\npage_token\030\003 \001(\t\"\214\001\n\037ListOSPolicyAssi" - + "gnmentsResponse\022P\n\025os_policy_assignments" - + "\030\001 \003(\01321.google.cloud.osconfig.v1alpha.O" - + "SPolicyAssignment\022\027\n\017next_page_token\030\002 \001" - + "(\t\"\221\001\n&ListOSPolicyAssignmentRevisionsRe" - + "quest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*osconfig.go" - + "ogleapis.com/OSPolicyAssignment\022\021\n\tpage_" - + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\224\001\n\'ListO" - + "SPolicyAssignmentRevisionsResponse\022P\n\025os" - + "_policy_assignments\030\001 \003(\01321.google.cloud" - + ".osconfig.v1alpha.OSPolicyAssignment\022\027\n\017" - + "next_page_token\030\002 \001(\t\"c\n\037DeleteOSPolicyA" - + "ssignmentRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*" - + "osconfig.googleapis.com/OSPolicyAssignme" - + "ntB\344\001\n!com.google.cloud.osconfig.v1alpha" - + "B\023OSPolicyAssignmentsP\001ZEgoogle.golang.o" - + "rg/genproto/googleapis/cloud/osconfig/v1" - + "alpha;osconfig\252\002\035Google.Cloud.OsConfig.V" - + "1Alpha\312\002\035Google\\Cloud\\OsConfig\\V1alpha\352\002" - + " Google::Cloud::OsConfig::V1alphab\006proto" - + "3" + + "nt\022\027\n\017next_page_token\030\002 \001(\t\"c\n\037DeleteOSP" + + "olicyAssignmentRequest\022@\n\004name\030\001 \001(\tB2\340A" + + "\002\372A,\n*osconfig.googleapis.com/OSPolicyAs" + + "signmentB\351\001\n!com.google.cloud.osconfig.v" + + "1alphaB\030OsPolicyAssignmentsProtoP\001ZEgoog" + + "le.golang.org/genproto/googleapis/cloud/" + + "osconfig/v1alpha;osconfig\252\002\035Google.Cloud" + + ".OsConfig.V1Alpha\312\002\035Google\\Cloud\\OsConfi" + + "g\\V1alpha\352\002 Google::Cloud::OsConfig::V1a" + + "lphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.osconfig.v1alpha.OSPolicyProto.getDescriptor(), + com.google.cloud.osconfig.v1alpha.OsPolicyProto.getDescriptor(), com.google.cloud.osconfig.v1alpha.Common.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -212,6 +222,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Rollout", "RevisionId", "RevisionCreateTime", + "Etag", "RolloutState", "Baseline", "Deleted", @@ -246,7 +257,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor, new java.lang.String[] { - "All", "OsShortNames", "InclusionLabels", "ExclusionLabels", + "All", "OsShortNames", "InclusionLabels", "ExclusionLabels", "Inventories", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_Inventory_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_Inventory_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_Inventory_descriptor, + new java.lang.String[] { + "OsShortName", "OsVersion", }); internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_descriptor = internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor @@ -341,9 +362,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.osconfig.v1alpha.OSPolicyProto.getDescriptor(); + com.google.cloud.osconfig.v1alpha.OsPolicyProto.getDescriptor(); com.google.cloud.osconfig.v1alpha.Common.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyProto.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsPolicyProto.java similarity index 71% rename from proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyProto.java rename to proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsPolicyProto.java index 69e85e98..115a5e73 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyProto.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsPolicyProto.java @@ -18,8 +18,8 @@ package com.google.cloud.osconfig.v1alpha; -public final class OSPolicyProto { - private OSPolicyProto() {} +public final class OsPolicyProto { + private OsPolicyProto() {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} @@ -35,6 +35,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_InventoryFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_InventoryFilter_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -129,127 +133,133 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n-google/cloud/osconfig/v1alpha/os_polic" - + "y.proto\022\035google.cloud.osconfig.v1alpha\032\037" - + "google/api/field_behavior.proto\"\351!\n\010OSPo" - + "licy\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\023\n\013description\030\002 \001" - + "(\t\022?\n\004mode\030\003 \001(\0162,.google.cloud.osconfig" - + ".v1alpha.OSPolicy.ModeB\003\340A\002\022S\n\017resource_" - + "groups\030\004 \003(\01325.google.cloud.osconfig.v1a" - + "lpha.OSPolicy.ResourceGroupB\003\340A\002\022%\n\035allo" - + "w_no_resource_group_match\030\005 \001(\010\0325\n\010OSFil" - + "ter\022\025\n\ros_short_name\030\001 \001(\t\022\022\n\nos_version" - + "\030\002 \001(\t\032\342\035\n\010Resource\022\017\n\002id\030\001 \001(\tB\003\340A\002\022O\n\003" - + "pkg\030\002 \001(\0132@.google.cloud.osconfig.v1alph" - + "a.OSPolicy.Resource.PackageResourceH\000\022Y\n" - + "\nrepository\030\003 \001(\0132C.google.cloud.osconfi" - + "g.v1alpha.OSPolicy.Resource.RepositoryRe" - + "sourceH\000\022M\n\004exec\030\004 \001(\0132=.google.cloud.os" - + "config.v1alpha.OSPolicy.Resource.ExecRes" - + "ourceH\000\022M\n\004file\030\005 \001(\0132=.google.cloud.osc" - + "onfig.v1alpha.OSPolicy.Resource.FileReso" - + "urceH\000\032\320\002\n\004File\022N\n\006remote\030\001 \001(\0132<.google" - + ".cloud.osconfig.v1alpha.OSPolicy.Resourc" - + "e.File.RemoteH\000\022H\n\003gcs\030\002 \001(\01329.google.cl" - + "oud.osconfig.v1alpha.OSPolicy.Resource.F" - + "ile.GcsH\000\022\024\n\nlocal_path\030\003 \001(\tH\000\022\026\n\016allow" - + "_insecure\030\004 \001(\010\0323\n\006Remote\022\020\n\003uri\030\001 \001(\tB\003" - + "\340A\002\022\027\n\017sha256_checksum\030\002 \001(\t\032C\n\003Gcs\022\023\n\006b" - + "ucket\030\001 \001(\tB\003\340A\002\022\023\n\006object\030\002 \001(\tB\003\340A\002\022\022\n" - + "\ngeneration\030\003 \001(\003B\006\n\004type\032\331\t\n\017PackageRes" - + "ource\022i\n\rdesired_state\030\001 \001(\0162M.google.cl" - + "oud.osconfig.v1alpha.OSPolicy.Resource.P" - + "ackageResource.DesiredStateB\003\340A\002\022S\n\003apt\030" - + "\002 \001(\0132D.google.cloud.osconfig.v1alpha.OS" - + "Policy.Resource.PackageResource.APTH\000\022S\n" - + "\003deb\030\003 \001(\0132D.google.cloud.osconfig.v1alp" - + "ha.OSPolicy.Resource.PackageResource.Deb" - + "H\000\022S\n\003yum\030\004 \001(\0132D.google.cloud.osconfig." - + "v1alpha.OSPolicy.Resource.PackageResourc" - + "e.YUMH\000\022Y\n\006zypper\030\005 \001(\0132G.google.cloud.o" - + "sconfig.v1alpha.OSPolicy.Resource.Packag" - + "eResource.ZypperH\000\022S\n\003rpm\030\006 \001(\0132D.google" + + "y.proto\022\035google.cloud.osconfig.v1alpha\032\034" + + "google/api/annotations.proto\032\037google/api" + + "/field_behavior.proto\"\204#\n\010OSPolicy\022\017\n\002id" + + "\030\001 \001(\tB\003\340A\002\022\023\n\013description\030\002 \001(\t\022?\n\004mode" + + "\030\003 \001(\0162,.google.cloud.osconfig.v1alpha.O" + + "SPolicy.ModeB\003\340A\002\022S\n\017resource_groups\030\004 \003" + + "(\01325.google.cloud.osconfig.v1alpha.OSPol" + + "icy.ResourceGroupB\003\340A\002\022%\n\035allow_no_resou" + + "rce_group_match\030\005 \001(\010\0325\n\010OSFilter\022\025\n\ros_" + + "short_name\030\001 \001(\t\022\022\n\nos_version\030\002 \001(\t\032A\n\017" + + "InventoryFilter\022\032\n\ros_short_name\030\001 \001(\tB\003" + + "\340A\002\022\022\n\nos_version\030\002 \001(\t\032\342\035\n\010Resource\022\017\n\002" + + "id\030\001 \001(\tB\003\340A\002\022O\n\003pkg\030\002 \001(\0132@.google.clou" + + "d.osconfig.v1alpha.OSPolicy.Resource.Pac" + + "kageResourceH\000\022Y\n\nrepository\030\003 \001(\0132C.goo" + + "gle.cloud.osconfig.v1alpha.OSPolicy.Reso" + + "urce.RepositoryResourceH\000\022M\n\004exec\030\004 \001(\0132" + + "=.google.cloud.osconfig.v1alpha.OSPolicy" + + ".Resource.ExecResourceH\000\022M\n\004file\030\005 \001(\0132=" + + ".google.cloud.osconfig.v1alpha.OSPolicy." + + "Resource.FileResourceH\000\032\320\002\n\004File\022N\n\006remo" + + "te\030\001 \001(\0132<.google.cloud.osconfig.v1alpha" + + ".OSPolicy.Resource.File.RemoteH\000\022H\n\003gcs\030" + + "\002 \001(\01329.google.cloud.osconfig.v1alpha.OS" + + "Policy.Resource.File.GcsH\000\022\024\n\nlocal_path" + + "\030\003 \001(\tH\000\022\026\n\016allow_insecure\030\004 \001(\010\0323\n\006Remo" + + "te\022\020\n\003uri\030\001 \001(\tB\003\340A\002\022\027\n\017sha256_checksum\030" + + "\002 \001(\t\032C\n\003Gcs\022\023\n\006bucket\030\001 \001(\tB\003\340A\002\022\023\n\006obj" + + "ect\030\002 \001(\tB\003\340A\002\022\022\n\ngeneration\030\003 \001(\003B\006\n\004ty" + + "pe\032\331\t\n\017PackageResource\022i\n\rdesired_state\030" + + "\001 \001(\0162M.google.cloud.osconfig.v1alpha.OS" + + "Policy.Resource.PackageResource.DesiredS" + + "tateB\003\340A\002\022S\n\003apt\030\002 \001(\0132D.google.cloud.os" + + "config.v1alpha.OSPolicy.Resource.Package" + + "Resource.APTH\000\022S\n\003deb\030\003 \001(\0132D.google.clo" + + "ud.osconfig.v1alpha.OSPolicy.Resource.Pa" + + "ckageResource.DebH\000\022S\n\003yum\030\004 \001(\0132D.googl" + + "e.cloud.osconfig.v1alpha.OSPolicy.Resour" + + "ce.PackageResource.YUMH\000\022Y\n\006zypper\030\005 \001(\013" + + "2G.google.cloud.osconfig.v1alpha.OSPolic" + + "y.Resource.PackageResource.ZypperH\000\022S\n\003r" + + "pm\030\006 \001(\0132D.google.cloud.osconfig.v1alpha" + + ".OSPolicy.Resource.PackageResource.RPMH\000" + + "\022Y\n\006googet\030\007 \001(\0132G.google.cloud.osconfig" + + ".v1alpha.OSPolicy.Resource.PackageResour" + + "ce.GooGetH\000\022S\n\003msi\030\010 \001(\0132D.google.cloud." + + "osconfig.v1alpha.OSPolicy.Resource.Packa" + + "geResource.MSIH\000\032d\n\003Deb\022J\n\006source\030\001 \001(\0132" + + "5.google.cloud.osconfig.v1alpha.OSPolicy" + + ".Resource.FileB\003\340A\002\022\021\n\tpull_deps\030\002 \001(\010\032\030" + + "\n\003APT\022\021\n\004name\030\001 \001(\tB\003\340A\002\032d\n\003RPM\022J\n\006sourc" + + "e\030\001 \001(\01325.google.cloud.osconfig.v1alpha." + + "OSPolicy.Resource.FileB\003\340A\002\022\021\n\tpull_deps" + + "\030\002 \001(\010\032\030\n\003YUM\022\021\n\004name\030\001 \001(\tB\003\340A\002\032\033\n\006Zypp" + + "er\022\021\n\004name\030\001 \001(\tB\003\340A\002\032\033\n\006GooGet\022\021\n\004name\030" + + "\001 \001(\tB\003\340A\002\032e\n\003MSI\022J\n\006source\030\001 \001(\01325.goog" + + "le.cloud.osconfig.v1alpha.OSPolicy.Resou" + + "rce.FileB\003\340A\002\022\022\n\nproperties\030\002 \003(\t\"I\n\014Des" + + "iredState\022\035\n\031DESIRED_STATE_UNSPECIFIED\020\000" + + "\022\r\n\tINSTALLED\020\001\022\013\n\007REMOVED\020\002B\020\n\016system_p" + + "ackage\032\321\007\n\022RepositoryResource\022`\n\003apt\030\001 \001" + + "(\0132Q.google.cloud.osconfig.v1alpha.OSPol" + + "icy.Resource.RepositoryResource.AptRepos" + + "itoryH\000\022`\n\003yum\030\002 \001(\0132Q.google.cloud.osco" + + "nfig.v1alpha.OSPolicy.Resource.Repositor" + + "yResource.YumRepositoryH\000\022f\n\006zypper\030\003 \001(" + + "\0132T.google.cloud.osconfig.v1alpha.OSPoli" + + "cy.Resource.RepositoryResource.ZypperRep" + + "ositoryH\000\022`\n\003goo\030\004 \001(\0132Q.google.cloud.os" + + "config.v1alpha.OSPolicy.Resource.Reposit" + + "oryResource.GooRepositoryH\000\032\243\002\n\rAptRepos" + + "itory\022x\n\014archive_type\030\001 \001(\0162].google.clo" + + "ud.osconfig.v1alpha.OSPolicy.Resource.Re" + + "positoryResource.AptRepository.ArchiveTy" + + "peB\003\340A\002\022\020\n\003uri\030\002 \001(\tB\003\340A\002\022\031\n\014distributio" + + "n\030\003 \001(\tB\003\340A\002\022\027\n\ncomponents\030\004 \003(\tB\003\340A\002\022\017\n" + + "\007gpg_key\030\005 \001(\t\"A\n\013ArchiveType\022\034\n\030ARCHIVE" + + "_TYPE_UNSPECIFIED\020\000\022\007\n\003DEB\020\001\022\013\n\007DEB_SRC\020" + + "\002\032_\n\rYumRepository\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\024\n\014d" + + "isplay_name\030\002 \001(\t\022\025\n\010base_url\030\003 \001(\tB\003\340A\002" + + "\022\020\n\010gpg_keys\030\004 \003(\t\032b\n\020ZypperRepository\022\017" + + "\n\002id\030\001 \001(\tB\003\340A\002\022\024\n\014display_name\030\002 \001(\t\022\025\n" + + "\010base_url\030\003 \001(\tB\003\340A\002\022\020\n\010gpg_keys\030\004 \003(\t\0324" + + "\n\rGooRepository\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\020\n\003ur" + + "l\030\002 \001(\tB\003\340A\002B\014\n\nrepository\032\215\004\n\014ExecResou" + + "rce\022Y\n\010validate\030\001 \001(\0132B.google.cloud.osc" + + "onfig.v1alpha.OSPolicy.Resource.ExecReso" + + "urce.ExecB\003\340A\002\022S\n\007enforce\030\002 \001(\0132B.google" + ".cloud.osconfig.v1alpha.OSPolicy.Resourc" - + "e.PackageResource.RPMH\000\022Y\n\006googet\030\007 \001(\0132" - + "G.google.cloud.osconfig.v1alpha.OSPolicy" - + ".Resource.PackageResource.GooGetH\000\022S\n\003ms" - + "i\030\010 \001(\0132D.google.cloud.osconfig.v1alpha." - + "OSPolicy.Resource.PackageResource.MSIH\000\032" - + "d\n\003Deb\022J\n\006source\030\001 \001(\01325.google.cloud.os" - + "config.v1alpha.OSPolicy.Resource.FileB\003\340" - + "A\002\022\021\n\tpull_deps\030\002 \001(\010\032\030\n\003APT\022\021\n\004name\030\001 \001" - + "(\tB\003\340A\002\032d\n\003RPM\022J\n\006source\030\001 \001(\01325.google." - + "cloud.osconfig.v1alpha.OSPolicy.Resource" - + ".FileB\003\340A\002\022\021\n\tpull_deps\030\002 \001(\010\032\030\n\003YUM\022\021\n\004" - + "name\030\001 \001(\tB\003\340A\002\032\033\n\006Zypper\022\021\n\004name\030\001 \001(\tB" - + "\003\340A\002\032\033\n\006GooGet\022\021\n\004name\030\001 \001(\tB\003\340A\002\032e\n\003MSI" - + "\022J\n\006source\030\001 \001(\01325.google.cloud.osconfig" - + ".v1alpha.OSPolicy.Resource.FileB\003\340A\002\022\022\n\n" - + "properties\030\002 \003(\t\"I\n\014DesiredState\022\035\n\031DESI" - + "RED_STATE_UNSPECIFIED\020\000\022\r\n\tINSTALLED\020\001\022\013" - + "\n\007REMOVED\020\002B\020\n\016system_package\032\321\007\n\022Reposi" - + "toryResource\022`\n\003apt\030\001 \001(\0132Q.google.cloud" - + ".osconfig.v1alpha.OSPolicy.Resource.Repo" - + "sitoryResource.AptRepositoryH\000\022`\n\003yum\030\002 " - + "\001(\0132Q.google.cloud.osconfig.v1alpha.OSPo" - + "licy.Resource.RepositoryResource.YumRepo" - + "sitoryH\000\022f\n\006zypper\030\003 \001(\0132T.google.cloud." - + "osconfig.v1alpha.OSPolicy.Resource.Repos" - + "itoryResource.ZypperRepositoryH\000\022`\n\003goo\030" - + "\004 \001(\0132Q.google.cloud.osconfig.v1alpha.OS" - + "Policy.Resource.RepositoryResource.GooRe" - + "positoryH\000\032\243\002\n\rAptRepository\022x\n\014archive_" - + "type\030\001 \001(\0162].google.cloud.osconfig.v1alp" - + "ha.OSPolicy.Resource.RepositoryResource." - + "AptRepository.ArchiveTypeB\003\340A\002\022\020\n\003uri\030\002 " - + "\001(\tB\003\340A\002\022\031\n\014distribution\030\003 \001(\tB\003\340A\002\022\027\n\nc" - + "omponents\030\004 \003(\tB\003\340A\002\022\017\n\007gpg_key\030\005 \001(\t\"A\n" - + "\013ArchiveType\022\034\n\030ARCHIVE_TYPE_UNSPECIFIED" - + "\020\000\022\007\n\003DEB\020\001\022\013\n\007DEB_SRC\020\002\032_\n\rYumRepositor" - + "y\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\024\n\014display_name\030\002 \001(\t" - + "\022\025\n\010base_url\030\003 \001(\tB\003\340A\002\022\020\n\010gpg_keys\030\004 \003(" - + "\t\032b\n\020ZypperRepository\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\024" - + "\n\014display_name\030\002 \001(\t\022\025\n\010base_url\030\003 \001(\tB\003" - + "\340A\002\022\020\n\010gpg_keys\030\004 \003(\t\0324\n\rGooRepository\022\021" - + "\n\004name\030\001 \001(\tB\003\340A\002\022\020\n\003url\030\002 \001(\tB\003\340A\002B\014\n\nr" - + "epository\032\215\004\n\014ExecResource\022Y\n\010validate\030\001" - + " \001(\0132B.google.cloud.osconfig.v1alpha.OSP" - + "olicy.Resource.ExecResource.ExecB\003\340A\002\022S\n" - + "\007enforce\030\002 \001(\0132B.google.cloud.osconfig.v" - + "1alpha.OSPolicy.Resource.ExecResource.Ex" - + "ec\032\314\002\n\004Exec\022E\n\004file\030\001 \001(\01325.google.cloud" + + "e.ExecResource.Exec\032\314\002\n\004Exec\022E\n\004file\030\001 \001" + + "(\01325.google.cloud.osconfig.v1alpha.OSPol" + + "icy.Resource.FileH\000\022\020\n\006script\030\002 \001(\tH\000\022\014\n" + + "\004args\030\003 \003(\t\022h\n\013interpreter\030\004 \001(\0162N.googl" + + "e.cloud.osconfig.v1alpha.OSPolicy.Resour" + + "ce.ExecResource.Exec.InterpreterB\003\340A\002\022\030\n" + + "\020output_file_path\030\005 \001(\t\"O\n\013Interpreter\022\033" + + "\n\027INTERPRETER_UNSPECIFIED\020\000\022\010\n\004NONE\020\001\022\t\n" + + "\005SHELL\020\002\022\016\n\nPOWERSHELL\020\003B\010\n\006source\032\326\002\n\014F" + + "ileResource\022E\n\004file\030\001 \001(\01325.google.cloud" + ".osconfig.v1alpha.OSPolicy.Resource.File" - + "H\000\022\020\n\006script\030\002 \001(\tH\000\022\014\n\004args\030\003 \003(\t\022h\n\013in" - + "terpreter\030\004 \001(\0162N.google.cloud.osconfig." - + "v1alpha.OSPolicy.Resource.ExecResource.E" - + "xec.InterpreterB\003\340A\002\022\030\n\020output_file_path" - + "\030\005 \001(\t\"O\n\013Interpreter\022\033\n\027INTERPRETER_UNS" - + "PECIFIED\020\000\022\010\n\004NONE\020\001\022\t\n\005SHELL\020\002\022\016\n\nPOWER" - + "SHELL\020\003B\010\n\006source\032\326\002\n\014FileResource\022E\n\004fi" - + "le\030\001 \001(\01325.google.cloud.osconfig.v1alpha" - + ".OSPolicy.Resource.FileH\000\022\021\n\007content\030\002 \001" - + "(\tH\000\022\021\n\004path\030\003 \001(\tB\003\340A\002\022^\n\005state\030\004 \001(\0162J" - + ".google.cloud.osconfig.v1alpha.OSPolicy." - + "Resource.FileResource.DesiredStateB\003\340A\002\022" - + "\023\n\013permissions\030\005 \001(\t\"Z\n\014DesiredState\022\035\n\031" - + "DESIRED_STATE_UNSPECIFIED\020\000\022\013\n\007PRESENT\020\001" - + "\022\n\n\006ABSENT\020\002\022\022\n\016CONTENTS_MATCH\020\003B\010\n\006sour" - + "ceB\017\n\rresource_type\032\236\001\n\rResourceGroup\022C\n" - + "\tos_filter\030\001 \001(\01320.google.cloud.osconfig" - + ".v1alpha.OSPolicy.OSFilter\022H\n\tresources\030" - + "\002 \003(\01320.google.cloud.osconfig.v1alpha.OS" - + "Policy.ResourceB\003\340A\002\"=\n\004Mode\022\024\n\020MODE_UNS" - + "PECIFIED\020\000\022\016\n\nVALIDATION\020\001\022\017\n\013ENFORCEMEN" - + "T\020\002B\336\001\n!com.google.cloud.osconfig.v1alph" - + "aB\rOSPolicyProtoP\001ZEgoogle.golang.org/ge" - + "nproto/googleapis/cloud/osconfig/v1alpha" - + ";osconfig\252\002\035Google.Cloud.OsConfig.V1Alph" - + "a\312\002\035Google\\Cloud\\OsConfig\\V1alpha\352\002 Goog" - + "le::Cloud::OsConfig::V1alphab\006proto3" + + "H\000\022\021\n\007content\030\002 \001(\tH\000\022\021\n\004path\030\003 \001(\tB\003\340A\002" + + "\022^\n\005state\030\004 \001(\0162J.google.cloud.osconfig." + + "v1alpha.OSPolicy.Resource.FileResource.D" + + "esiredStateB\003\340A\002\022\023\n\013permissions\030\005 \001(\t\"Z\n" + + "\014DesiredState\022\035\n\031DESIRED_STATE_UNSPECIFI" + + "ED\020\000\022\013\n\007PRESENT\020\001\022\n\n\006ABSENT\020\002\022\022\n\016CONTENT" + + "S_MATCH\020\003B\010\n\006sourceB\017\n\rresource_type\032\366\001\n" + + "\rResourceGroup\022G\n\tos_filter\030\001 \001(\01320.goog" + + "le.cloud.osconfig.v1alpha.OSPolicy.OSFil" + + "terB\002\030\001\022R\n\021inventory_filters\030\003 \003(\01327.goo" + + "gle.cloud.osconfig.v1alpha.OSPolicy.Inve" + + "ntoryFilter\022H\n\tresources\030\002 \003(\01320.google." + + "cloud.osconfig.v1alpha.OSPolicy.Resource" + + "B\003\340A\002\"=\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\016\n\nV" + + "ALIDATION\020\001\022\017\n\013ENFORCEMENT\020\002B\336\001\n!com.goo" + + "gle.cloud.osconfig.v1alphaB\rOsPolicyProt" + + "oP\001ZEgoogle.golang.org/genproto/googleap" + + "is/cloud/osconfig/v1alpha;osconfig\252\002\035Goo" + + "gle.Cloud.OsConfig.V1Alpha\312\002\035Google\\Clou" + + "d\\OsConfig\\V1alpha\352\002 Google::Cloud::OsCo" + + "nfig::V1alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), }); internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor = @@ -268,8 +278,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "OsShortName", "OsVersion", }); - internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_InventoryFilter_descriptor = internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_InventoryFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_InventoryFilter_descriptor, + new java.lang.String[] { + "OsShortName", "OsVersion", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor.getNestedTypes().get(2); internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor, @@ -475,18 +493,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "File", "Content", "Path", "State", "Permissions", "Source", }); internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_descriptor = - internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor.getNestedTypes().get(3); internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_descriptor, new java.lang.String[] { - "OsFilter", "Resources", + "OsFilter", "InventoryFilters", "Resources", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); } diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/UpdateOSPolicyAssignmentRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/UpdateOSPolicyAssignmentRequest.java index 7e759bc8..c9f8d8db 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/UpdateOSPolicyAssignmentRequest.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/UpdateOSPolicyAssignmentRequest.java @@ -121,14 +121,14 @@ private UpdateOSPolicyAssignmentRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.class, @@ -433,14 +433,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3 // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.class, @@ -482,7 +482,7 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + return com.google.cloud.osconfig.v1alpha.OsPolicyAssignmentsProto .internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_descriptor; } diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityProto.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityProto.java index 33d8e578..23f5546f 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityProto.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityProto.java @@ -43,6 +43,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Item_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Item_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_osconfig_v1alpha_GetVulnerabilityReportRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -70,86 +74,94 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n1google/cloud/osconfig/v1alpha/vulnerab" + "ility.proto\022\035google.cloud.osconfig.v1alp" - + "ha\032\037google/api/field_behavior.proto\032\031goo" - + "gle/api/resource.proto\032\037google/protobuf/" - + "timestamp.proto\"\357\006\n\023VulnerabilityReport\022" - + "\021\n\004name\030\001 \001(\tB\003\340A\003\022^\n\017vulnerabilities\030\002 " - + "\003(\0132@.google.cloud.osconfig.v1alpha.Vuln" - + "erabilityReport.VulnerabilityB\003\340A\003\0224\n\013up" - + "date_time\030\003 \001(\0132\032.google.protobuf.Timest" - + "ampB\003\340A\003\032\251\004\n\rVulnerability\022Y\n\007details\030\001 " - + "\001(\0132H.google.cloud.osconfig.v1alpha.Vuln" - + "erabilityReport.Vulnerability.Details\022$\n" - + "\034installed_inventory_item_ids\030\002 \003(\t\022$\n\034a" - + "vailable_inventory_item_ids\030\003 \003(\t\022/\n\013cre" - + "ate_time\030\004 \001(\0132\032.google.protobuf.Timesta" - + "mp\022/\n\013update_time\030\005 \001(\0132\032.google.protobu" - + "f.Timestamp\032\216\002\n\007Details\022\013\n\003cve\030\001 \001(\t\022\025\n\r" - + "cvss_v2_score\030\002 \001(\002\0226\n\007cvss_v3\030\003 \001(\0132%.g" - + "oogle.cloud.osconfig.v1alpha.CVSSv3\022\020\n\010s" - + "everity\030\004 \001(\t\022\023\n\013description\030\005 \001(\t\022f\n\nre" - + "ferences\030\006 \003(\0132R.google.cloud.osconfig.v" - + "1alpha.VulnerabilityReport.Vulnerability" - + ".Details.Reference\032\030\n\tReference\022\013\n\003url\030\001" - + " \001(\t:\202\001\352A\177\n+osconfig.googleapis.com/Vuln" - + "erabilityReport\022Pprojects/{project}/loca" - + "tions/{location}/instances/{instance}/vu" - + "lnerabilityReport\"b\n\035GetVulnerabilityRep" - + "ortRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+osconf" - + "ig.googleapis.com/VulnerabilityReport\"\221\001" - + "\n\037ListVulnerabilityReportsRequest\0227\n\006par" - + "ent\030\001 \001(\tB\'\340A\002\372A!\n\037compute.googleapis.co" - + "m/Instance\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_to" - + "ken\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"\216\001\n ListVulner" - + "abilityReportsResponse\022Q\n\025vulnerability_" - + "reports\030\001 \003(\01322.google.cloud.osconfig.v1" - + "alpha.VulnerabilityReport\022\027\n\017next_page_t" - + "oken\030\002 \001(\t\"\335\n\n\006CVSSv3\022\022\n\nbase_score\030\001 \001(" - + "\002\022\034\n\024exploitability_score\030\002 \001(\002\022\024\n\014impac" - + "t_score\030\003 \001(\002\022I\n\rattack_vector\030\005 \001(\01622.g" - + "oogle.cloud.osconfig.v1alpha.CVSSv3.Atta" - + "ckVector\022Q\n\021attack_complexity\030\006 \001(\01626.go" - + "ogle.cloud.osconfig.v1alpha.CVSSv3.Attac" - + "kComplexity\022U\n\023privileges_required\030\007 \001(\016" - + "28.google.cloud.osconfig.v1alpha.CVSSv3." - + "PrivilegesRequired\022O\n\020user_interaction\030\010" - + " \001(\01625.google.cloud.osconfig.v1alpha.CVS" - + "Sv3.UserInteraction\022:\n\005scope\030\t \001(\0162+.goo" - + "gle.cloud.osconfig.v1alpha.CVSSv3.Scope\022" - + "L\n\026confidentiality_impact\030\n \001(\0162,.google" - + ".cloud.osconfig.v1alpha.CVSSv3.Impact\022F\n" - + "\020integrity_impact\030\013 \001(\0162,.google.cloud.o" - + "sconfig.v1alpha.CVSSv3.Impact\022I\n\023availab" - + "ility_impact\030\014 \001(\0162,.google.cloud.osconf" - + "ig.v1alpha.CVSSv3.Impact\"\231\001\n\014AttackVecto" - + "r\022\035\n\031ATTACK_VECTOR_UNSPECIFIED\020\000\022\031\n\025ATTA" - + "CK_VECTOR_NETWORK\020\001\022\032\n\026ATTACK_VECTOR_ADJ" - + "ACENT\020\002\022\027\n\023ATTACK_VECTOR_LOCAL\020\003\022\032\n\026ATTA" - + "CK_VECTOR_PHYSICAL\020\004\"l\n\020AttackComplexity" - + "\022!\n\035ATTACK_COMPLEXITY_UNSPECIFIED\020\000\022\031\n\025A" - + "TTACK_COMPLEXITY_LOW\020\001\022\032\n\026ATTACK_COMPLEX" - + "ITY_HIGH\020\002\"\222\001\n\022PrivilegesRequired\022#\n\037PRI" - + "VILEGES_REQUIRED_UNSPECIFIED\020\000\022\034\n\030PRIVIL" - + "EGES_REQUIRED_NONE\020\001\022\033\n\027PRIVILEGES_REQUI" - + "RED_LOW\020\002\022\034\n\030PRIVILEGES_REQUIRED_HIGH\020\003\"" - + "m\n\017UserInteraction\022 \n\034USER_INTERACTION_U" - + "NSPECIFIED\020\000\022\031\n\025USER_INTERACTION_NONE\020\001\022" - + "\035\n\031USER_INTERACTION_REQUIRED\020\002\"F\n\005Scope\022" - + "\025\n\021SCOPE_UNSPECIFIED\020\000\022\023\n\017SCOPE_UNCHANGE" - + "D\020\001\022\021\n\rSCOPE_CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPA" - + "CT_UNSPECIFIED\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMP" - + "ACT_LOW\020\002\022\017\n\013IMPACT_NONE\020\003B\343\001\n!com.googl" - + "e.cloud.osconfig.v1alphaB\022VulnerabilityP" - + "rotoP\001ZEgoogle.golang.org/genproto/googl" - + "eapis/cloud/osconfig/v1alpha;osconfig\252\002\035" - + "Google.Cloud.OsConfig.V1Alpha\312\002\035Google\\C" - + "loud\\OsConfig\\V1alpha\352\002 Google::Cloud::O" - + "sConfig::V1alphab\006proto3" + + "ha\032\034google/api/annotations.proto\032\037google" + + "/api/field_behavior.proto\032\031google/api/re" + + "source.proto\032\037google/protobuf/timestamp." + + "proto\"\334\010\n\023VulnerabilityReport\022\021\n\004name\030\001 " + + "\001(\tB\003\340A\003\022^\n\017vulnerabilities\030\002 \003(\0132@.goog" + + "le.cloud.osconfig.v1alpha.VulnerabilityR" + + "eport.VulnerabilityB\003\340A\003\0224\n\013update_time\030" + + "\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\032\226" + + "\006\n\rVulnerability\022Y\n\007details\030\001 \001(\0132H.goog" + + "le.cloud.osconfig.v1alpha.VulnerabilityR" + + "eport.Vulnerability.Details\022(\n\034installed" + + "_inventory_item_ids\030\002 \003(\tB\002\030\001\022(\n\034availab" + + "le_inventory_item_ids\030\003 \003(\tB\002\030\001\022/\n\013creat" + + "e_time\030\004 \001(\0132\032.google.protobuf.Timestamp" + + "\022/\n\013update_time\030\005 \001(\0132\032.google.protobuf." + + "Timestamp\022T\n\005items\030\006 \003(\0132E.google.cloud." + + "osconfig.v1alpha.VulnerabilityReport.Vul" + + "nerability.Item\032\236\002\n\007Details\022\013\n\003cve\030\001 \001(\t" + + "\022\025\n\rcvss_v2_score\030\002 \001(\002\0226\n\007cvss_v3\030\003 \001(\013" + + "2%.google.cloud.osconfig.v1alpha.CVSSv3\022" + + "\020\n\010severity\030\004 \001(\t\022\023\n\013description\030\005 \001(\t\022f" + + "\n\nreferences\030\006 \003(\0132R.google.cloud.osconf" + + "ig.v1alpha.VulnerabilityReport.Vulnerabi" + + "lity.Details.Reference\032(\n\tReference\022\013\n\003u" + + "rl\030\001 \001(\t\022\016\n\006source\030\002 \001(\t\032}\n\004Item\022#\n\033inst" + + "alled_inventory_item_id\030\001 \001(\t\022#\n\033availab" + + "le_inventory_item_id\030\002 \001(\t\022\025\n\rfixed_cpe_" + + "uri\030\003 \001(\t\022\024\n\014upstream_fix\030\004 \001(\t:\202\001\352A\177\n+o" + + "sconfig.googleapis.com/VulnerabilityRepo" + + "rt\022Pprojects/{project}/locations/{locati" + + "on}/instances/{instance}/vulnerabilityRe" + + "port\"b\n\035GetVulnerabilityReportRequest\022A\n" + + "\004name\030\001 \001(\tB3\340A\002\372A-\n+osconfig.googleapis" + + ".com/VulnerabilityReport\"\221\001\n\037ListVulnera" + + "bilityReportsRequest\0227\n\006parent\030\001 \001(\tB\'\340A" + + "\002\372A!\n\037compute.googleapis.com/Instance\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006" + + "filter\030\004 \001(\t\"\216\001\n ListVulnerabilityReport" + + "sResponse\022Q\n\025vulnerability_reports\030\001 \003(\013" + + "22.google.cloud.osconfig.v1alpha.Vulnera" + + "bilityReport\022\027\n\017next_page_token\030\002 \001(\t\"\335\n" + + "\n\006CVSSv3\022\022\n\nbase_score\030\001 \001(\002\022\034\n\024exploita" + + "bility_score\030\002 \001(\002\022\024\n\014impact_score\030\003 \001(\002" + + "\022I\n\rattack_vector\030\005 \001(\01622.google.cloud.o" + + "sconfig.v1alpha.CVSSv3.AttackVector\022Q\n\021a" + + "ttack_complexity\030\006 \001(\01626.google.cloud.os" + + "config.v1alpha.CVSSv3.AttackComplexity\022U" + + "\n\023privileges_required\030\007 \001(\01628.google.clo" + + "ud.osconfig.v1alpha.CVSSv3.PrivilegesReq" + + "uired\022O\n\020user_interaction\030\010 \001(\01625.google" + + ".cloud.osconfig.v1alpha.CVSSv3.UserInter" + + "action\022:\n\005scope\030\t \001(\0162+.google.cloud.osc" + + "onfig.v1alpha.CVSSv3.Scope\022L\n\026confidenti" + + "ality_impact\030\n \001(\0162,.google.cloud.osconf" + + "ig.v1alpha.CVSSv3.Impact\022F\n\020integrity_im" + + "pact\030\013 \001(\0162,.google.cloud.osconfig.v1alp" + + "ha.CVSSv3.Impact\022I\n\023availability_impact\030" + + "\014 \001(\0162,.google.cloud.osconfig.v1alpha.CV" + + "SSv3.Impact\"\231\001\n\014AttackVector\022\035\n\031ATTACK_V" + + "ECTOR_UNSPECIFIED\020\000\022\031\n\025ATTACK_VECTOR_NET" + + "WORK\020\001\022\032\n\026ATTACK_VECTOR_ADJACENT\020\002\022\027\n\023AT" + + "TACK_VECTOR_LOCAL\020\003\022\032\n\026ATTACK_VECTOR_PHY" + + "SICAL\020\004\"l\n\020AttackComplexity\022!\n\035ATTACK_CO" + + "MPLEXITY_UNSPECIFIED\020\000\022\031\n\025ATTACK_COMPLEX" + + "ITY_LOW\020\001\022\032\n\026ATTACK_COMPLEXITY_HIGH\020\002\"\222\001" + + "\n\022PrivilegesRequired\022#\n\037PRIVILEGES_REQUI" + + "RED_UNSPECIFIED\020\000\022\034\n\030PRIVILEGES_REQUIRED" + + "_NONE\020\001\022\033\n\027PRIVILEGES_REQUIRED_LOW\020\002\022\034\n\030" + + "PRIVILEGES_REQUIRED_HIGH\020\003\"m\n\017UserIntera" + + "ction\022 \n\034USER_INTERACTION_UNSPECIFIED\020\000\022" + + "\031\n\025USER_INTERACTION_NONE\020\001\022\035\n\031USER_INTER" + + "ACTION_REQUIRED\020\002\"F\n\005Scope\022\025\n\021SCOPE_UNSP" + + "ECIFIED\020\000\022\023\n\017SCOPE_UNCHANGED\020\001\022\021\n\rSCOPE_" + + "CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPACT_UNSPECIFIE" + + "D\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMPACT_LOW\020\002\022\017\n\013" + + "IMPACT_NONE\020\003B\343\001\n!com.google.cloud.oscon" + + "fig.v1alphaB\022VulnerabilityProtoP\001ZEgoogl" + + "e.golang.org/genproto/googleapis/cloud/o" + + "sconfig/v1alpha;osconfig\252\002\035Google.Cloud." + + "OsConfig.V1Alpha\312\002\035Google\\Cloud\\OsConfig" + + "\\V1alpha\352\002 Google::Cloud::OsConfig::V1al" + + "phab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), @@ -175,6 +187,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AvailableInventoryItemIds", "CreateTime", "UpdateTime", + "Items", }); internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_descriptor = internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_descriptor @@ -194,7 +207,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_descriptor, new java.lang.String[] { - "Url", + "Url", "Source", + }); + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Item_descriptor = + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Item_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Item_descriptor, + new java.lang.String[] { + "InstalledInventoryItemId", "AvailableInventoryItemId", "FixedCpeUri", "UpstreamFix", }); internal_static_google_cloud_osconfig_v1alpha_GetVulnerabilityReportRequest_descriptor = getDescriptor().getMessageTypes().get(1); @@ -245,6 +268,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReport.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReport.java index 471b2c40..7939e3b0 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReport.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReport.java @@ -206,10 +206,11 @@ public interface VulnerabilityOrBuilder * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @return A list containing the installedInventoryItemIds. */ + @java.lang.Deprecated java.util.List getInstalledInventoryItemIdsList(); /** * @@ -222,10 +223,11 @@ public interface VulnerabilityOrBuilder * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @return The count of installedInventoryItemIds. */ + @java.lang.Deprecated int getInstalledInventoryItemIdsCount(); /** * @@ -238,11 +240,12 @@ public interface VulnerabilityOrBuilder * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @param index The index of the element to return. * @return The installedInventoryItemIds at the given index. */ + @java.lang.Deprecated java.lang.String getInstalledInventoryItemIds(int index); /** * @@ -255,11 +258,12 @@ public interface VulnerabilityOrBuilder * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @param index The index of the value to return. * @return The bytes of the installedInventoryItemIds at the given index. */ + @java.lang.Deprecated com.google.protobuf.ByteString getInstalledInventoryItemIdsBytes(int index); /** @@ -274,10 +278,11 @@ public interface VulnerabilityOrBuilder * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @return A list containing the availableInventoryItemIds. */ + @java.lang.Deprecated java.util.List getAvailableInventoryItemIdsList(); /** * @@ -291,10 +296,11 @@ public interface VulnerabilityOrBuilder * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @return The count of availableInventoryItemIds. */ + @java.lang.Deprecated int getAvailableInventoryItemIdsCount(); /** * @@ -308,11 +314,12 @@ public interface VulnerabilityOrBuilder * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @param index The index of the element to return. * @return The availableInventoryItemIds at the given index. */ + @java.lang.Deprecated java.lang.String getAvailableInventoryItemIds(int index); /** * @@ -326,11 +333,12 @@ public interface VulnerabilityOrBuilder * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @param index The index of the value to return. * @return The bytes of the availableInventoryItemIds at the given index. */ + @java.lang.Deprecated com.google.protobuf.ByteString getAvailableInventoryItemIdsBytes(int index); /** @@ -402,6 +410,72 @@ public interface VulnerabilityOrBuilder * .google.protobuf.Timestamp update_time = 5; */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+     * List of items affected by the vulnerability.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + java.util.List + getItemsList(); + /** + * + * + *
+     * List of items affected by the vulnerability.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item getItems(int index); + /** + * + * + *
+     * List of items affected by the vulnerability.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + int getItemsCount(); + /** + * + * + *
+     * List of items affected by the vulnerability.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.ItemOrBuilder> + getItemsOrBuilderList(); + /** + * + * + *
+     * List of items affected by the vulnerability.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.ItemOrBuilder + getItemsOrBuilder(int index); } /** * @@ -425,6 +499,7 @@ private Vulnerability(com.google.protobuf.GeneratedMessageV3.Builder builder) private Vulnerability() { installedInventoryItemIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; availableInventoryItemIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + items_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -526,6 +601,22 @@ private Vulnerability( break; } + case 50: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + items_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + .Item>(); + mutable_bitField0_ |= 0x00000004; + } + items_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + .parser(), + extensionRegistry)); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -546,6 +637,9 @@ private Vulnerability( if (((mutable_bitField0_ & 0x00000002) != 0)) { availableInventoryItemIds_ = availableInventoryItemIds_.getUnmodifiableView(); } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + items_ = java.util.Collections.unmodifiableList(items_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -951,6 +1045,31 @@ public interface ReferenceOrBuilder * @return The bytes for url. */ com.google.protobuf.ByteString getUrlBytes(); + + /** + * + * + *
+         * The source of the reference e.g. NVD.
+         * 
+ * + * string source = 2; + * + * @return The source. + */ + java.lang.String getSource(); + /** + * + * + *
+         * The source of the reference e.g. NVD.
+         * 
+ * + * string source = 2; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); } /** * @@ -974,6 +1093,7 @@ private Reference(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Reference() { url_ = ""; + source_ = ""; } @java.lang.Override @@ -1012,6 +1132,13 @@ private Reference( url_ = s; break; } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + source_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -1098,6 +1225,55 @@ public com.google.protobuf.ByteString getUrlBytes() { } } + public static final int SOURCE_FIELD_NUMBER = 2; + private volatile java.lang.Object source_; + /** + * + * + *
+         * The source of the reference e.g. NVD.
+         * 
+ * + * string source = 2; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } + } + /** + * + * + *
+         * The source of the reference e.g. NVD.
+         * 
+ * + * string source = 2; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1116,6 +1292,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); + } unknownFields.writeTo(output); } @@ -1128,6 +1307,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1151,6 +1333,7 @@ public boolean equals(final java.lang.Object obj) { obj; if (!getUrl().equals(other.getUrl())) return false; + if (!getSource().equals(other.getSource())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1164,6 +1347,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + URL_FIELD_NUMBER; hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1342,6 +1527,8 @@ public Builder clear() { super.clear(); url_ = ""; + source_ = ""; + return this; } @@ -1380,6 +1567,7 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { new com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details .Reference(this); result.url_ = url_; + result.source_ = source_; onBuilt(); return result; } @@ -1445,6 +1633,10 @@ public Builder mergeFrom( url_ = other.url_; onChanged(); } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1584,6 +1776,112 @@ public Builder setUrlBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object source_ = ""; + /** + * + * + *
+           * The source of the reference e.g. NVD.
+           * 
+ * + * string source = 2; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * The source of the reference e.g. NVD.
+           * 
+ * + * string source = 2; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * The source of the reference e.g. NVD.
+           * 
+ * + * string source = 2; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * The source of the reference e.g. NVD.
+           * 
+ * + * string source = 2; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * + * + *
+           * The source of the reference e.g. NVD.
+           * 
+ * + * string source = 2; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + source_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -3503,66 +3801,1456 @@ public com.google.protobuf.Parser
getParserForType() { } } - public static final int DETAILS_FIELD_NUMBER = 1; - private com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details_; - /** - * - * - *
-     * Contains metadata as per the upstream feed of the operating system and
-     * NVD.
-     * 
- * - * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; - * - * - * @return Whether the details field is set. - */ - @java.lang.Override - public boolean hasDetails() { - return details_ != null; - } - /** - * - * - *
-     * Contains metadata as per the upstream feed of the operating system and
-     * NVD.
-     * 
- * - * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; - * - * - * @return The details. - */ - @java.lang.Override - public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - getDetails() { - return details_ == null - ? com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details - .getDefaultInstance() - : details_; - } - /** - * - * - *
-     * Contains metadata as per the upstream feed of the operating system and
-     * NVD.
-     * 
- * - * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; - * - */ - @java.lang.Override - public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.DetailsOrBuilder - getDetailsOrBuilder() { - return getDetails(); - } + public interface ItemOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item) + com.google.protobuf.MessageOrBuilder { - public static final int INSTALLED_INVENTORY_ITEM_IDS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList installedInventoryItemIds_; - /** + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some
+       * operating systems, this field might be empty.
+       * 
+ * + * string installed_inventory_item_id = 1; + * + * @return The installedInventoryItemId. + */ + java.lang.String getInstalledInventoryItemId(); + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some
+       * operating systems, this field might be empty.
+       * 
+ * + * string installed_inventory_item_id = 1; + * + * @return The bytes for installedInventoryItemId. + */ + com.google.protobuf.ByteString getInstalledInventoryItemIdBytes(); + + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * string available_inventory_item_id = 2; + * + * @return The availableInventoryItemId. + */ + java.lang.String getAvailableInventoryItemId(); + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * string available_inventory_item_id = 2; + * + * @return The bytes for availableInventoryItemId. + */ + com.google.protobuf.ByteString getAvailableInventoryItemIdBytes(); + + /** + * + * + *
+       * The recommended [CPE URI](https://cpe.mitre.org/specification/) update
+       * that contains a fix for this vulnerability.
+       * 
+ * + * string fixed_cpe_uri = 3; + * + * @return The fixedCpeUri. + */ + java.lang.String getFixedCpeUri(); + /** + * + * + *
+       * The recommended [CPE URI](https://cpe.mitre.org/specification/) update
+       * that contains a fix for this vulnerability.
+       * 
+ * + * string fixed_cpe_uri = 3; + * + * @return The bytes for fixedCpeUri. + */ + com.google.protobuf.ByteString getFixedCpeUriBytes(); + + /** + * + * + *
+       * The upstream OS patch, packages or KB that fixes the vulnerability.
+       * 
+ * + * string upstream_fix = 4; + * + * @return The upstreamFix. + */ + java.lang.String getUpstreamFix(); + /** + * + * + *
+       * The upstream OS patch, packages or KB that fixes the vulnerability.
+       * 
+ * + * string upstream_fix = 4; + * + * @return The bytes for upstreamFix. + */ + com.google.protobuf.ByteString getUpstreamFixBytes(); + } + /** + * + * + *
+     * OS inventory item that is affected by a vulnerability or fixed as a
+     * result of a vulnerability.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item} + */ + public static final class Item extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item) + ItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use Item.newBuilder() to construct. + private Item(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Item() { + installedInventoryItemId_ = ""; + availableInventoryItemId_ = ""; + fixedCpeUri_ = ""; + upstreamFix_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Item(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Item( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + installedInventoryItemId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + availableInventoryItemId_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + fixedCpeUri_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + upstreamFix_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Item_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Item_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.class, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.Builder + .class); + } + + public static final int INSTALLED_INVENTORY_ITEM_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object installedInventoryItemId_; + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some
+       * operating systems, this field might be empty.
+       * 
+ * + * string installed_inventory_item_id = 1; + * + * @return The installedInventoryItemId. + */ + @java.lang.Override + public java.lang.String getInstalledInventoryItemId() { + java.lang.Object ref = installedInventoryItemId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + installedInventoryItemId_ = s; + return s; + } + } + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some
+       * operating systems, this field might be empty.
+       * 
+ * + * string installed_inventory_item_id = 1; + * + * @return The bytes for installedInventoryItemId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstalledInventoryItemIdBytes() { + java.lang.Object ref = installedInventoryItemId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + installedInventoryItemId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVAILABLE_INVENTORY_ITEM_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object availableInventoryItemId_; + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * string available_inventory_item_id = 2; + * + * @return The availableInventoryItemId. + */ + @java.lang.Override + public java.lang.String getAvailableInventoryItemId() { + java.lang.Object ref = availableInventoryItemId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + availableInventoryItemId_ = s; + return s; + } + } + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * string available_inventory_item_id = 2; + * + * @return The bytes for availableInventoryItemId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAvailableInventoryItemIdBytes() { + java.lang.Object ref = availableInventoryItemId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + availableInventoryItemId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIXED_CPE_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object fixedCpeUri_; + /** + * + * + *
+       * The recommended [CPE URI](https://cpe.mitre.org/specification/) update
+       * that contains a fix for this vulnerability.
+       * 
+ * + * string fixed_cpe_uri = 3; + * + * @return The fixedCpeUri. + */ + @java.lang.Override + public java.lang.String getFixedCpeUri() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedCpeUri_ = s; + return s; + } + } + /** + * + * + *
+       * The recommended [CPE URI](https://cpe.mitre.org/specification/) update
+       * that contains a fix for this vulnerability.
+       * 
+ * + * string fixed_cpe_uri = 3; + * + * @return The bytes for fixedCpeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFixedCpeUriBytes() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fixedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPSTREAM_FIX_FIELD_NUMBER = 4; + private volatile java.lang.Object upstreamFix_; + /** + * + * + *
+       * The upstream OS patch, packages or KB that fixes the vulnerability.
+       * 
+ * + * string upstream_fix = 4; + * + * @return The upstreamFix. + */ + @java.lang.Override + public java.lang.String getUpstreamFix() { + java.lang.Object ref = upstreamFix_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + upstreamFix_ = s; + return s; + } + } + /** + * + * + *
+       * The upstream OS patch, packages or KB that fixes the vulnerability.
+       * 
+ * + * string upstream_fix = 4; + * + * @return The bytes for upstreamFix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUpstreamFixBytes() { + java.lang.Object ref = upstreamFix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + upstreamFix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(installedInventoryItemId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, installedInventoryItemId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(availableInventoryItemId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, availableInventoryItemId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, fixedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(upstreamFix_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, upstreamFix_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(installedInventoryItemId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 1, installedInventoryItemId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(availableInventoryItemId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 2, availableInventoryItemId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fixedCpeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, fixedCpeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(upstreamFix_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, upstreamFix_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item other = + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item) obj; + + if (!getInstalledInventoryItemId().equals(other.getInstalledInventoryItemId())) + return false; + if (!getAvailableInventoryItemId().equals(other.getAvailableInventoryItemId())) + return false; + if (!getFixedCpeUri().equals(other.getFixedCpeUri())) return false; + if (!getUpstreamFix().equals(other.getUpstreamFix())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INSTALLED_INVENTORY_ITEM_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstalledInventoryItemId().hashCode(); + hash = (37 * hash) + AVAILABLE_INVENTORY_ITEM_ID_FIELD_NUMBER; + hash = (53 * hash) + getAvailableInventoryItemId().hashCode(); + hash = (37 * hash) + FIXED_CPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getFixedCpeUri().hashCode(); + hash = (37 * hash) + UPSTREAM_FIX_FIELD_NUMBER; + hash = (53 * hash) + getUpstreamFix().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * OS inventory item that is affected by a vulnerability or fixed as a
+       * result of a vulnerability.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item) + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.ItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Item_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Item_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.class, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + installedInventoryItemId_ = ""; + + availableInventoryItemId_ = ""; + + fixedCpeUri_ = ""; + + upstreamFix_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Item_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item build() { + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + buildPartial() { + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item result = + new com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item(this); + result.installedInventoryItemId_ = installedInventoryItemId_; + result.availableInventoryItemId_ = availableInventoryItemId_; + result.fixedCpeUri_ = fixedCpeUri_; + result.upstreamFix_ = upstreamFix_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item other) { + if (other + == com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + .getDefaultInstance()) return this; + if (!other.getInstalledInventoryItemId().isEmpty()) { + installedInventoryItemId_ = other.installedInventoryItemId_; + onChanged(); + } + if (!other.getAvailableInventoryItemId().isEmpty()) { + availableInventoryItemId_ = other.availableInventoryItemId_; + onChanged(); + } + if (!other.getFixedCpeUri().isEmpty()) { + fixedCpeUri_ = other.fixedCpeUri_; + onChanged(); + } + if (!other.getUpstreamFix().isEmpty()) { + upstreamFix_ = other.upstreamFix_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object installedInventoryItemId_ = ""; + /** + * + * + *
+         * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+         * This field displays the inventory items affected by this vulnerability.
+         * If the vulnerability report was not updated after the VM inventory
+         * update, these values might not display in VM inventory. For some
+         * operating systems, this field might be empty.
+         * 
+ * + * string installed_inventory_item_id = 1; + * + * @return The installedInventoryItemId. + */ + public java.lang.String getInstalledInventoryItemId() { + java.lang.Object ref = installedInventoryItemId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + installedInventoryItemId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+         * This field displays the inventory items affected by this vulnerability.
+         * If the vulnerability report was not updated after the VM inventory
+         * update, these values might not display in VM inventory. For some
+         * operating systems, this field might be empty.
+         * 
+ * + * string installed_inventory_item_id = 1; + * + * @return The bytes for installedInventoryItemId. + */ + public com.google.protobuf.ByteString getInstalledInventoryItemIdBytes() { + java.lang.Object ref = installedInventoryItemId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + installedInventoryItemId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+         * This field displays the inventory items affected by this vulnerability.
+         * If the vulnerability report was not updated after the VM inventory
+         * update, these values might not display in VM inventory. For some
+         * operating systems, this field might be empty.
+         * 
+ * + * string installed_inventory_item_id = 1; + * + * @param value The installedInventoryItemId to set. + * @return This builder for chaining. + */ + public Builder setInstalledInventoryItemId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + installedInventoryItemId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+         * This field displays the inventory items affected by this vulnerability.
+         * If the vulnerability report was not updated after the VM inventory
+         * update, these values might not display in VM inventory. For some
+         * operating systems, this field might be empty.
+         * 
+ * + * string installed_inventory_item_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearInstalledInventoryItemId() { + + installedInventoryItemId_ = getDefaultInstance().getInstalledInventoryItemId(); + onChanged(); + return this; + } + /** + * + * + *
+         * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+         * This field displays the inventory items affected by this vulnerability.
+         * If the vulnerability report was not updated after the VM inventory
+         * update, these values might not display in VM inventory. For some
+         * operating systems, this field might be empty.
+         * 
+ * + * string installed_inventory_item_id = 1; + * + * @param value The bytes for installedInventoryItemId to set. + * @return This builder for chaining. + */ + public Builder setInstalledInventoryItemIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + installedInventoryItemId_ = value; + onChanged(); + return this; + } + + private java.lang.Object availableInventoryItemId_ = ""; + /** + * + * + *
+         * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+         * If the vulnerability report was not updated after the VM inventory
+         * update, these values might not display in VM inventory. If there is no
+         * available fix, the field is empty. The `inventory_item` value specifies
+         * the latest `SoftwarePackage` available to the VM that fixes the
+         * vulnerability.
+         * 
+ * + * string available_inventory_item_id = 2; + * + * @return The availableInventoryItemId. + */ + public java.lang.String getAvailableInventoryItemId() { + java.lang.Object ref = availableInventoryItemId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + availableInventoryItemId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+         * If the vulnerability report was not updated after the VM inventory
+         * update, these values might not display in VM inventory. If there is no
+         * available fix, the field is empty. The `inventory_item` value specifies
+         * the latest `SoftwarePackage` available to the VM that fixes the
+         * vulnerability.
+         * 
+ * + * string available_inventory_item_id = 2; + * + * @return The bytes for availableInventoryItemId. + */ + public com.google.protobuf.ByteString getAvailableInventoryItemIdBytes() { + java.lang.Object ref = availableInventoryItemId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + availableInventoryItemId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+         * If the vulnerability report was not updated after the VM inventory
+         * update, these values might not display in VM inventory. If there is no
+         * available fix, the field is empty. The `inventory_item` value specifies
+         * the latest `SoftwarePackage` available to the VM that fixes the
+         * vulnerability.
+         * 
+ * + * string available_inventory_item_id = 2; + * + * @param value The availableInventoryItemId to set. + * @return This builder for chaining. + */ + public Builder setAvailableInventoryItemId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + availableInventoryItemId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+         * If the vulnerability report was not updated after the VM inventory
+         * update, these values might not display in VM inventory. If there is no
+         * available fix, the field is empty. The `inventory_item` value specifies
+         * the latest `SoftwarePackage` available to the VM that fixes the
+         * vulnerability.
+         * 
+ * + * string available_inventory_item_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearAvailableInventoryItemId() { + + availableInventoryItemId_ = getDefaultInstance().getAvailableInventoryItemId(); + onChanged(); + return this; + } + /** + * + * + *
+         * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+         * If the vulnerability report was not updated after the VM inventory
+         * update, these values might not display in VM inventory. If there is no
+         * available fix, the field is empty. The `inventory_item` value specifies
+         * the latest `SoftwarePackage` available to the VM that fixes the
+         * vulnerability.
+         * 
+ * + * string available_inventory_item_id = 2; + * + * @param value The bytes for availableInventoryItemId to set. + * @return This builder for chaining. + */ + public Builder setAvailableInventoryItemIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + availableInventoryItemId_ = value; + onChanged(); + return this; + } + + private java.lang.Object fixedCpeUri_ = ""; + /** + * + * + *
+         * The recommended [CPE URI](https://cpe.mitre.org/specification/) update
+         * that contains a fix for this vulnerability.
+         * 
+ * + * string fixed_cpe_uri = 3; + * + * @return The fixedCpeUri. + */ + public java.lang.String getFixedCpeUri() { + java.lang.Object ref = fixedCpeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fixedCpeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The recommended [CPE URI](https://cpe.mitre.org/specification/) update
+         * that contains a fix for this vulnerability.
+         * 
+ * + * string fixed_cpe_uri = 3; + * + * @return The bytes for fixedCpeUri. + */ + public com.google.protobuf.ByteString getFixedCpeUriBytes() { + java.lang.Object ref = fixedCpeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fixedCpeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The recommended [CPE URI](https://cpe.mitre.org/specification/) update
+         * that contains a fix for this vulnerability.
+         * 
+ * + * string fixed_cpe_uri = 3; + * + * @param value The fixedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setFixedCpeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fixedCpeUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The recommended [CPE URI](https://cpe.mitre.org/specification/) update
+         * that contains a fix for this vulnerability.
+         * 
+ * + * string fixed_cpe_uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearFixedCpeUri() { + + fixedCpeUri_ = getDefaultInstance().getFixedCpeUri(); + onChanged(); + return this; + } + /** + * + * + *
+         * The recommended [CPE URI](https://cpe.mitre.org/specification/) update
+         * that contains a fix for this vulnerability.
+         * 
+ * + * string fixed_cpe_uri = 3; + * + * @param value The bytes for fixedCpeUri to set. + * @return This builder for chaining. + */ + public Builder setFixedCpeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fixedCpeUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object upstreamFix_ = ""; + /** + * + * + *
+         * The upstream OS patch, packages or KB that fixes the vulnerability.
+         * 
+ * + * string upstream_fix = 4; + * + * @return The upstreamFix. + */ + public java.lang.String getUpstreamFix() { + java.lang.Object ref = upstreamFix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + upstreamFix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The upstream OS patch, packages or KB that fixes the vulnerability.
+         * 
+ * + * string upstream_fix = 4; + * + * @return The bytes for upstreamFix. + */ + public com.google.protobuf.ByteString getUpstreamFixBytes() { + java.lang.Object ref = upstreamFix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + upstreamFix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The upstream OS patch, packages or KB that fixes the vulnerability.
+         * 
+ * + * string upstream_fix = 4; + * + * @param value The upstreamFix to set. + * @return This builder for chaining. + */ + public Builder setUpstreamFix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + upstreamFix_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The upstream OS patch, packages or KB that fixes the vulnerability.
+         * 
+ * + * string upstream_fix = 4; + * + * @return This builder for chaining. + */ + public Builder clearUpstreamFix() { + + upstreamFix_ = getDefaultInstance().getUpstreamFix(); + onChanged(); + return this; + } + /** + * + * + *
+         * The upstream OS patch, packages or KB that fixes the vulnerability.
+         * 
+ * + * string upstream_fix = 4; + * + * @param value The bytes for upstreamFix to set. + * @return This builder for chaining. + */ + public Builder setUpstreamFixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + upstreamFix_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item) + private static final com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item(); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Item parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Item(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DETAILS_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details_; + /** + * + * + *
+     * Contains metadata as per the upstream feed of the operating system and
+     * NVD.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + * + * @return Whether the details field is set. + */ + @java.lang.Override + public boolean hasDetails() { + return details_ != null; + } + /** + * + * + *
+     * Contains metadata as per the upstream feed of the operating system and
+     * NVD.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + * + * @return The details. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + getDetails() { + return details_ == null + ? com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .getDefaultInstance() + : details_; + } + /** + * + * + *
+     * Contains metadata as per the upstream feed of the operating system and
+     * NVD.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.DetailsOrBuilder + getDetailsOrBuilder() { + return getDetails(); + } + + public static final int INSTALLED_INVENTORY_ITEM_IDS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList installedInventoryItemIds_; + /** * * *
@@ -3573,10 +5261,11 @@ public boolean hasDetails() {
      * this field may be empty.
      * 
* - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @return A list containing the installedInventoryItemIds. */ + @java.lang.Deprecated public com.google.protobuf.ProtocolStringList getInstalledInventoryItemIdsList() { return installedInventoryItemIds_; } @@ -3591,10 +5280,11 @@ public com.google.protobuf.ProtocolStringList getInstalledInventoryItemIdsList() * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @return The count of installedInventoryItemIds. */ + @java.lang.Deprecated public int getInstalledInventoryItemIdsCount() { return installedInventoryItemIds_.size(); } @@ -3609,11 +5299,12 @@ public int getInstalledInventoryItemIdsCount() { * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @param index The index of the element to return. * @return The installedInventoryItemIds at the given index. */ + @java.lang.Deprecated public java.lang.String getInstalledInventoryItemIds(int index) { return installedInventoryItemIds_.get(index); } @@ -3628,11 +5319,12 @@ public java.lang.String getInstalledInventoryItemIds(int index) { * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @param index The index of the value to return. * @return The bytes of the installedInventoryItemIds at the given index. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getInstalledInventoryItemIdsBytes(int index) { return installedInventoryItemIds_.getByteString(index); } @@ -3651,10 +5343,11 @@ public com.google.protobuf.ByteString getInstalledInventoryItemIdsBytes(int inde * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @return A list containing the availableInventoryItemIds. */ + @java.lang.Deprecated public com.google.protobuf.ProtocolStringList getAvailableInventoryItemIdsList() { return availableInventoryItemIds_; } @@ -3670,10 +5363,11 @@ public com.google.protobuf.ProtocolStringList getAvailableInventoryItemIdsList() * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @return The count of availableInventoryItemIds. */ + @java.lang.Deprecated public int getAvailableInventoryItemIdsCount() { return availableInventoryItemIds_.size(); } @@ -3689,11 +5383,12 @@ public int getAvailableInventoryItemIdsCount() { * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @param index The index of the element to return. * @return The availableInventoryItemIds at the given index. */ + @java.lang.Deprecated public java.lang.String getAvailableInventoryItemIds(int index) { return availableInventoryItemIds_.get(index); } @@ -3709,11 +5404,12 @@ public java.lang.String getAvailableInventoryItemIds(int index) { * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @param index The index of the value to return. * @return The bytes of the availableInventoryItemIds at the given index. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getAvailableInventoryItemIdsBytes(int index) { return availableInventoryItemIds_.getByteString(index); } @@ -3810,6 +5506,91 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } + public static final int ITEMS_FIELD_NUMBER = 6; + private java.util.List + items_; + /** + * + * + *
+     * List of items affected by the vulnerability.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + @java.lang.Override + public java.util.List + getItemsList() { + return items_; + } + /** + * + * + *
+     * List of items affected by the vulnerability.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.ItemOrBuilder> + getItemsOrBuilderList() { + return items_; + } + /** + * + * + *
+     * List of items affected by the vulnerability.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + @java.lang.Override + public int getItemsCount() { + return items_.size(); + } + /** + * + * + *
+     * List of items affected by the vulnerability.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item getItems( + int index) { + return items_.get(index); + } + /** + * + * + *
+     * List of items affected by the vulnerability.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.ItemOrBuilder + getItemsOrBuilder(int index) { + return items_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3841,6 +5622,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(5, getUpdateTime()); } + for (int i = 0; i < items_.size(); i++) { + output.writeMessage(6, items_.get(i)); + } unknownFields.writeTo(output); } @@ -3875,6 +5659,9 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); } + for (int i = 0; i < items_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, items_.get(i)); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -3907,6 +5694,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } + if (!getItemsList().equals(other.getItemsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -3938,6 +5726,10 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } + if (getItemsCount() > 0) { + hash = (37 * hash) + ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getItemsList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -4082,7 +5874,9 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getItemsFieldBuilder(); + } } @java.lang.Override @@ -4110,6 +5904,12 @@ public Builder clear() { updateTime_ = null; updateTimeBuilder_ = null; } + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + itemsBuilder_.clear(); + } return this; } @@ -4165,6 +5965,15 @@ public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability build } else { result.updateTime_ = updateTimeBuilder_.build(); } + if (itemsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + items_ = java.util.Collections.unmodifiableList(items_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.items_ = items_; + } else { + result.items_ = itemsBuilder_.build(); + } onBuilt(); return result; } @@ -4249,6 +6058,33 @@ public Builder mergeFrom( if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } + if (itemsBuilder_ == null) { + if (!other.items_.isEmpty()) { + if (items_.isEmpty()) { + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureItemsIsMutable(); + items_.addAll(other.items_); + } + onChanged(); + } + } else { + if (!other.items_.isEmpty()) { + if (itemsBuilder_.isEmpty()) { + itemsBuilder_.dispose(); + itemsBuilder_ = null; + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000004); + itemsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getItemsFieldBuilder() + : null; + } else { + itemsBuilder_.addAllMessages(other.items_); + } + } + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -4517,10 +6353,11 @@ private void ensureInstalledInventoryItemIdsIsMutable() { * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @return A list containing the installedInventoryItemIds. */ + @java.lang.Deprecated public com.google.protobuf.ProtocolStringList getInstalledInventoryItemIdsList() { return installedInventoryItemIds_.getUnmodifiableView(); } @@ -4535,10 +6372,11 @@ public com.google.protobuf.ProtocolStringList getInstalledInventoryItemIdsList() * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @return The count of installedInventoryItemIds. */ + @java.lang.Deprecated public int getInstalledInventoryItemIdsCount() { return installedInventoryItemIds_.size(); } @@ -4553,11 +6391,12 @@ public int getInstalledInventoryItemIdsCount() { * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @param index The index of the element to return. * @return The installedInventoryItemIds at the given index. */ + @java.lang.Deprecated public java.lang.String getInstalledInventoryItemIds(int index) { return installedInventoryItemIds_.get(index); } @@ -4572,11 +6411,12 @@ public java.lang.String getInstalledInventoryItemIds(int index) { * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @param index The index of the value to return. * @return The bytes of the installedInventoryItemIds at the given index. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getInstalledInventoryItemIdsBytes(int index) { return installedInventoryItemIds_.getByteString(index); } @@ -4591,12 +6431,13 @@ public com.google.protobuf.ByteString getInstalledInventoryItemIdsBytes(int inde * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @param index The index to set the value at. * @param value The installedInventoryItemIds to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setInstalledInventoryItemIds(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -4617,11 +6458,12 @@ public Builder setInstalledInventoryItemIds(int index, java.lang.String value) { * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @param value The installedInventoryItemIds to add. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder addInstalledInventoryItemIds(java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -4642,11 +6484,12 @@ public Builder addInstalledInventoryItemIds(java.lang.String value) { * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @param values The installedInventoryItemIds to add. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder addAllInstalledInventoryItemIds(java.lang.Iterable values) { ensureInstalledInventoryItemIdsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, installedInventoryItemIds_); @@ -4664,10 +6507,11 @@ public Builder addAllInstalledInventoryItemIds(java.lang.Iterable * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearInstalledInventoryItemIds() { installedInventoryItemIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); @@ -4685,11 +6529,12 @@ public Builder clearInstalledInventoryItemIds() { * this field may be empty. * * - * repeated string installed_inventory_item_ids = 2; + * repeated string installed_inventory_item_ids = 2 [deprecated = true]; * * @param value The bytes of the installedInventoryItemIds to add. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder addInstalledInventoryItemIdsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -4723,10 +6568,11 @@ private void ensureAvailableInventoryItemIdsIsMutable() { * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @return A list containing the availableInventoryItemIds. */ + @java.lang.Deprecated public com.google.protobuf.ProtocolStringList getAvailableInventoryItemIdsList() { return availableInventoryItemIds_.getUnmodifiableView(); } @@ -4742,10 +6588,11 @@ public com.google.protobuf.ProtocolStringList getAvailableInventoryItemIdsList() * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @return The count of availableInventoryItemIds. */ + @java.lang.Deprecated public int getAvailableInventoryItemIdsCount() { return availableInventoryItemIds_.size(); } @@ -4761,11 +6608,12 @@ public int getAvailableInventoryItemIdsCount() { * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @param index The index of the element to return. * @return The availableInventoryItemIds at the given index. */ + @java.lang.Deprecated public java.lang.String getAvailableInventoryItemIds(int index) { return availableInventoryItemIds_.get(index); } @@ -4781,11 +6629,12 @@ public java.lang.String getAvailableInventoryItemIds(int index) { * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @param index The index of the value to return. * @return The bytes of the availableInventoryItemIds at the given index. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getAvailableInventoryItemIdsBytes(int index) { return availableInventoryItemIds_.getByteString(index); } @@ -4801,12 +6650,13 @@ public com.google.protobuf.ByteString getAvailableInventoryItemIdsBytes(int inde * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @param index The index to set the value at. * @param value The availableInventoryItemIds to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setAvailableInventoryItemIds(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -4828,11 +6678,12 @@ public Builder setAvailableInventoryItemIds(int index, java.lang.String value) { * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @param value The availableInventoryItemIds to add. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder addAvailableInventoryItemIds(java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -4854,11 +6705,12 @@ public Builder addAvailableInventoryItemIds(java.lang.String value) { * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @param values The availableInventoryItemIds to add. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder addAllAvailableInventoryItemIds(java.lang.Iterable values) { ensureAvailableInventoryItemIdsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, availableInventoryItemIds_); @@ -4877,10 +6729,11 @@ public Builder addAllAvailableInventoryItemIds(java.lang.Iterable * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearAvailableInventoryItemIds() { availableInventoryItemIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); @@ -4899,11 +6752,12 @@ public Builder clearAvailableInventoryItemIds() { * vulnerability. * * - * repeated string available_inventory_item_ids = 3; + * repeated string available_inventory_item_ids = 3 [deprecated = true]; * * @param value The bytes of the availableInventoryItemIds to add. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder addAvailableInventoryItemIdsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -5285,6 +7139,424 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return updateTimeBuilder_; } + private java.util.List< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item> + items_ = java.util.Collections.emptyList(); + + private void ensureItemsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + items_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item>(items_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.ItemOrBuilder> + itemsBuilder_; + + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item> + getItemsList() { + if (itemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(items_); + } else { + return itemsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public int getItemsCount() { + if (itemsBuilder_ == null) { + return items_.size(); + } else { + return itemsBuilder_.getCount(); + } + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item getItems( + int index) { + if (itemsBuilder_ == null) { + return items_.get(index); + } else { + return itemsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public Builder setItems( + int index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.set(index, value); + onChanged(); + } else { + itemsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public Builder setItems( + int index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.Builder + builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.set(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public Builder addItems( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(value); + onChanged(); + } else { + itemsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public Builder addItems( + int index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(index, value); + onChanged(); + } else { + itemsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public Builder addItems( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.Builder + builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public Builder addItems( + int index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.Builder + builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public Builder addAllItems( + java.lang.Iterable< + ? extends + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item> + values) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, items_); + onChanged(); + } else { + itemsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public Builder clearItems() { + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + itemsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public Builder removeItems(int index) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.remove(index); + onChanged(); + } else { + itemsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.Builder + getItemsBuilder(int index) { + return getItemsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.ItemOrBuilder + getItemsOrBuilder(int index) { + if (itemsBuilder_ == null) { + return items_.get(index); + } else { + return itemsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.ItemOrBuilder> + getItemsOrBuilderList() { + if (itemsBuilder_ != null) { + return itemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(items_); + } + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.Builder + addItemsBuilder() { + return getItemsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + .getDefaultInstance()); + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.Builder + addItemsBuilder(int index) { + return getItemsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item + .getDefaultInstance()); + } + /** + * + * + *
+       * List of items affected by the vulnerability.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item items = 6; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.Builder> + getItemsBuilderList() { + return getItemsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.ItemOrBuilder> + getItemsFieldBuilder() { + if (itemsBuilder_ == null) { + itemsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Item.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + .ItemOrBuilder>( + items_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + items_ = null; + } + return itemsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -5483,8 +7755,8 @@ public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability getVu * * *
-   * Output only. The timestamp for when the last vulnerability report was
-   * generated for the VM.
+   * Output only. The timestamp for when the last vulnerability report was generated for the
+   * VM.
    * 
* * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5500,8 +7772,8 @@ public boolean hasUpdateTime() { * * *
-   * Output only. The timestamp for when the last vulnerability report was
-   * generated for the VM.
+   * Output only. The timestamp for when the last vulnerability report was generated for the
+   * VM.
    * 
* * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5517,8 +7789,8 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
-   * Output only. The timestamp for when the last vulnerability report was
-   * generated for the VM.
+   * Output only. The timestamp for when the last vulnerability report was generated for the
+   * VM.
    * 
* * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -6478,8 +8750,8 @@ public Builder removeVulnerabilities(int index) { * * *
-     * Output only. The timestamp for when the last vulnerability report was
-     * generated for the VM.
+     * Output only. The timestamp for when the last vulnerability report was generated for the
+     * VM.
      * 
* * @@ -6495,8 +8767,8 @@ public boolean hasUpdateTime() { * * *
-     * Output only. The timestamp for when the last vulnerability report was
-     * generated for the VM.
+     * Output only. The timestamp for when the last vulnerability report was generated for the
+     * VM.
      * 
* * @@ -6518,8 +8790,8 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
-     * Output only. The timestamp for when the last vulnerability report was
-     * generated for the VM.
+     * Output only. The timestamp for when the last vulnerability report was generated for the
+     * VM.
      * 
* * @@ -6543,8 +8815,8 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The timestamp for when the last vulnerability report was
-     * generated for the VM.
+     * Output only. The timestamp for when the last vulnerability report was generated for the
+     * VM.
      * 
* * @@ -6565,8 +8837,8 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * Output only. The timestamp for when the last vulnerability report was
-     * generated for the VM.
+     * Output only. The timestamp for when the last vulnerability report was generated for the
+     * VM.
      * 
* * @@ -6592,8 +8864,8 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The timestamp for when the last vulnerability report was
-     * generated for the VM.
+     * Output only. The timestamp for when the last vulnerability report was generated for the
+     * VM.
      * 
* * @@ -6615,8 +8887,8 @@ public Builder clearUpdateTime() { * * *
-     * Output only. The timestamp for when the last vulnerability report was
-     * generated for the VM.
+     * Output only. The timestamp for when the last vulnerability report was generated for the
+     * VM.
      * 
* * @@ -6632,8 +8904,8 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { * * *
-     * Output only. The timestamp for when the last vulnerability report was
-     * generated for the VM.
+     * Output only. The timestamp for when the last vulnerability report was generated for the
+     * VM.
      * 
* * @@ -6653,8 +8925,8 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-     * Output only. The timestamp for when the last vulnerability report was
-     * generated for the VM.
+     * Output only. The timestamp for when the last vulnerability report was generated for the
+     * VM.
      * 
* * diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReportOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReportOrBuilder.java index 931bf526..76d1bcf0 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReportOrBuilder.java +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReportOrBuilder.java @@ -121,8 +121,8 @@ public interface VulnerabilityReportOrBuilder * * *
-   * Output only. The timestamp for when the last vulnerability report was
-   * generated for the VM.
+   * Output only. The timestamp for when the last vulnerability report was generated for the
+   * VM.
    * 
* * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -135,8 +135,8 @@ public interface VulnerabilityReportOrBuilder * * *
-   * Output only. The timestamp for when the last vulnerability report was
-   * generated for the VM.
+   * Output only. The timestamp for when the last vulnerability report was generated for the
+   * VM.
    * 
* * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -149,8 +149,8 @@ public interface VulnerabilityReportOrBuilder * * *
-   * Output only. The timestamp for when the last vulnerability report was
-   * generated for the VM.
+   * Output only. The timestamp for when the last vulnerability report was generated for the
+   * VM.
    * 
* * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/config_common.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/config_common.proto index fa60feaf..4d85bd12 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/config_common.proto +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/config_common.proto @@ -16,6 +16,8 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; + option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; option java_multiple_files = true; @@ -27,8 +29,12 @@ option ruby_package = "Google::Cloud::OsConfig::V1alpha"; // Step performed by the OS Config agent for configuring an `OSPolicyResource` // to its desired state. message OSPolicyResourceConfigStep { + option deprecated = true; + // Supported configuration step types enum Type { + option deprecated = true; + // Default value. This value is unused. TYPE_UNSPECIFIED = 0; @@ -53,6 +59,8 @@ message OSPolicyResourceConfigStep { // Supported outcomes for a configuration step. enum Outcome { + option deprecated = true; + // Default value. This value is unused. OUTCOME_UNSPECIFIED = 0; @@ -76,8 +84,12 @@ message OSPolicyResourceConfigStep { // Compliance data for an OS policy resource. message OSPolicyResourceCompliance { + option deprecated = true; + // ExecResource specific output. message ExecResourceOutput { + option deprecated = true; + // Output from Enforcement phase output file (if run). // Output size is limited to 100K bytes. bytes enforcement_output = 2; @@ -102,6 +114,8 @@ message OSPolicyResourceCompliance { // Supported OSPolicy compliance states. enum OSPolicyComplianceState { + option deprecated = true; + // Default value. This value is unused. OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED = 0; diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto index 65c3f682..e29f1f5c 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/osconfig/v1alpha/config_common.proto"; @@ -42,6 +43,7 @@ option ruby_package = "Google::Cloud::OsConfig::V1alpha"; // For more information, see [View // compliance](https://cloud.google.com/compute/docs/os-configuration-management/view-compliance). message InstanceOSPoliciesCompliance { + option deprecated = true; option (google.api.resource) = { type: "osconfig.googleapis.com/InstanceOSPoliciesCompliance" pattern: "projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}" @@ -49,6 +51,8 @@ message InstanceOSPoliciesCompliance { // Compliance data for an OS policy message OSPolicyCompliance { + option deprecated = true; + // The OS policy id string os_policy_id = 1; @@ -115,6 +119,8 @@ message InstanceOSPoliciesCompliance { // A request message for getting OS policies compliance data for the given // Compute Engine VM instance. message GetInstanceOSPoliciesComplianceRequest { + option deprecated = true; + // Required. API resource name for instance OS policies compliance resource. // // Format: @@ -135,6 +141,8 @@ message GetInstanceOSPoliciesComplianceRequest { // A request message for listing OS policies compliance data for all Compute // Engine VMs in the given location. message ListInstanceOSPoliciesCompliancesRequest { + option deprecated = true; + // Required. The parent resource name. // // Format: `projects/{project}/locations/{location}` @@ -164,6 +172,8 @@ message ListInstanceOSPoliciesCompliancesRequest { // A response message for listing OS policies compliance data for all Compute // Engine VMs in the given location. message ListInstanceOSPoliciesCompliancesResponse { + option deprecated = true; + // List of instance OS policies compliance objects. repeated InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/inventory.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/inventory.proto index f9ad221e..6aed6a0c 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/inventory.proto +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/inventory.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; @@ -264,12 +265,9 @@ message Inventory { google.protobuf.Timestamp install_time = 5; } - // Contains information about a Windows application as retrieved from the - // Windows Registry. For more information about these fields, see - // - // [Windows Installer Properties for the Uninstall - // Registry](https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key){: - // class="external" } + // Contains information about a Windows application that is retrieved from the + // Windows Registry. For more information about these fields, see: + // https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key message WindowsApplication { // The name of the application or product. string display_name = 1; @@ -298,15 +296,14 @@ message Inventory { // Output only. Base level operating system information for the VM. OsInfo os_info = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Inventory items related to the VM keyed by an opaque unique - // identifier for each inventory item. The identifier is unique to each - // distinct and addressable inventory item and will change, when there is a - // new package version. + // Output only. Inventory items related to the VM keyed by an opaque unique identifier for + // each inventory item. The identifier is unique to each distinct and + // addressable inventory item and will change, when there is a new package + // version. map items = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp of the last reported inventory for the VM. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request message for getting inventory data for the specified VM. @@ -336,11 +333,9 @@ message GetInventoryRequest { message ListInventoriesRequest { // Required. The parent resource name. // - // Format: `projects/{project}/locations/{location}/instances/{instance}` + // Format: `projects/{project}/locations/{location}/instances/-` // - // For `{project}`, either `project-number` or `project-id` can be - // provided. For `{instance}`, only hyphen or dash character is supported to - // list inventories across VMs. + // For `{project}`, either `project-number` or `project-id` can be provided. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy.proto index 5b004145..7d51c76b 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy.proto +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy.proto @@ -16,20 +16,35 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; option java_multiple_files = true; -option java_outer_classname = "OSPolicyProto"; +option java_outer_classname = "OsPolicyProto"; option java_package = "com.google.cloud.osconfig.v1alpha"; option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; option ruby_package = "Google::Cloud::OsConfig::V1alpha"; // An OS policy defines the desired state configuration for a VM. message OSPolicy { - // The `OSFilter` is used to specify the OS filtering criteria for the - // resource group. + // Policy mode + enum Mode { + // Invalid mode + MODE_UNSPECIFIED = 0; + + // This mode checks if the configuration resources in the policy are in + // their desired state. No actions are performed if they are not in the + // desired state. This mode is used for reporting purposes. + VALIDATION = 1; + + // This mode checks if the configuration resources in the policy are in + // their desired state, and if not, enforces the desired state. + ENFORCEMENT = 2; + } + + // Filtering criteria to select VMs based on OS details. message OSFilter { // This should match OS short name emitted by the OS inventory agent. // An empty value matches any OS. @@ -43,6 +58,21 @@ message OSPolicy { string os_version = 2; } + // Filtering criteria to select VMs based on inventory details. + message InventoryFilter { + // Required. The OS short name + string os_short_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The OS version + // + // Prefix matches are supported if asterisk(*) is provided as the + // last character. For example, to match all versions with a major + // version of `7`, specify the following value for this field `7.*` + // + // An empty string matches all OS versions. + string os_version = 2; + } + // An OS policy resource is used to define the desired state configuration // and provides a specific functionality like installing/removing packages, // executing a script etc. @@ -96,6 +126,19 @@ message OSPolicy { // A resource that manages a system package. message PackageResource { + // The desired state that the OS Config agent maintains on the VM. + enum DesiredState { + // Unspecified is invalid. + DESIRED_STATE_UNSPECIFIED = 0; + + // Ensure that the package is installed. + INSTALLED = 1; + + // The agent ensures that the package is not installed and + // uninstalls it if detected. + REMOVED = 2; + } + // A deb package file. dpkg packages only support INSTALLED state. message Deb { // Required. A deb package. @@ -164,19 +207,6 @@ message OSPolicy { repeated string properties = 2; } - // The desired state that the OS Config agent maintains on the VM. - enum DesiredState { - // Unspecified is invalid. - DESIRED_STATE_UNSPECIFIED = 0; - - // Ensure that the package is installed. - INSTALLED = 1; - - // The agent ensures that the package is not installed and - // uninstalls it if detected. - REMOVED = 2; - } - // Required. The desired state the agent should maintain for this package. DesiredState desired_state = 1 [(google.api.field_behavior) = REQUIRED]; @@ -339,21 +369,21 @@ message OSPolicy { message Exec { // The interpreter to use. enum Interpreter { - // Defaults to NONE. + // Invalid value, the request will return validation error. INTERPRETER_UNSPECIFIED = 0; - // If no interpreter is specified the - // source will be executed directly, which will likely only - // succeed for executables and scripts with shebang lines. - // [Wikipedia - // shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)). + // If an interpreter is not specified, the + // source is executed directly. This execution, without an + // interpreter, only succeeds for executables and scripts that have shebang lines. NONE = 1; - // Indicates that the script will be run with /bin/sh on Linux and - // cmd.exe on windows. + // Indicates that the script runs with `/bin/sh` on Linux and + // `cmd.exe` on Windows. SHELL = 2; - // Indicates that the script will be run with powershell. + // Indicates that the script runs with PowerShell. POWERSHELL = 3; } @@ -478,29 +508,30 @@ message OSPolicy { // group within the OS policy is selected based on the `OSFilter` specified // within the resource group. message ResourceGroup { + // Deprecated. Use the `inventory_filters` field instead. // Used to specify the OS filter for a resource group - OSFilter os_filter = 1; + OSFilter os_filter = 1 [deprecated = true]; + + // List of inventory filters for the resource group. + // + // The resources in this resource group are applied to the target VM if it + // satisfies at least one of the following inventory filters. + // + // For example, to apply this resource group to VMs running either `RHEL` or + // `CentOS` operating systems, specify 2 items for the list with following + // values: + // inventory_filters[0].os_short_name='rhel' and + // inventory_filters[1].os_short_name='centos' + // + // If the list is empty, this resource group will be applied to the target + // VM unconditionally. + repeated InventoryFilter inventory_filters = 3; // Required. List of resources configured for this resource group. // The resources are executed in the exact order specified here. repeated Resource resources = 2 [(google.api.field_behavior) = REQUIRED]; } - // Policy mode - enum Mode { - // Invalid mode - MODE_UNSPECIFIED = 0; - - // This mode checks if the configuration resources in the policy are in - // their desired state. No actions are performed if they are not in the - // desired state. This mode is used for reporting purposes. - VALIDATION = 1; - - // This mode checks if the configuration resources in the policy are in - // their desired state, and if not, enforces the desired state. - ENFORCEMENT = 2; - } - // Required. The id of the OS policy with the following restrictions: // // * Must contain only lowercase letters, numbers, and hyphens. diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto new file mode 100644 index 00000000..0fabd043 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto @@ -0,0 +1,297 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "OSPolicyAssignmentReportsProto"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/InstanceOSPolicyAssignment" + pattern: "projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}" +}; + +// Get a report of the OS policy assignment for a VM instance. +message GetOSPolicyAssignmentReportRequest { + // Required. API resource name for OS policy assignment report. + // + // Format: + // `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` + // can be provided. + // For `{assignment_id}`, the OSPolicyAssignment id must be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignmentReport" + } + ]; +} + +// List the OS policy assignment reports for VM instances. +message ListOSPolicyAssignmentReportsRequest { + // Required. The parent resource name. + // + // Format: + // `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + // provided. If '-' is provided, the response will include + // OSPolicyAssignmentReports for all instances in the project/location. + // For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + // is provided, the response will include OSPolicyAssignmentReports for all + // OSPolicyAssignments in the project/location. + // Either {instance} or {assignment} must be `-`. + // + // For example: + // `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + // returns all reports for the instance + // `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + // returns all the reports for the given assignment across all instances. + // `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + // returns all the reports for all assignments across all instances. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/InstanceOSPolicyAssignment" + } + ]; + + // The maximum number of results to return. + int32 page_size = 2; + + // If provided, this field specifies the criteria that must be met by the + // `OSPolicyAssignmentReport` API resource that is included in the response. + string filter = 3; + + // A pagination token returned from a previous call to the + // `ListOSPolicyAssignmentReports` method that indicates where this listing + // should continue from. + string page_token = 4; +} + +// A response message for listing OS Policy assignment reports including the +// page of results and page token. +message ListOSPolicyAssignmentReportsResponse { + // List of OS policy assignment reports. + repeated OSPolicyAssignmentReport os_policy_assignment_reports = 1; + + // The pagination token to retrieve the next page of OS policy assignment + // report objects. + string next_page_token = 2; +} + +// A report of the OS policy assignment status for a given instance. +message OSPolicyAssignmentReport { + option (google.api.resource) = { + type: "osconfig.googleapis.com/OSPolicyAssignmentReport" + pattern: "projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report" + }; + + // Compliance data for an OS policy + message OSPolicyCompliance { + // Possible compliance states for an os policy. + enum ComplianceState { + // The policy is in an unknown compliance state. + // + // Refer to the field `compliance_state_reason` to learn the exact reason + // for the policy to be in this compliance state. + UNKNOWN = 0; + + // Policy is compliant. + // + // The policy is compliant if all the underlying resources are also + // compliant. + COMPLIANT = 1; + + // Policy is non-compliant. + // + // The policy is non-compliant if one or more underlying resources are + // non-compliant. + NON_COMPLIANT = 2; + } + + // Compliance data for an OS policy resource. + message OSPolicyResourceCompliance { + // Step performed by the OS Config agent for configuring an + // `OSPolicy` resource to its desired state. + message OSPolicyResourceConfigStep { + // Supported configuration step types + enum Type { + // Default value. This value is unused. + TYPE_UNSPECIFIED = 0; + + // Checks for resource conflicts such as schema errors. + VALIDATION = 1; + + // Checks the current status of the desired state for a resource. + DESIRED_STATE_CHECK = 2; + + // Enforces the desired state for a resource that is not in desired + // state. + DESIRED_STATE_ENFORCEMENT = 3; + + // Re-checks the status of the desired state. This check is done + // for a resource after the enforcement of all OS policies. + // + // This step is used to determine the final desired state status for + // the resource. It accounts for any resources that might have drifted + // from their desired state due to side effects from executing other + // resources. + DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; + } + + // Configuration step type. + Type type = 1; + + // An error message recorded during the execution of this step. + // Only populated if errors were encountered during this step execution. + string error_message = 2; + } + + // Possible compliance states for a resource. + enum ComplianceState { + // The resource is in an unknown compliance state. + // + // To get more details about why the policy is in this state, review + // the output of the `compliance_state_reason` field. + UNKNOWN = 0; + + // Resource is compliant. + COMPLIANT = 1; + + // Resource is non-compliant. + NON_COMPLIANT = 2; + } + + // ExecResource specific output. + message ExecResourceOutput { + // Output from enforcement phase output file (if run). + // Output size is limited to 100K bytes. + bytes enforcement_output = 2; + } + + // The ID of the OS policy resource. + string os_policy_resource_id = 1; + + // Ordered list of configuration completed by the agent for the OS policy + // resource. + repeated OSPolicyResourceConfigStep config_steps = 2; + + // The compliance state of the resource. + ComplianceState compliance_state = 3; + + // A reason for the resource to be in the given compliance state. + // This field is always populated when `compliance_state` is `UNKNOWN`. + // + // The following values are supported when `compliance_state == UNKNOWN` + // + // * `execution-errors`: Errors were encountered by the agent while + // executing the resource and the compliance state couldn't be + // determined. + // * `execution-skipped-by-agent`: Resource execution was skipped by the + // agent because errors were encountered while executing prior resources + // in the OS policy. + // * `os-policy-execution-attempt-failed`: The execution of the OS policy + // containing this resource failed and the compliance state couldn't be + // determined. + string compliance_state_reason = 4; + + // Resource specific output. + oneof output { + // ExecResource specific output. + ExecResourceOutput exec_resource_output = 5; + } + } + + // The OS policy id + string os_policy_id = 1; + + // The compliance state of the OS policy. + ComplianceState compliance_state = 2; + + // The reason for the OS policy to be in an unknown compliance state. + // This field is always populated when `compliance_state` is `UNKNOWN`. + // + // If populated, the field can contain one of the following values: + // + // * `vm-not-running`: The VM was not running. + // * `os-policies-not-supported-by-agent`: The version of the OS Config + // agent running on the VM does not support running OS policies. + // * `no-agent-detected`: The OS Config agent is not detected for the VM. + // * `resource-execution-errors`: The OS Config agent encountered errors + // while executing one or more resources in the policy. See + // `os_policy_resource_compliances` for details. + // * `task-timeout`: The task sent to the agent to apply the policy timed + // out. + // * `unexpected-agent-state`: The OS Config agent did not report the final + // status of the task that attempted to apply the policy. Instead, the agent + // unexpectedly started working on a different task. This mostly happens + // when the agent or VM unexpectedly restarts while applying OS policies. + // * `internal-service-errors`: Internal service errors were encountered + // while attempting to apply the policy. + string compliance_state_reason = 3; + + // Compliance data for each resource within the policy that is applied to + // the VM. + repeated OSPolicyResourceCompliance os_policy_resource_compliances = 4; + } + + // The `OSPolicyAssignmentReport` API resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report` + string name = 1; + + // The Compute Engine VM instance name. + string instance = 2; + + // Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` + // belongs to. + // + // Format: + // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + string os_policy_assignment = 3 [(google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + }]; + + // Compliance data for each `OSPolicy` that is applied to the VM. + repeated OSPolicyCompliance os_policy_compliances = 4; + + // Timestamp for when the report was last generated. + google.protobuf.Timestamp update_time = 5; + + // Unique identifier of the last attempted run to apply the OS policies + // associated with this assignment on the VM. + // + // This ID is logged by the OS Config agent while applying the OS + // policies associated with this assignment on the VM. + // NOTE: If the service is unable to successfully connect to the agent for + // this run, then this id will not be available in the agent logs. + string last_run_id = 6; +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy_assignments.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy_assignments.proto index 4b9943aa..0cd2f80b 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy_assignments.proto +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy_assignments.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/osconfig/v1alpha/os_policy.proto"; @@ -27,7 +28,7 @@ import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; option java_multiple_files = true; -option java_outer_classname = "OSPolicyAssignments"; +option java_outer_classname = "OsPolicyAssignmentsProto"; option java_package = "com.google.cloud.osconfig.v1alpha"; option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; option ruby_package = "Google::Cloud::OsConfig::V1alpha"; @@ -65,15 +66,34 @@ message OSPolicyAssignment { map labels = 1; } - // Message to represent the filters to select VMs for an assignment + // Filters to select target VMs for an assignment. + // + // If more than one filter criteria is specified below, a VM will be selected + // if and only if it satisfies all of them. message InstanceFilter { + // VM inventory details. + message Inventory { + // Required. The OS short name + string os_short_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The OS version + // + // Prefix matches are supported if asterisk(*) is provided as the + // last character. For example, to match all versions with a major + // version of `7`, specify the following value for this field `7.*` + // + // An empty string matches all OS versions. + string os_version = 2; + } + // Target all VMs in the project. If true, no other criteria is // permitted. bool all = 1; - // A VM is included if it's OS short name matches with any of the + // Deprecated. Use the `inventories` field instead. + // A VM is selected if it's OS short name matches with any of the // values provided in this list. - repeated string os_short_names = 2; + repeated string os_short_names = 2 [deprecated = true]; // List of label sets used for VM inclusion. // @@ -85,11 +105,13 @@ message OSPolicyAssignment { // // If the list has more than one label set, the VM is excluded if any // of the label sets are applicable for the VM. - // - // This filter is applied last in the filtering chain and therefore a - // VM is guaranteed to be excluded if it satisfies one of the below - // label sets. repeated LabelSet exclusion_labels = 4; + + // List of inventories to select VMs. + // + // A VM is selected if its inventory data matches at least one of the + // following inventories. + repeated Inventory inventories = 5; } // Message to configure the rollout at the zonal level for the OS policy @@ -161,6 +183,10 @@ message OSPolicyAssignment { // Output only. The timestamp that the revision was created. google.protobuf.Timestamp revision_create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + // The etag for this OS policy assignment. + // If this is provided on update, it must match the server's etag. + string etag = 8; + // Output only. OS policy assignment rollout state RolloutState rollout_state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_common.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_common.proto index 9cd376c5..3d5b6fe4 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_common.proto +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_common.proto @@ -16,6 +16,8 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; + option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; option java_multiple_files = true; diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto index 8d979fd5..bb73fbd0 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/resource.proto"; import "google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto"; import "google/cloud/osconfig/v1alpha/inventory.proto"; +import "google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto"; import "google/cloud/osconfig/v1alpha/os_policy_assignments.proto"; import "google/cloud/osconfig/v1alpha/vulnerability.proto"; import "google/longrunning/operations.proto"; @@ -143,6 +144,7 @@ service OsConfigZonalService { // Get OS policies compliance data for the specified Compute Engine VM // instance. rpc GetInstanceOSPoliciesCompliance(GetInstanceOSPoliciesComplianceRequest) returns (InstanceOSPoliciesCompliance) { + option deprecated = true; option (google.api.http) = { get: "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}" }; @@ -152,12 +154,31 @@ service OsConfigZonalService { // List OS policies compliance data for all Compute Engine VM instances in the // specified zone. rpc ListInstanceOSPoliciesCompliances(ListInstanceOSPoliciesCompliancesRequest) returns (ListInstanceOSPoliciesCompliancesResponse) { + option deprecated = true; option (google.api.http) = { get: "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances" }; option (google.api.method_signature) = "parent"; } + // Get the OS policy asssignment report for the specified Compute Engine VM + // instance. + rpc GetOSPolicyAssignmentReport(GetOSPolicyAssignmentReportRequest) returns (OSPolicyAssignmentReport) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/instances/*/osPolicyAssignments/*/report}" + }; + option (google.api.method_signature) = "name"; + } + + // List OS policy asssignment reports for all Compute Engine VM instances in + // the specified zone. + rpc ListOSPolicyAssignmentReports(ListOSPolicyAssignmentReportsRequest) returns (ListOSPolicyAssignmentReportsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/instances/*/osPolicyAssignments/*}/reports" + }; + option (google.api.method_signature) = "parent"; + } + // Get inventory data for the specified VM instance. If the VM has no // associated inventory, the message `NOT_FOUND` is returned. rpc GetInventory(GetInventoryRequest) returns (Inventory) { diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/vulnerability.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/vulnerability.proto index 6b9a5eb1..668991a2 100644 --- a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/vulnerability.proto +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/vulnerability.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.osconfig.v1alpha; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; @@ -48,6 +49,9 @@ message VulnerabilityReport { message Reference { // The url of the reference. string url = 1; + + // The source of the reference e.g. NVD. + string source = 2; } // The CVE of the vulnerability. CVE cannot be @@ -72,6 +76,32 @@ message VulnerabilityReport { repeated Reference references = 6; } + // OS inventory item that is affected by a vulnerability or fixed as a + // result of a vulnerability. + message Item { + // Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + // This field displays the inventory items affected by this vulnerability. + // If the vulnerability report was not updated after the VM inventory + // update, these values might not display in VM inventory. For some + // operating systems, this field might be empty. + string installed_inventory_item_id = 1; + + // Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + // If the vulnerability report was not updated after the VM inventory + // update, these values might not display in VM inventory. If there is no + // available fix, the field is empty. The `inventory_item` value specifies + // the latest `SoftwarePackage` available to the VM that fixes the + // vulnerability. + string available_inventory_item_id = 2; + + // The recommended [CPE URI](https://cpe.mitre.org/specification/) update + // that contains a fix for this vulnerability. + string fixed_cpe_uri = 3; + + // The upstream OS patch, packages or KB that fixes the vulnerability. + string upstream_fix = 4; + } + // Contains metadata as per the upstream feed of the operating system and // NVD. Details details = 1; @@ -81,7 +111,7 @@ message VulnerabilityReport { // If the vulnerability report was not updated after the VM inventory // update, these values might not display in VM inventory. For some distros, // this field may be empty. - repeated string installed_inventory_item_ids = 2; + repeated string installed_inventory_item_ids = 2 [deprecated = true]; // Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. // If the vulnerability report was not updated after the VM inventory @@ -89,13 +119,16 @@ message VulnerabilityReport { // available fix, the field is empty. The `inventory_item` value specifies // the latest `SoftwarePackage` available to the VM that fixes the // vulnerability. - repeated string available_inventory_item_ids = 3; + repeated string available_inventory_item_ids = 3 [deprecated = true]; // The timestamp for when the vulnerability was first detected. google.protobuf.Timestamp create_time = 4; // The timestamp for when the vulnerability was last modified. google.protobuf.Timestamp update_time = 5; + + // List of items affected by the vulnerability. + repeated Item items = 6; } // Output only. The `vulnerabilityReport` API resource name. @@ -105,13 +138,11 @@ message VulnerabilityReport { string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. List of vulnerabilities affecting the VM. - repeated Vulnerability vulnerabilities = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated Vulnerability vulnerabilities = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The timestamp for when the last vulnerability report was - // generated for the VM. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The timestamp for when the last vulnerability report was generated for the + // VM. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request message for getting the vulnerability report for the specified VM. @@ -137,11 +168,9 @@ message GetVulnerabilityReportRequest { message ListVulnerabilityReportsRequest { // Required. The parent resource name. // - // Format: `projects/{project}/locations/{location}/instances/{instance}` + // Format: `projects/{project}/locations/{location}/instances/-` // // For `{project}`, either `project-number` or `project-id` can be provided. - // For `{instance}`, only `-` character is supported to list vulnerability - // reports across VMs. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/proto-google-cloud-os-config-v1beta/clirr-ignored-differences.xml b/proto-google-cloud-os-config-v1beta/clirr-ignored-differences.xml index 70e35c15..92cb466e 100644 --- a/proto-google-cloud-os-config-v1beta/clirr-ignored-differences.xml +++ b/proto-google-cloud-os-config-v1beta/clirr-ignored-differences.xml @@ -1,5 +1,24 @@ - + + 7012 + com/google/cloud/osconfig/v1beta/PatchDeployments* + * get*(*) + + + 7012 + com/google/cloud/osconfig/v1beta/PatchJobs* + * get*(*) + + + 7012 + com/google/cloud/osconfig/v1beta/PatchDeployments* + * has*(*) + + + 7012 + com/google/cloud/osconfig/v1beta/PatchJobs* + * has*(*) + diff --git a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/Common.java b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/Common.java new file mode 100644 index 00000000..c1aaa3b2 --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/Common.java @@ -0,0 +1,925 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1beta/osconfig_common.proto + +package com.google.cloud.osconfig.v1beta; + +public final class Common { + private Common() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public interface FixedOrPercentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.FixedOrPercent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Specifies a fixed value.
+     * 
+ * + * int32 fixed = 1; + * + * @return Whether the fixed field is set. + */ + boolean hasFixed(); + /** + * + * + *
+     * Specifies a fixed value.
+     * 
+ * + * int32 fixed = 1; + * + * @return The fixed. + */ + int getFixed(); + + /** + * + * + *
+     * Specifies the relative value defined as a percentage, which will be
+     * multiplied by a reference value.
+     * 
+ * + * int32 percent = 2; + * + * @return Whether the percent field is set. + */ + boolean hasPercent(); + /** + * + * + *
+     * Specifies the relative value defined as a percentage, which will be
+     * multiplied by a reference value.
+     * 
+ * + * int32 percent = 2; + * + * @return The percent. + */ + int getPercent(); + + public com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.ModeCase getModeCase(); + } + /** + * + * + *
+   * Message encapsulating a value that can be either absolute ("fixed") or
+   * relative ("percent") to a value.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.FixedOrPercent} + */ + public static final class FixedOrPercent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.FixedOrPercent) + FixedOrPercentOrBuilder { + private static final long serialVersionUID = 0L; + // Use FixedOrPercent.newBuilder() to construct. + private FixedOrPercent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FixedOrPercent() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FixedOrPercent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FixedOrPercent( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + modeCase_ = 1; + mode_ = input.readInt32(); + break; + } + case 16: + { + modeCase_ = 2; + mode_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.Common + .internal_static_google_cloud_osconfig_v1beta_FixedOrPercent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.Common + .internal_static_google_cloud_osconfig_v1beta_FixedOrPercent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.class, + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.Builder.class); + } + + private int modeCase_ = 0; + private java.lang.Object mode_; + + public enum ModeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FIXED(1), + PERCENT(2), + MODE_NOT_SET(0); + private final int value; + + private ModeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ModeCase valueOf(int value) { + return forNumber(value); + } + + public static ModeCase forNumber(int value) { + switch (value) { + case 1: + return FIXED; + case 2: + return PERCENT; + case 0: + return MODE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ModeCase getModeCase() { + return ModeCase.forNumber(modeCase_); + } + + public static final int FIXED_FIELD_NUMBER = 1; + /** + * + * + *
+     * Specifies a fixed value.
+     * 
+ * + * int32 fixed = 1; + * + * @return Whether the fixed field is set. + */ + @java.lang.Override + public boolean hasFixed() { + return modeCase_ == 1; + } + /** + * + * + *
+     * Specifies a fixed value.
+     * 
+ * + * int32 fixed = 1; + * + * @return The fixed. + */ + @java.lang.Override + public int getFixed() { + if (modeCase_ == 1) { + return (java.lang.Integer) mode_; + } + return 0; + } + + public static final int PERCENT_FIELD_NUMBER = 2; + /** + * + * + *
+     * Specifies the relative value defined as a percentage, which will be
+     * multiplied by a reference value.
+     * 
+ * + * int32 percent = 2; + * + * @return Whether the percent field is set. + */ + @java.lang.Override + public boolean hasPercent() { + return modeCase_ == 2; + } + /** + * + * + *
+     * Specifies the relative value defined as a percentage, which will be
+     * multiplied by a reference value.
+     * 
+ * + * int32 percent = 2; + * + * @return The percent. + */ + @java.lang.Override + public int getPercent() { + if (modeCase_ == 2) { + return (java.lang.Integer) mode_; + } + return 0; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (modeCase_ == 1) { + output.writeInt32(1, (int) ((java.lang.Integer) mode_)); + } + if (modeCase_ == 2) { + output.writeInt32(2, (int) ((java.lang.Integer) mode_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (modeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 1, (int) ((java.lang.Integer) mode_)); + } + if (modeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 2, (int) ((java.lang.Integer) mode_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1beta.Common.FixedOrPercent)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent other = + (com.google.cloud.osconfig.v1beta.Common.FixedOrPercent) obj; + + if (!getModeCase().equals(other.getModeCase())) return false; + switch (modeCase_) { + case 1: + if (getFixed() != other.getFixed()) return false; + break; + case 2: + if (getPercent() != other.getPercent()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (modeCase_) { + case 1: + hash = (37 * hash) + FIXED_FIELD_NUMBER; + hash = (53 * hash) + getFixed(); + break; + case 2: + hash = (37 * hash) + PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getPercent(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Message encapsulating a value that can be either absolute ("fixed") or
+     * relative ("percent") to a value.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.FixedOrPercent} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.FixedOrPercent) + com.google.cloud.osconfig.v1beta.Common.FixedOrPercentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.Common + .internal_static_google_cloud_osconfig_v1beta_FixedOrPercent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.Common + .internal_static_google_cloud_osconfig_v1beta_FixedOrPercent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.class, + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + modeCase_ = 0; + mode_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.Common + .internal_static_google_cloud_osconfig_v1beta_FixedOrPercent_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.Common.FixedOrPercent getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.Common.FixedOrPercent build() { + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.Common.FixedOrPercent buildPartial() { + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent result = + new com.google.cloud.osconfig.v1beta.Common.FixedOrPercent(this); + if (modeCase_ == 1) { + result.mode_ = mode_; + } + if (modeCase_ == 2) { + result.mode_ = mode_; + } + result.modeCase_ = modeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1beta.Common.FixedOrPercent) { + return mergeFrom((com.google.cloud.osconfig.v1beta.Common.FixedOrPercent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.Common.FixedOrPercent other) { + if (other == com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.getDefaultInstance()) + return this; + switch (other.getModeCase()) { + case FIXED: + { + setFixed(other.getFixed()); + break; + } + case PERCENT: + { + setPercent(other.getPercent()); + break; + } + case MODE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.Common.FixedOrPercent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modeCase_ = 0; + private java.lang.Object mode_; + + public ModeCase getModeCase() { + return ModeCase.forNumber(modeCase_); + } + + public Builder clearMode() { + modeCase_ = 0; + mode_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+       * Specifies a fixed value.
+       * 
+ * + * int32 fixed = 1; + * + * @return Whether the fixed field is set. + */ + public boolean hasFixed() { + return modeCase_ == 1; + } + /** + * + * + *
+       * Specifies a fixed value.
+       * 
+ * + * int32 fixed = 1; + * + * @return The fixed. + */ + public int getFixed() { + if (modeCase_ == 1) { + return (java.lang.Integer) mode_; + } + return 0; + } + /** + * + * + *
+       * Specifies a fixed value.
+       * 
+ * + * int32 fixed = 1; + * + * @param value The fixed to set. + * @return This builder for chaining. + */ + public Builder setFixed(int value) { + modeCase_ = 1; + mode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Specifies a fixed value.
+       * 
+ * + * int32 fixed = 1; + * + * @return This builder for chaining. + */ + public Builder clearFixed() { + if (modeCase_ == 1) { + modeCase_ = 0; + mode_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Specifies the relative value defined as a percentage, which will be
+       * multiplied by a reference value.
+       * 
+ * + * int32 percent = 2; + * + * @return Whether the percent field is set. + */ + public boolean hasPercent() { + return modeCase_ == 2; + } + /** + * + * + *
+       * Specifies the relative value defined as a percentage, which will be
+       * multiplied by a reference value.
+       * 
+ * + * int32 percent = 2; + * + * @return The percent. + */ + public int getPercent() { + if (modeCase_ == 2) { + return (java.lang.Integer) mode_; + } + return 0; + } + /** + * + * + *
+       * Specifies the relative value defined as a percentage, which will be
+       * multiplied by a reference value.
+       * 
+ * + * int32 percent = 2; + * + * @param value The percent to set. + * @return This builder for chaining. + */ + public Builder setPercent(int value) { + modeCase_ = 2; + mode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Specifies the relative value defined as a percentage, which will be
+       * multiplied by a reference value.
+       * 
+ * + * int32 percent = 2; + * + * @return This builder for chaining. + */ + public Builder clearPercent() { + if (modeCase_ == 2) { + modeCase_ = 0; + mode_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1beta.FixedOrPercent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.FixedOrPercent) + private static final com.google.cloud.osconfig.v1beta.Common.FixedOrPercent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.Common.FixedOrPercent(); + } + + public static com.google.cloud.osconfig.v1beta.Common.FixedOrPercent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FixedOrPercent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FixedOrPercent(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.Common.FixedOrPercent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_FixedOrPercent_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_FixedOrPercent_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/osconfig/v1beta/osconfig_" + + "common.proto\022\034google.cloud.osconfig.v1be" + + "ta\032\034google/api/annotations.proto\"<\n\016Fixe" + + "dOrPercent\022\017\n\005fixed\030\001 \001(\005H\000\022\021\n\007percent\030\002" + + " \001(\005H\000B\006\n\004modeBp\n com.google.cloud.oscon" + + "fig.v1betaB\006CommonZDgoogle.golang.org/ge" + + "nproto/googleapis/cloud/osconfig/v1beta;" + + "osconfigb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_osconfig_v1beta_FixedOrPercent_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1beta_FixedOrPercent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_FixedOrPercent_descriptor, + new java.lang.String[] { + "Fixed", "Percent", "Mode", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/GuestPolicies.java b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/GuestPolicies.java index 83de50f6..91d9f735 100644 --- a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/GuestPolicies.java +++ b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/GuestPolicies.java @@ -18230,10 +18230,9 @@ public interface SoftwareRecipeOrBuilder * recipe. * INSTALLED: The software recipe is installed on the instance but * won't be updated to new versions. - * INSTALLED_KEEP_UPDATED: The software recipe is installed on the - * instance. The recipe is updated to a higher - * version, if a higher version of the recipe is - * assigned to this instance. + * UPDATED: The software recipe is installed on the instance. The recipe is + * updated to a higher version, if a higher version of the recipe is + * assigned to this instance. * REMOVE: Remove is unsupported for software recipes and attempts to * create or update a recipe to the REMOVE state is rejected. * @@ -18251,10 +18250,9 @@ public interface SoftwareRecipeOrBuilder * recipe. * INSTALLED: The software recipe is installed on the instance but * won't be updated to new versions. - * INSTALLED_KEEP_UPDATED: The software recipe is installed on the - * instance. The recipe is updated to a higher - * version, if a higher version of the recipe is - * assigned to this instance. + * UPDATED: The software recipe is installed on the instance. The recipe is + * updated to a higher version, if a higher version of the recipe is + * assigned to this instance. * REMOVE: Remove is unsupported for software recipes and attempts to * create or update a recipe to the REMOVE state is rejected. * @@ -18281,7 +18279,7 @@ public interface SoftwareRecipeOrBuilder * Updating a software recipe * If a recipe is assigned to an instance and there is a recipe with the same * name but a lower version already installed and the assigned state - * of the recipe is `INSTALLED_KEEP_UPDATED`, then the recipe is updated to + * of the recipe is `UPDATED`, then the recipe is updated to * the new version. * Script Working Directories * Each script or execution step is run in its own temporary directory which @@ -34432,10 +34430,9 @@ public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step getUpd * recipe. * INSTALLED: The software recipe is installed on the instance but * won't be updated to new versions. - * INSTALLED_KEEP_UPDATED: The software recipe is installed on the - * instance. The recipe is updated to a higher - * version, if a higher version of the recipe is - * assigned to this instance. + * UPDATED: The software recipe is installed on the instance. The recipe is + * updated to a higher version, if a higher version of the recipe is + * assigned to this instance. * REMOVE: Remove is unsupported for software recipes and attempts to * create or update a recipe to the REMOVE state is rejected. * @@ -34456,10 +34453,9 @@ public int getDesiredStateValue() { * recipe. * INSTALLED: The software recipe is installed on the instance but * won't be updated to new versions. - * INSTALLED_KEEP_UPDATED: The software recipe is installed on the - * instance. The recipe is updated to a higher - * version, if a higher version of the recipe is - * assigned to this instance. + * UPDATED: The software recipe is installed on the instance. The recipe is + * updated to a higher version, if a higher version of the recipe is + * assigned to this instance. * REMOVE: Remove is unsupported for software recipes and attempts to * create or update a recipe to the REMOVE state is rejected. * @@ -34710,7 +34706,7 @@ protected Builder newBuilderForType( * Updating a software recipe * If a recipe is assigned to an instance and there is a recipe with the same * name but a lower version already installed and the assigned state - * of the recipe is `INSTALLED_KEEP_UPDATED`, then the recipe is updated to + * of the recipe is `UPDATED`, then the recipe is updated to * the new version. * Script Working Directories * Each script or execution step is run in its own temporary directory which @@ -36479,10 +36475,9 @@ public Builder removeUpdateSteps(int index) { * recipe. * INSTALLED: The software recipe is installed on the instance but * won't be updated to new versions. - * INSTALLED_KEEP_UPDATED: The software recipe is installed on the - * instance. The recipe is updated to a higher - * version, if a higher version of the recipe is - * assigned to this instance. + * UPDATED: The software recipe is installed on the instance. The recipe is + * updated to a higher version, if a higher version of the recipe is + * assigned to this instance. * REMOVE: Remove is unsupported for software recipes and attempts to * create or update a recipe to the REMOVE state is rejected. * @@ -36503,10 +36498,9 @@ public int getDesiredStateValue() { * recipe. * INSTALLED: The software recipe is installed on the instance but * won't be updated to new versions. - * INSTALLED_KEEP_UPDATED: The software recipe is installed on the - * instance. The recipe is updated to a higher - * version, if a higher version of the recipe is - * assigned to this instance. + * UPDATED: The software recipe is installed on the instance. The recipe is + * updated to a higher version, if a higher version of the recipe is + * assigned to this instance. * REMOVE: Remove is unsupported for software recipes and attempts to * create or update a recipe to the REMOVE state is rejected. * @@ -36530,10 +36524,9 @@ public Builder setDesiredStateValue(int value) { * recipe. * INSTALLED: The software recipe is installed on the instance but * won't be updated to new versions. - * INSTALLED_KEEP_UPDATED: The software recipe is installed on the - * instance. The recipe is updated to a higher - * version, if a higher version of the recipe is - * assigned to this instance. + * UPDATED: The software recipe is installed on the instance. The recipe is + * updated to a higher version, if a higher version of the recipe is + * assigned to this instance. * REMOVE: Remove is unsupported for software recipes and attempts to * create or update a recipe to the REMOVE state is rejected. * @@ -36559,10 +36552,9 @@ public com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState getDesiredSta * recipe. * INSTALLED: The software recipe is installed on the instance but * won't be updated to new versions. - * INSTALLED_KEEP_UPDATED: The software recipe is installed on the - * instance. The recipe is updated to a higher - * version, if a higher version of the recipe is - * assigned to this instance. + * UPDATED: The software recipe is installed on the instance. The recipe is + * updated to a higher version, if a higher version of the recipe is + * assigned to this instance. * REMOVE: Remove is unsupported for software recipes and attempts to * create or update a recipe to the REMOVE state is rejected. * @@ -36590,10 +36582,9 @@ public Builder setDesiredState( * recipe. * INSTALLED: The software recipe is installed on the instance but * won't be updated to new versions. - * INSTALLED_KEEP_UPDATED: The software recipe is installed on the - * instance. The recipe is updated to a higher - * version, if a higher version of the recipe is - * assigned to this instance. + * UPDATED: The software recipe is installed on the instance. The recipe is + * updated to a higher version, if a higher version of the recipe is + * assigned to this instance. * REMOVE: Remove is unsupported for software recipes and attempts to * create or update a recipe to the REMOVE state is rejected. * @@ -49901,163 +49892,165 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n1google/cloud/osconfig/v1beta/guest_pol" + "icies.proto\022\034google.cloud.osconfig.v1bet" - + "a\032\037google/api/field_behavior.proto\032\031goog" - + "le/api/resource.proto\032 google/protobuf/f" - + "ield_mask.proto\032\037google/protobuf/timesta" - + "mp.proto\"\224\004\n\013GuestPolicy\022\021\n\004name\030\001 \001(\tB\003" - + "\340A\002\022\023\n\013description\030\002 \001(\t\0224\n\013create_time\030" - + "\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224" - + "\n\013update_time\030\004 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\022A\n\nassignment\030\006 \001(\0132(.googl" - + "e.cloud.osconfig.v1beta.AssignmentB\003\340A\002\022" - + "7\n\010packages\030\007 \003(\0132%.google.cloud.osconfi" - + "g.v1beta.Package\022M\n\024package_repositories" - + "\030\010 \003(\0132/.google.cloud.osconfig.v1beta.Pa" - + "ckageRepository\022=\n\007recipes\030\t \003(\0132,.googl" - + "e.cloud.osconfig.v1beta.SoftwareRecipe\022\014" - + "\n\004etag\030\n \001(\t:Y\352AV\n#osconfig.googleapis.c" - + "om/GuestPolicy\022/projects/{project}/guest" - + "Policies/{guest_policy}\"\271\003\n\nAssignment\022I" - + "\n\014group_labels\030\001 \003(\01323.google.cloud.osco" - + "nfig.v1beta.Assignment.GroupLabel\022\r\n\005zon" - + "es\030\002 \003(\t\022\021\n\tinstances\030\003 \003(\t\022\036\n\026instance_" - + "name_prefixes\030\004 \003(\t\022A\n\010os_types\030\005 \003(\0132/." - + "google.cloud.osconfig.v1beta.Assignment." - + "OsType\032\214\001\n\nGroupLabel\022O\n\006labels\030\001 \003(\0132?." - + "google.cloud.osconfig.v1beta.Assignment." - + "GroupLabel.LabelsEntry\032-\n\013LabelsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032L\n\006OsType\022" - + "\025\n\ros_short_name\030\001 \001(\t\022\022\n\nos_version\030\002 \001" - + "(\t\022\027\n\017os_architecture\030\003 \001(\t\"\363\001\n\007Package\022" - + "\021\n\004name\030\001 \001(\tB\003\340A\002\022A\n\rdesired_state\030\002 \001(" - + "\0162*.google.cloud.osconfig.v1beta.Desired" - + "State\022>\n\007manager\030\003 \001(\0162-.google.cloud.os" - + "config.v1beta.Package.Manager\"R\n\007Manager" - + "\022\027\n\023MANAGER_UNSPECIFIED\020\000\022\007\n\003ANY\020\001\022\007\n\003AP" - + "T\020\002\022\007\n\003YUM\020\003\022\n\n\006ZYPPER\020\004\022\007\n\003GOO\020\005\"\370\001\n\rAp" - + "tRepository\022M\n\014archive_type\030\001 \001(\01627.goog" - + "le.cloud.osconfig.v1beta.AptRepository.A" - + "rchiveType\022\020\n\003uri\030\002 \001(\tB\003\340A\002\022\031\n\014distribu" - + "tion\030\003 \001(\tB\003\340A\002\022\027\n\ncomponents\030\004 \003(\tB\003\340A\002" - + "\022\017\n\007gpg_key\030\005 \001(\t\"A\n\013ArchiveType\022\034\n\030ARCH" - + "IVE_TYPE_UNSPECIFIED\020\000\022\007\n\003DEB\020\001\022\013\n\007DEB_S" - + "RC\020\002\"_\n\rYumRepository\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\024" - + "\n\014display_name\030\002 \001(\t\022\025\n\010base_url\030\003 \001(\tB\003" - + "\340A\002\022\020\n\010gpg_keys\030\004 \003(\t\"b\n\020ZypperRepositor" - + "y\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\024\n\014display_name\030\002 \001(\t" - + "\022\025\n\010base_url\030\003 \001(\tB\003\340A\002\022\020\n\010gpg_keys\030\004 \003(" - + "\t\"4\n\rGooRepository\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\020\n" - + "\003url\030\002 \001(\tB\003\340A\002\"\227\002\n\021PackageRepository\022:\n" - + "\003apt\030\001 \001(\0132+.google.cloud.osconfig.v1bet" - + "a.AptRepositoryH\000\022:\n\003yum\030\002 \001(\0132+.google." - + "cloud.osconfig.v1beta.YumRepositoryH\000\022@\n" - + "\006zypper\030\003 \001(\0132..google.cloud.osconfig.v1" - + "beta.ZypperRepositoryH\000\022:\n\003goo\030\004 \001(\0132+.g" - + "oogle.cloud.osconfig.v1beta.GooRepositor" - + "yH\000B\014\n\nrepository\"\206\021\n\016SoftwareRecipe\022\021\n\004" - + "name\030\001 \001(\tB\003\340A\002\022\017\n\007version\030\002 \001(\t\022H\n\tarti" - + "facts\030\003 \003(\01325.google.cloud.osconfig.v1be" - + "ta.SoftwareRecipe.Artifact\022H\n\rinstall_st" - + "eps\030\004 \003(\01321.google.cloud.osconfig.v1beta" - + ".SoftwareRecipe.Step\022G\n\014update_steps\030\005 \003" - + "(\01321.google.cloud.osconfig.v1beta.Softwa" - + "reRecipe.Step\022A\n\rdesired_state\030\006 \001(\0162*.g" - + "oogle.cloud.osconfig.v1beta.DesiredState" - + "\032\275\002\n\010Artifact\022\017\n\002id\030\001 \001(\tB\003\340A\002\022N\n\006remote" - + "\030\002 \001(\0132<.google.cloud.osconfig.v1beta.So" - + "ftwareRecipe.Artifact.RemoteH\000\022H\n\003gcs\030\003 " - + "\001(\01329.google.cloud.osconfig.v1beta.Softw" - + "areRecipe.Artifact.GcsH\000\022\026\n\016allow_insecu" - + "re\030\004 \001(\010\032\'\n\006Remote\022\013\n\003uri\030\001 \001(\t\022\020\n\010check" - + "sum\030\002 \001(\t\0329\n\003Gcs\022\016\n\006bucket\030\001 \001(\t\022\016\n\006obje" - + "ct\030\002 \001(\t\022\022\n\ngeneration\030\003 \001(\003B\n\n\010artifact" - + "\032\357\013\n\004Step\022O\n\tfile_copy\030\001 \001(\0132:.google.cl" + + "a\032\034google/api/annotations.proto\032\037google/" + + "api/field_behavior.proto\032\031google/api/res" + + "ource.proto\032 google/protobuf/field_mask." + + "proto\032\037google/protobuf/timestamp.proto\"\224" + + "\004\n\013GuestPolicy\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\023\n\013des" + + "cription\030\002 \001(\t\0224\n\013create_time\030\003 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\0224\n\013update_t" + + "ime\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340" + + "A\003\022A\n\nassignment\030\006 \001(\0132(.google.cloud.os" + + "config.v1beta.AssignmentB\003\340A\002\0227\n\010package" + + "s\030\007 \003(\0132%.google.cloud.osconfig.v1beta.P" + + "ackage\022M\n\024package_repositories\030\010 \003(\0132/.g" + + "oogle.cloud.osconfig.v1beta.PackageRepos" + + "itory\022=\n\007recipes\030\t \003(\0132,.google.cloud.os" + + "config.v1beta.SoftwareRecipe\022\014\n\004etag\030\n \001" + + "(\t:Y\352AV\n#osconfig.googleapis.com/GuestPo" + + "licy\022/projects/{project}/guestPolicies/{" + + "guest_policy}\"\271\003\n\nAssignment\022I\n\014group_la" + + "bels\030\001 \003(\01323.google.cloud.osconfig.v1bet" + + "a.Assignment.GroupLabel\022\r\n\005zones\030\002 \003(\t\022\021" + + "\n\tinstances\030\003 \003(\t\022\036\n\026instance_name_prefi" + + "xes\030\004 \003(\t\022A\n\010os_types\030\005 \003(\0132/.google.clo" + + "ud.osconfig.v1beta.Assignment.OsType\032\214\001\n" + + "\nGroupLabel\022O\n\006labels\030\001 \003(\0132?.google.clo" + + "ud.osconfig.v1beta.Assignment.GroupLabel" + + ".LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t" + + "\022\r\n\005value\030\002 \001(\t:\0028\001\032L\n\006OsType\022\025\n\ros_shor" + + "t_name\030\001 \001(\t\022\022\n\nos_version\030\002 \001(\t\022\027\n\017os_a" + + "rchitecture\030\003 \001(\t\"\363\001\n\007Package\022\021\n\004name\030\001 " + + "\001(\tB\003\340A\002\022A\n\rdesired_state\030\002 \001(\0162*.google" + + ".cloud.osconfig.v1beta.DesiredState\022>\n\007m" + + "anager\030\003 \001(\0162-.google.cloud.osconfig.v1b" + + "eta.Package.Manager\"R\n\007Manager\022\027\n\023MANAGE" + + "R_UNSPECIFIED\020\000\022\007\n\003ANY\020\001\022\007\n\003APT\020\002\022\007\n\003YUM" + + "\020\003\022\n\n\006ZYPPER\020\004\022\007\n\003GOO\020\005\"\370\001\n\rAptRepositor" + + "y\022M\n\014archive_type\030\001 \001(\01627.google.cloud.o" + + "sconfig.v1beta.AptRepository.ArchiveType" + + "\022\020\n\003uri\030\002 \001(\tB\003\340A\002\022\031\n\014distribution\030\003 \001(\t" + + "B\003\340A\002\022\027\n\ncomponents\030\004 \003(\tB\003\340A\002\022\017\n\007gpg_ke" + + "y\030\005 \001(\t\"A\n\013ArchiveType\022\034\n\030ARCHIVE_TYPE_U" + + "NSPECIFIED\020\000\022\007\n\003DEB\020\001\022\013\n\007DEB_SRC\020\002\"_\n\rYu" + + "mRepository\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\024\n\014display_" + + "name\030\002 \001(\t\022\025\n\010base_url\030\003 \001(\tB\003\340A\002\022\020\n\010gpg" + + "_keys\030\004 \003(\t\"b\n\020ZypperRepository\022\017\n\002id\030\001 " + + "\001(\tB\003\340A\002\022\024\n\014display_name\030\002 \001(\t\022\025\n\010base_u" + + "rl\030\003 \001(\tB\003\340A\002\022\020\n\010gpg_keys\030\004 \003(\t\"4\n\rGooRe" + + "pository\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\020\n\003url\030\002 \001(\t" + + "B\003\340A\002\"\227\002\n\021PackageRepository\022:\n\003apt\030\001 \001(\013" + + "2+.google.cloud.osconfig.v1beta.AptRepos" + + "itoryH\000\022:\n\003yum\030\002 \001(\0132+.google.cloud.osco" + + "nfig.v1beta.YumRepositoryH\000\022@\n\006zypper\030\003 " + + "\001(\0132..google.cloud.osconfig.v1beta.Zyppe" + + "rRepositoryH\000\022:\n\003goo\030\004 \001(\0132+.google.clou" + + "d.osconfig.v1beta.GooRepositoryH\000B\014\n\nrep" + + "ository\"\206\021\n\016SoftwareRecipe\022\021\n\004name\030\001 \001(\t" + + "B\003\340A\002\022\017\n\007version\030\002 \001(\t\022H\n\tartifacts\030\003 \003(" + + "\01325.google.cloud.osconfig.v1beta.Softwar" + + "eRecipe.Artifact\022H\n\rinstall_steps\030\004 \003(\0132" + + "1.google.cloud.osconfig.v1beta.SoftwareR" + + "ecipe.Step\022G\n\014update_steps\030\005 \003(\01321.googl" + + "e.cloud.osconfig.v1beta.SoftwareRecipe.S" + + "tep\022A\n\rdesired_state\030\006 \001(\0162*.google.clou" + + "d.osconfig.v1beta.DesiredState\032\275\002\n\010Artif" + + "act\022\017\n\002id\030\001 \001(\tB\003\340A\002\022N\n\006remote\030\002 \001(\0132<.g" + + "oogle.cloud.osconfig.v1beta.SoftwareReci" + + "pe.Artifact.RemoteH\000\022H\n\003gcs\030\003 \001(\01329.goog" + + "le.cloud.osconfig.v1beta.SoftwareRecipe." + + "Artifact.GcsH\000\022\026\n\016allow_insecure\030\004 \001(\010\032\'" + + "\n\006Remote\022\013\n\003uri\030\001 \001(\t\022\020\n\010checksum\030\002 \001(\t\032" + + "9\n\003Gcs\022\016\n\006bucket\030\001 \001(\t\022\016\n\006object\030\002 \001(\t\022\022" + + "\n\ngeneration\030\003 \001(\003B\n\n\010artifact\032\357\013\n\004Step\022" + + "O\n\tfile_copy\030\001 \001(\0132:.google.cloud.osconf" + + "ig.v1beta.SoftwareRecipe.Step.CopyFileH\000" + + "\022^\n\022archive_extraction\030\002 \001(\0132@.google.cl" + "oud.osconfig.v1beta.SoftwareRecipe.Step." - + "CopyFileH\000\022^\n\022archive_extraction\030\002 \001(\0132@" - + ".google.cloud.osconfig.v1beta.SoftwareRe" - + "cipe.Step.ExtractArchiveH\000\022X\n\020msi_instal" - + "lation\030\003 \001(\0132<.google.cloud.osconfig.v1b" - + "eta.SoftwareRecipe.Step.InstallMsiH\000\022Z\n\021" - + "dpkg_installation\030\004 \001(\0132=.google.cloud.o" - + "sconfig.v1beta.SoftwareRecipe.Step.Insta" - + "llDpkgH\000\022X\n\020rpm_installation\030\005 \001(\0132<.goo" - + "gle.cloud.osconfig.v1beta.SoftwareRecipe" - + ".Step.InstallRpmH\000\022O\n\tfile_exec\030\006 \001(\0132:." - + "google.cloud.osconfig.v1beta.SoftwareRec" - + "ipe.Step.ExecFileH\000\022Q\n\nscript_run\030\007 \001(\0132" - + ";.google.cloud.osconfig.v1beta.SoftwareR" - + "ecipe.Step.RunScriptH\000\032f\n\010CopyFile\022\030\n\013ar" - + "tifact_id\030\001 \001(\tB\003\340A\002\022\030\n\013destination\030\002 \001(" - + "\tB\003\340A\002\022\021\n\toverwrite\030\003 \001(\010\022\023\n\013permissions" - + "\030\004 \001(\t\032\225\002\n\016ExtractArchive\022\030\n\013artifact_id" - + "\030\001 \001(\tB\003\340A\002\022\023\n\013destination\030\002 \001(\t\022_\n\004type" - + "\030\003 \001(\0162L.google.cloud.osconfig.v1beta.So" - + "ftwareRecipe.Step.ExtractArchive.Archive" - + "TypeB\003\340A\002\"s\n\013ArchiveType\022\034\n\030ARCHIVE_TYPE" - + "_UNSPECIFIED\020\000\022\007\n\003TAR\020\001\022\014\n\010TAR_GZIP\020\002\022\014\n" - + "\010TAR_BZIP\020\003\022\014\n\010TAR_LZMA\020\004\022\n\n\006TAR_XZ\020\005\022\007\n" - + "\003ZIP\020\013\032Q\n\nInstallMsi\022\030\n\013artifact_id\030\001 \001(" - + "\tB\003\340A\002\022\r\n\005flags\030\002 \003(\t\022\032\n\022allowed_exit_co" - + "des\030\003 \003(\005\032\'\n\013InstallDpkg\022\030\n\013artifact_id\030" - + "\001 \001(\tB\003\340A\002\032&\n\nInstallRpm\022\030\n\013artifact_id\030" - + "\001 \001(\tB\003\340A\002\032r\n\010ExecFile\022\025\n\013artifact_id\030\001 " - + "\001(\tH\000\022\024\n\nlocal_path\030\002 \001(\tH\000\022\014\n\004args\030\003 \003(" - + "\t\022\032\n\022allowed_exit_codes\030\004 \003(\005B\017\n\rlocatio" - + "n_type\032\341\001\n\tRunScript\022\023\n\006script\030\001 \001(\tB\003\340A" - + "\002\022\032\n\022allowed_exit_codes\030\002 \003(\005\022\\\n\013interpr" - + "eter\030\003 \001(\0162G.google.cloud.osconfig.v1bet" - + "a.SoftwareRecipe.Step.RunScript.Interpre" - + "ter\"E\n\013Interpreter\022\033\n\027INTERPRETER_UNSPEC" - + "IFIED\020\000\022\t\n\005SHELL\020\001\022\016\n\nPOWERSHELL\020\003B\006\n\004st" - + "ep\"\273\001\n\030CreateGuestPolicyRequest\022;\n\006paren" - + "t\030\001 \001(\tB+\340A\002\372A%\022#osconfig.googleapis.com" - + "/GuestPolicy\022\034\n\017guest_policy_id\030\002 \001(\tB\003\340" - + "A\002\022D\n\014guest_policy\030\003 \001(\0132).google.cloud." - + "osconfig.v1beta.GuestPolicyB\003\340A\002\"R\n\025GetG" - + "uestPolicyRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n" - + "#osconfig.googleapis.com/GuestPolicy\"~\n\030" - + "ListGuestPoliciesRequest\022;\n\006parent\030\001 \001(\t" - + "B+\340A\002\372A%\022#osconfig.googleapis.com/GuestP" - + "olicy\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" - + " \001(\t\"w\n\031ListGuestPoliciesResponse\022A\n\016gue" - + "st_policies\030\001 \003(\0132).google.cloud.osconfi" - + "g.v1beta.GuestPolicy\022\027\n\017next_page_token\030" - + "\002 \001(\t\"\221\001\n\030UpdateGuestPolicyRequest\022D\n\014gu" - + "est_policy\030\001 \001(\0132).google.cloud.osconfig" - + ".v1beta.GuestPolicyB\003\340A\002\022/\n\013update_mask\030" - + "\002 \001(\0132\032.google.protobuf.FieldMask\"U\n\030Del" - + "eteGuestPolicyRequest\0229\n\004name\030\001 \001(\tB+\340A\002" - + "\372A%\n#osconfig.googleapis.com/GuestPolicy" - + "\"~\n!LookupEffectiveGuestPolicyRequest\022\025\n" - + "\010instance\030\001 \001(\tB\003\340A\002\022\025\n\ros_short_name\030\002 " - + "\001(\t\022\022\n\nos_version\030\003 \001(\t\022\027\n\017os_architectu" - + "re\030\004 \001(\t\"\375\004\n\024EffectiveGuestPolicy\022S\n\010pac" - + "kages\030\001 \003(\0132A.google.cloud.osconfig.v1be" - + "ta.EffectiveGuestPolicy.SourcedPackage\022i" - + "\n\024package_repositories\030\002 \003(\0132K.google.cl" - + "oud.osconfig.v1beta.EffectiveGuestPolicy" - + ".SourcedPackageRepository\022b\n\020software_re" - + "cipes\030\003 \003(\0132H.google.cloud.osconfig.v1be" - + "ta.EffectiveGuestPolicy.SourcedSoftwareR" - + "ecipe\032X\n\016SourcedPackage\022\016\n\006source\030\001 \001(\t\022" - + "6\n\007package\030\002 \001(\0132%.google.cloud.osconfig" - + ".v1beta.Package\032w\n\030SourcedPackageReposit" - + "ory\022\016\n\006source\030\001 \001(\t\022K\n\022package_repositor" - + "y\030\002 \001(\0132/.google.cloud.osconfig.v1beta.P" - + "ackageRepository\032n\n\025SourcedSoftwareRecip" - + "e\022\016\n\006source\030\001 \001(\t\022E\n\017software_recipe\030\002 \001" - + "(\0132,.google.cloud.osconfig.v1beta.Softwa" - + "reRecipe*V\n\014DesiredState\022\035\n\031DESIRED_STAT" - + "E_UNSPECIFIED\020\000\022\r\n\tINSTALLED\020\001\022\013\n\007UPDATE" - + "D\020\002\022\013\n\007REMOVED\020\003Bw\n com.google.cloud.osc" - + "onfig.v1betaB\rGuestPoliciesZDgoogle.gola" - + "ng.org/genproto/googleapis/cloud/osconfi" - + "g/v1beta;osconfigb\006proto3" + + "ExtractArchiveH\000\022X\n\020msi_installation\030\003 \001" + + "(\0132<.google.cloud.osconfig.v1beta.Softwa" + + "reRecipe.Step.InstallMsiH\000\022Z\n\021dpkg_insta" + + "llation\030\004 \001(\0132=.google.cloud.osconfig.v1" + + "beta.SoftwareRecipe.Step.InstallDpkgH\000\022X" + + "\n\020rpm_installation\030\005 \001(\0132<.google.cloud." + + "osconfig.v1beta.SoftwareRecipe.Step.Inst" + + "allRpmH\000\022O\n\tfile_exec\030\006 \001(\0132:.google.clo" + + "ud.osconfig.v1beta.SoftwareRecipe.Step.E" + + "xecFileH\000\022Q\n\nscript_run\030\007 \001(\0132;.google.c" + + "loud.osconfig.v1beta.SoftwareRecipe.Step" + + ".RunScriptH\000\032f\n\010CopyFile\022\030\n\013artifact_id\030" + + "\001 \001(\tB\003\340A\002\022\030\n\013destination\030\002 \001(\tB\003\340A\002\022\021\n\t" + + "overwrite\030\003 \001(\010\022\023\n\013permissions\030\004 \001(\t\032\225\002\n" + + "\016ExtractArchive\022\030\n\013artifact_id\030\001 \001(\tB\003\340A" + + "\002\022\023\n\013destination\030\002 \001(\t\022_\n\004type\030\003 \001(\0162L.g" + + "oogle.cloud.osconfig.v1beta.SoftwareReci" + + "pe.Step.ExtractArchive.ArchiveTypeB\003\340A\002\"" + + "s\n\013ArchiveType\022\034\n\030ARCHIVE_TYPE_UNSPECIFI" + + "ED\020\000\022\007\n\003TAR\020\001\022\014\n\010TAR_GZIP\020\002\022\014\n\010TAR_BZIP\020" + + "\003\022\014\n\010TAR_LZMA\020\004\022\n\n\006TAR_XZ\020\005\022\007\n\003ZIP\020\013\032Q\n\n" + + "InstallMsi\022\030\n\013artifact_id\030\001 \001(\tB\003\340A\002\022\r\n\005" + + "flags\030\002 \003(\t\022\032\n\022allowed_exit_codes\030\003 \003(\005\032" + + "\'\n\013InstallDpkg\022\030\n\013artifact_id\030\001 \001(\tB\003\340A\002" + + "\032&\n\nInstallRpm\022\030\n\013artifact_id\030\001 \001(\tB\003\340A\002" + + "\032r\n\010ExecFile\022\025\n\013artifact_id\030\001 \001(\tH\000\022\024\n\nl" + + "ocal_path\030\002 \001(\tH\000\022\014\n\004args\030\003 \003(\t\022\032\n\022allow" + + "ed_exit_codes\030\004 \003(\005B\017\n\rlocation_type\032\341\001\n" + + "\tRunScript\022\023\n\006script\030\001 \001(\tB\003\340A\002\022\032\n\022allow" + + "ed_exit_codes\030\002 \003(\005\022\\\n\013interpreter\030\003 \001(\016" + + "2G.google.cloud.osconfig.v1beta.Software" + + "Recipe.Step.RunScript.Interpreter\"E\n\013Int" + + "erpreter\022\033\n\027INTERPRETER_UNSPECIFIED\020\000\022\t\n" + + "\005SHELL\020\001\022\016\n\nPOWERSHELL\020\003B\006\n\004step\"\273\001\n\030Cre" + + "ateGuestPolicyRequest\022;\n\006parent\030\001 \001(\tB+\340" + + "A\002\372A%\022#osconfig.googleapis.com/GuestPoli" + + "cy\022\034\n\017guest_policy_id\030\002 \001(\tB\003\340A\002\022D\n\014gues" + + "t_policy\030\003 \001(\0132).google.cloud.osconfig.v" + + "1beta.GuestPolicyB\003\340A\002\"R\n\025GetGuestPolicy" + + "Request\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#osconfig." + + "googleapis.com/GuestPolicy\"~\n\030ListGuestP" + + "oliciesRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#" + + "osconfig.googleapis.com/GuestPolicy\022\021\n\tp" + + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"w\n\031Li" + + "stGuestPoliciesResponse\022A\n\016guest_policie" + + "s\030\001 \003(\0132).google.cloud.osconfig.v1beta.G" + + "uestPolicy\022\027\n\017next_page_token\030\002 \001(\t\"\221\001\n\030" + + "UpdateGuestPolicyRequest\022D\n\014guest_policy" + + "\030\001 \001(\0132).google.cloud.osconfig.v1beta.Gu" + + "estPolicyB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.go" + + "ogle.protobuf.FieldMask\"U\n\030DeleteGuestPo" + + "licyRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#oscon" + + "fig.googleapis.com/GuestPolicy\"~\n!Lookup" + + "EffectiveGuestPolicyRequest\022\025\n\010instance\030" + + "\001 \001(\tB\003\340A\002\022\025\n\ros_short_name\030\002 \001(\t\022\022\n\nos_" + + "version\030\003 \001(\t\022\027\n\017os_architecture\030\004 \001(\t\"\375" + + "\004\n\024EffectiveGuestPolicy\022S\n\010packages\030\001 \003(" + + "\0132A.google.cloud.osconfig.v1beta.Effecti" + + "veGuestPolicy.SourcedPackage\022i\n\024package_" + + "repositories\030\002 \003(\0132K.google.cloud.osconf" + + "ig.v1beta.EffectiveGuestPolicy.SourcedPa" + + "ckageRepository\022b\n\020software_recipes\030\003 \003(" + + "\0132H.google.cloud.osconfig.v1beta.Effecti" + + "veGuestPolicy.SourcedSoftwareRecipe\032X\n\016S" + + "ourcedPackage\022\016\n\006source\030\001 \001(\t\0226\n\007package" + + "\030\002 \001(\0132%.google.cloud.osconfig.v1beta.Pa" + + "ckage\032w\n\030SourcedPackageRepository\022\016\n\006sou" + + "rce\030\001 \001(\t\022K\n\022package_repository\030\002 \001(\0132/." + + "google.cloud.osconfig.v1beta.PackageRepo" + + "sitory\032n\n\025SourcedSoftwareRecipe\022\016\n\006sourc" + + "e\030\001 \001(\t\022E\n\017software_recipe\030\002 \001(\0132,.googl" + + "e.cloud.osconfig.v1beta.SoftwareRecipe*V" + + "\n\014DesiredState\022\035\n\031DESIRED_STATE_UNSPECIF" + + "IED\020\000\022\r\n\tINSTALLED\020\001\022\013\n\007UPDATED\020\002\022\013\n\007REM" + + "OVED\020\003Bw\n com.google.cloud.osconfig.v1be" + + "taB\rGuestPoliciesZDgoogle.golang.org/gen" + + "proto/googleapis/cloud/osconfig/v1beta;o" + + "sconfigb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -50387,6 +50380,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigProto.java b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigProto.java index 51ded9b3..73f75c7c 100644 --- a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigProto.java +++ b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigProto.java @@ -43,7 +43,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oud/osconfig/v1beta/patch_deployments.pr" + "oto\032-google/cloud/osconfig/v1beta/patch_" + "jobs.proto\032\033google/protobuf/empty.proto2" - + "\201\027\n\017OsConfigService\022\251\001\n\017ExecutePatchJob\022" + + "\223\034\n\017OsConfigService\022\251\001\n\017ExecutePatchJob\022" + "4.google.cloud.osconfig.v1beta.ExecutePa" + "tchJobRequest\032&.google.cloud.osconfig.v1" + "beta.PatchJob\"8\202\323\344\223\0022\"-/v1beta/{parent=p" @@ -84,42 +84,59 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "chDeployment\022:.google.cloud.osconfig.v1b" + "eta.DeletePatchDeploymentRequest\032\026.googl" + "e.protobuf.Empty\"4\202\323\344\223\002.*,/v1beta/{name=" - + "projects/*/patchDeployments/*}\022\316\001\n\021Creat" - + "eGuestPolicy\0226.google.cloud.osconfig.v1b" - + "eta.CreateGuestPolicyRequest\032).google.cl" - + "oud.osconfig.v1beta.GuestPolicy\"V\202\323\344\223\0029\"" - + ")/v1beta/{parent=projects/*}/guestPolici" - + "es:\014guest_policy\332A\024parent, guest_policy\022" - + "\252\001\n\016GetGuestPolicy\0223.google.cloud.osconf" - + "ig.v1beta.GetGuestPolicyRequest\032).google" - + ".cloud.osconfig.v1beta.GuestPolicy\"8\202\323\344\223" - + "\002+\022)/v1beta/{name=projects/*/guestPolici" - + "es/*}\332A\004name\022\300\001\n\021ListGuestPolicies\0226.goo" - + "gle.cloud.osconfig.v1beta.ListGuestPolic" - + "iesRequest\0327.google.cloud.osconfig.v1bet" - + "a.ListGuestPoliciesResponse\":\202\323\344\223\002+\022)/v1" - + "beta/{parent=projects/*}/guestPolicies\332A" - + "\006parent\022\337\001\n\021UpdateGuestPolicy\0226.google.c" - + "loud.osconfig.v1beta.UpdateGuestPolicyRe" - + "quest\032).google.cloud.osconfig.v1beta.Gue" - + "stPolicy\"g\202\323\344\223\002F26/v1beta/{guest_policy." - + "name=projects/*/guestPolicies/*}:\014guest_" - + "policy\332A\030guest_policy,update_mask\022\235\001\n\021De" - + "leteGuestPolicy\0226.google.cloud.osconfig." - + "v1beta.DeleteGuestPolicyRequest\032\026.google" - + ".protobuf.Empty\"8\202\323\344\223\002+*)/v1beta/{name=p" - + "rojects/*/guestPolicies/*}\332A\004name\022\352\001\n\032Lo" - + "okupEffectiveGuestPolicy\022?.google.cloud." - + "osconfig.v1beta.LookupEffectiveGuestPoli" - + "cyRequest\0322.google.cloud.osconfig.v1beta" - + ".EffectiveGuestPolicy\"W\202\323\344\223\002Q\"L/v1beta/{" - + "instance=projects/*/zones/*/instances/*}" - + ":lookupEffectiveGuestPolicy:\001*\032K\312A\027oscon" - + "fig.googleapis.com\322A.https://www.googlea" - + "pis.com/auth/cloud-platformBw\n com.googl" - + "e.cloud.osconfig.v1betaB\rOsConfigProtoZD" - + "google.golang.org/genproto/googleapis/cl" - + "oud/osconfig/v1beta;osconfigb\006proto3" + + "projects/*/patchDeployments/*}\022\372\001\n\025Updat" + + "ePatchDeployment\022:.google.cloud.osconfig" + + ".v1beta.UpdatePatchDeploymentRequest\032-.g" + + "oogle.cloud.osconfig.v1beta.PatchDeploym" + + "ent\"v\202\323\344\223\002Q2=/v1beta/{patch_deployment.n" + + "ame=projects/*/patchDeployments/*}:\020patc" + + "h_deployment\332A\034patch_deployment,update_m" + + "ask\022\306\001\n\024PausePatchDeployment\0229.google.cl" + + "oud.osconfig.v1beta.PausePatchDeployment" + + "Request\032-.google.cloud.osconfig.v1beta.P" + + "atchDeployment\"D\202\323\344\223\0027\"2/v1beta/{name=pr" + + "ojects/*/patchDeployments/*}:pause:\001*\332A\004" + + "name\022\311\001\n\025ResumePatchDeployment\022:.google." + + "cloud.osconfig.v1beta.ResumePatchDeploym" + + "entRequest\032-.google.cloud.osconfig.v1bet" + + "a.PatchDeployment\"E\202\323\344\223\0028\"3/v1beta/{name" + + "=projects/*/patchDeployments/*}:resume:\001" + + "*\332A\004name\022\316\001\n\021CreateGuestPolicy\0226.google." + + "cloud.osconfig.v1beta.CreateGuestPolicyR" + + "equest\032).google.cloud.osconfig.v1beta.Gu" + + "estPolicy\"V\202\323\344\223\0029\")/v1beta/{parent=proje" + + "cts/*}/guestPolicies:\014guest_policy\332A\024par" + + "ent, guest_policy\022\252\001\n\016GetGuestPolicy\0223.g" + + "oogle.cloud.osconfig.v1beta.GetGuestPoli" + + "cyRequest\032).google.cloud.osconfig.v1beta" + + ".GuestPolicy\"8\202\323\344\223\002+\022)/v1beta/{name=proj" + + "ects/*/guestPolicies/*}\332A\004name\022\300\001\n\021ListG" + + "uestPolicies\0226.google.cloud.osconfig.v1b" + + "eta.ListGuestPoliciesRequest\0327.google.cl" + + "oud.osconfig.v1beta.ListGuestPoliciesRes" + + "ponse\":\202\323\344\223\002+\022)/v1beta/{parent=projects/" + + "*}/guestPolicies\332A\006parent\022\337\001\n\021UpdateGues" + + "tPolicy\0226.google.cloud.osconfig.v1beta.U" + + "pdateGuestPolicyRequest\032).google.cloud.o" + + "sconfig.v1beta.GuestPolicy\"g\202\323\344\223\002F26/v1b" + + "eta/{guest_policy.name=projects/*/guestP" + + "olicies/*}:\014guest_policy\332A\030guest_policy," + + "update_mask\022\235\001\n\021DeleteGuestPolicy\0226.goog" + + "le.cloud.osconfig.v1beta.DeleteGuestPoli" + + "cyRequest\032\026.google.protobuf.Empty\"8\202\323\344\223\002" + + "+*)/v1beta/{name=projects/*/guestPolicie" + + "s/*}\332A\004name\022\352\001\n\032LookupEffectiveGuestPoli" + + "cy\022?.google.cloud.osconfig.v1beta.Lookup" + + "EffectiveGuestPolicyRequest\0322.google.clo" + + "ud.osconfig.v1beta.EffectiveGuestPolicy\"" + + "W\202\323\344\223\002Q\"L/v1beta/{instance=projects/*/zo" + + "nes/*/instances/*}:lookupEffectiveGuestP" + + "olicy:\001*\032K\312A\027osconfig.googleapis.com\322A.h" + + "ttps://www.googleapis.com/auth/cloud-pla" + + "tformBw\n com.google.cloud.osconfig.v1bet" + + "aB\rOsConfigProtoZDgoogle.golang.org/genp" + + "roto/googleapis/cloud/osconfig/v1beta;os" + + "configb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchDeploymentName.java b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchDeploymentName.java new file mode 100644 index 00000000..8cbc608e --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchDeploymentName.java @@ -0,0 +1,194 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class PatchDeploymentName implements ResourceName { + private static final PathTemplate PROJECT_PATCH_DEPLOYMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/patchDeployments/{patch_deployment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String patchDeployment; + + @Deprecated + protected PatchDeploymentName() { + project = null; + patchDeployment = null; + } + + private PatchDeploymentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + patchDeployment = Preconditions.checkNotNull(builder.getPatchDeployment()); + } + + public String getProject() { + return project; + } + + public String getPatchDeployment() { + return patchDeployment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PatchDeploymentName of(String project, String patchDeployment) { + return newBuilder().setProject(project).setPatchDeployment(patchDeployment).build(); + } + + public static String format(String project, String patchDeployment) { + return newBuilder().setProject(project).setPatchDeployment(patchDeployment).build().toString(); + } + + public static PatchDeploymentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_PATCH_DEPLOYMENT.validatedMatch( + formattedString, "PatchDeploymentName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("patch_deployment")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PatchDeploymentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_PATCH_DEPLOYMENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (patchDeployment != null) { + fieldMapBuilder.put("patch_deployment", patchDeployment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_PATCH_DEPLOYMENT.instantiate( + "project", project, "patch_deployment", patchDeployment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + PatchDeploymentName that = ((PatchDeploymentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.patchDeployment, that.patchDeployment); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(patchDeployment); + return h; + } + + /** Builder for projects/{project}/patchDeployments/{patch_deployment}. */ + public static class Builder { + private String project; + private String patchDeployment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getPatchDeployment() { + return patchDeployment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setPatchDeployment(String patchDeployment) { + this.patchDeployment = patchDeployment; + return this; + } + + private Builder(PatchDeploymentName patchDeploymentName) { + this.project = patchDeploymentName.project; + this.patchDeployment = patchDeploymentName.patchDeployment; + } + + public PatchDeploymentName build() { + return new PatchDeploymentName(this); + } + } +} diff --git a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchDeployments.java b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchDeployments.java index 8ae1fd50..95ca5ee2 100644 --- a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchDeployments.java +++ b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchDeployments.java @@ -300,8 +300,7 @@ public interface PatchDeploymentOrBuilder * *
      * Output only. Time the patch deployment was created. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * @@ -316,8 +315,7 @@ public interface PatchDeploymentOrBuilder * *
      * Output only. Time the patch deployment was created. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * @@ -332,8 +330,7 @@ public interface PatchDeploymentOrBuilder * *
      * Output only. Time the patch deployment was created. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * @@ -347,8 +344,7 @@ public interface PatchDeploymentOrBuilder * *
      * Output only. Time the patch deployment was last updated. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * @@ -363,8 +359,7 @@ public interface PatchDeploymentOrBuilder * *
      * Output only. Time the patch deployment was last updated. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * @@ -379,8 +374,7 @@ public interface PatchDeploymentOrBuilder * *
      * Output only. Time the patch deployment was last updated. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * @@ -394,9 +388,8 @@ public interface PatchDeploymentOrBuilder * *
      * Output only. The last time a patch job was started by this deployment.
-     * Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+     * format.
      * 
* * @@ -411,9 +404,8 @@ public interface PatchDeploymentOrBuilder * *
      * Output only. The last time a patch job was started by this deployment.
-     * Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+     * format.
      * 
* * @@ -428,9 +420,8 @@ public interface PatchDeploymentOrBuilder * *
      * Output only. The last time a patch job was started by this deployment.
-     * Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+     * format.
      * 
* * @@ -439,6 +430,76 @@ public interface PatchDeploymentOrBuilder */ com.google.protobuf.TimestampOrBuilder getLastExecuteTimeOrBuilder(); + /** + * + * + *
+     * Optional. Rollout strategy of the patch job.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rollout field is set. + */ + boolean hasRollout(); + /** + * + * + *
+     * Optional. Rollout strategy of the patch job.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rollout. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout getRollout(); + /** + * + * + *
+     * Optional. Rollout strategy of the patch job.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder getRolloutOrBuilder(); + + /** + * + * + *
+     * Output only. Current state of the patch deployment.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * Output only. Current state of the patch deployment.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.State getState(); + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.ScheduleCase getScheduleCase(); } @@ -450,7 +511,7 @@ public interface PatchDeploymentOrBuilder * complete a patch. These configurations include instance filter, package * repository settings, and a schedule. For more information about creating and * managing patch deployments, see [Scheduling patch - * jobs](/compute/docs/os-patch-management/schedule-patch-jobs). + * jobs](https://cloud.google.com/compute/docs/os-patch-management/schedule-patch-jobs). * * * Protobuf type {@code google.cloud.osconfig.v1beta.PatchDeployment} @@ -468,6 +529,7 @@ private PatchDeployment(com.google.protobuf.GeneratedMessageV3.Builder builde private PatchDeployment() { name_ = ""; description_ = ""; + state_ = 0; } @java.lang.Override @@ -653,6 +715,30 @@ private PatchDeployment( lastExecuteTime_ = subBuilder.buildPartial(); } + break; + } + case 90: + { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder subBuilder = null; + if (rollout_ != null) { + subBuilder = rollout_.toBuilder(); + } + rollout_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rollout_); + rollout_ = subBuilder.buildPartial(); + } + + break; + } + case 96: + { + int rawValue = input.readEnum(); + + state_ = rawValue; break; } default: @@ -689,6 +775,167 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder.class); } + /** + * + * + *
+     * Represents state of patch peployment.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1beta.PatchDeployment.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The default value. This value is used if the state is omitted.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+       * Active value means that patch deployment generates Patch Jobs.
+       * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+       * Paused value means that patch deployment does not generate
+       * Patch jobs. Requires user action to move in and out from this state.
+       * 
+ * + * PAUSED = 2; + */ + PAUSED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The default value. This value is used if the state is omitted.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Active value means that patch deployment generates Patch Jobs.
+       * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + /** + * + * + *
+       * Paused value means that patch deployment does not generate
+       * Patch jobs. Requires user action to move in and out from this state.
+       * 
+ * + * PAUSED = 2; + */ + public static final int PAUSED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return PAUSED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1beta.PatchDeployment.State) + } + private int scheduleCase_ = 0; private java.lang.Object schedule_; @@ -1127,8 +1374,7 @@ public boolean hasRecurringSchedule() { * *
      * Output only. Time the patch deployment was created. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * @@ -1146,8 +1392,7 @@ public boolean hasCreateTime() { * *
      * Output only. Time the patch deployment was created. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * @@ -1165,8 +1410,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * *
      * Output only. Time the patch deployment was created. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * @@ -1185,8 +1429,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * *
      * Output only. Time the patch deployment was last updated. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * @@ -1204,8 +1447,7 @@ public boolean hasUpdateTime() { * *
      * Output only. Time the patch deployment was last updated. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * @@ -1223,8 +1465,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { * *
      * Output only. Time the patch deployment was last updated. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * @@ -1243,9 +1484,8 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * *
      * Output only. The last time a patch job was started by this deployment.
-     * Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+     * format.
      * 
* * @@ -1263,9 +1503,8 @@ public boolean hasLastExecuteTime() { * *
      * Output only. The last time a patch job was started by this deployment.
-     * Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+     * format.
      * 
* * @@ -1285,9 +1524,8 @@ public com.google.protobuf.Timestamp getLastExecuteTime() { * *
      * Output only. The last time a patch job was started by this deployment.
-     * Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+     * format.
      * 
* * @@ -1299,6 +1537,102 @@ public com.google.protobuf.TimestampOrBuilder getLastExecuteTimeOrBuilder() { return getLastExecuteTime(); } + public static final int ROLLOUT_FIELD_NUMBER = 11; + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout rollout_; + /** + * + * + *
+     * Optional. Rollout strategy of the patch job.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rollout field is set. + */ + @java.lang.Override + public boolean hasRollout() { + return rollout_ != null; + } + /** + * + * + *
+     * Optional. Rollout strategy of the patch job.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rollout. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout getRollout() { + return rollout_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.getDefaultInstance() + : rollout_; + } + /** + * + * + *
+     * Optional. Rollout strategy of the patch job.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder getRolloutOrBuilder() { + return getRollout(); + } + + public static final int STATE_FIELD_NUMBER = 12; + private int state_; + /** + * + * + *
+     * Output only. Current state of the patch deployment.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. Current state of the patch deployment.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.State result = + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.State.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.State.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1345,6 +1679,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (lastExecuteTime_ != null) { output.writeMessage(10, getLastExecuteTime()); } + if (rollout_ != null) { + output.writeMessage(11, getRollout()); + } + if (state_ + != com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(12, state_); + } unknownFields.writeTo(output); } @@ -1388,7 +1731,16 @@ public int getSerializedSize() { if (lastExecuteTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLastExecuteTime()); } - size += unknownFields.getSerializedSize(); + if (rollout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getRollout()); + } + if (state_ + != com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, state_); + } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -1430,6 +1782,11 @@ public boolean equals(final java.lang.Object obj) { if (hasLastExecuteTime()) { if (!getLastExecuteTime().equals(other.getLastExecuteTime())) return false; } + if (hasRollout() != other.hasRollout()) return false; + if (hasRollout()) { + if (!getRollout().equals(other.getRollout())) return false; + } + if (state_ != other.state_) return false; if (!getScheduleCase().equals(other.getScheduleCase())) return false; switch (scheduleCase_) { case 6: @@ -1480,6 +1837,12 @@ public int hashCode() { hash = (37 * hash) + LAST_EXECUTE_TIME_FIELD_NUMBER; hash = (53 * hash) + getLastExecuteTime().hashCode(); } + if (hasRollout()) { + hash = (37 * hash) + ROLLOUT_FIELD_NUMBER; + hash = (53 * hash) + getRollout().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; switch (scheduleCase_) { case 6: hash = (37 * hash) + ONE_TIME_SCHEDULE_FIELD_NUMBER; @@ -1603,7 +1966,7 @@ protected Builder newBuilderForType( * complete a patch. These configurations include instance filter, package * repository settings, and a schedule. For more information about creating and * managing patch deployments, see [Scheduling patch - * jobs](/compute/docs/os-patch-management/schedule-patch-jobs). + * jobs](https://cloud.google.com/compute/docs/os-patch-management/schedule-patch-jobs). * * * Protobuf type {@code google.cloud.osconfig.v1beta.PatchDeployment} @@ -1686,6 +2049,14 @@ public Builder clear() { lastExecuteTime_ = null; lastExecuteTimeBuilder_ = null; } + if (rolloutBuilder_ == null) { + rollout_ = null; + } else { + rollout_ = null; + rolloutBuilder_ = null; + } + state_ = 0; + scheduleCase_ = 0; schedule_ = null; return this; @@ -1763,6 +2134,12 @@ public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment buildPa } else { result.lastExecuteTime_ = lastExecuteTimeBuilder_.build(); } + if (rolloutBuilder_ == null) { + result.rollout_ = rollout_; + } else { + result.rollout_ = rolloutBuilder_.build(); + } + result.state_ = state_; result.scheduleCase_ = scheduleCase_; onBuilt(); return result; @@ -1845,6 +2222,12 @@ public Builder mergeFrom( if (other.hasLastExecuteTime()) { mergeLastExecuteTime(other.getLastExecuteTime()); } + if (other.hasRollout()) { + mergeRollout(other.getRollout()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } switch (other.getScheduleCase()) { case ONE_TIME_SCHEDULE: { @@ -3235,8 +3618,7 @@ public Builder clearRecurringSchedule() { * *
        * Output only. Time the patch deployment was created. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3253,8 +3635,7 @@ public boolean hasCreateTime() { * *
        * Output only. Time the patch deployment was created. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3277,8 +3658,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * *
        * Output only. Time the patch deployment was created. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3303,8 +3683,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * *
        * Output only. Time the patch deployment was created. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3326,8 +3705,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * *
        * Output only. Time the patch deployment was created. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3356,8 +3734,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * *
        * Output only. Time the patch deployment was created. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3380,8 +3757,7 @@ public Builder clearCreateTime() { * *
        * Output only. Time the patch deployment was created. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3398,8 +3774,7 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { * *
        * Output only. Time the patch deployment was created. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3420,8 +3795,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * *
        * Output only. Time the patch deployment was created. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3456,8 +3830,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * *
        * Output only. Time the patch deployment was last updated. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3474,8 +3847,7 @@ public boolean hasUpdateTime() { * *
        * Output only. Time the patch deployment was last updated. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3498,8 +3870,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { * *
        * Output only. Time the patch deployment was last updated. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3524,8 +3895,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { * *
        * Output only. Time the patch deployment was last updated. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3547,8 +3917,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal * *
        * Output only. Time the patch deployment was last updated. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3577,8 +3946,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * *
        * Output only. Time the patch deployment was last updated. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3601,8 +3969,7 @@ public Builder clearUpdateTime() { * *
        * Output only. Time the patch deployment was last updated. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3619,8 +3986,7 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { * *
        * Output only. Time the patch deployment was last updated. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3641,8 +4007,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * *
        * Output only. Time the patch deployment was last updated. Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
        * 
* * @@ -3677,9 +4042,8 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * *
        * Output only. The last time a patch job was started by this deployment.
-       * Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+       * format.
        * 
* * @@ -3696,9 +4060,8 @@ public boolean hasLastExecuteTime() { * *
        * Output only. The last time a patch job was started by this deployment.
-       * Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+       * format.
        * 
* * @@ -3721,9 +4084,8 @@ public com.google.protobuf.Timestamp getLastExecuteTime() { * *
        * Output only. The last time a patch job was started by this deployment.
-       * Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+       * format.
        * 
* * @@ -3748,9 +4110,8 @@ public Builder setLastExecuteTime(com.google.protobuf.Timestamp value) { * *
        * Output only. The last time a patch job was started by this deployment.
-       * Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+       * format.
        * 
* * @@ -3772,9 +4133,8 @@ public Builder setLastExecuteTime(com.google.protobuf.Timestamp.Builder builderF * *
        * Output only. The last time a patch job was started by this deployment.
-       * Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+       * format.
        * 
* * @@ -3803,9 +4163,8 @@ public Builder mergeLastExecuteTime(com.google.protobuf.Timestamp value) { * *
        * Output only. The last time a patch job was started by this deployment.
-       * Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+       * format.
        * 
* * @@ -3828,9 +4187,8 @@ public Builder clearLastExecuteTime() { * *
        * Output only. The last time a patch job was started by this deployment.
-       * Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+       * format.
        * 
* * @@ -3847,9 +4205,8 @@ public com.google.protobuf.Timestamp.Builder getLastExecuteTimeBuilder() { * *
        * Output only. The last time a patch job was started by this deployment.
-       * Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+       * format.
        * 
* * @@ -3870,9 +4227,8 @@ public com.google.protobuf.TimestampOrBuilder getLastExecuteTimeOrBuilder() { * *
        * Output only. The last time a patch job was started by this deployment.
-       * Timestamp is in
-       * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-       * text format.
+       * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
+       * format.
        * 
* * @@ -3896,6 +4252,315 @@ public com.google.protobuf.TimestampOrBuilder getLastExecuteTimeOrBuilder() { return lastExecuteTimeBuilder_; } + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout rollout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder> + rolloutBuilder_; + /** + * + * + *
+       * Optional. Rollout strategy of the patch job.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rollout field is set. + */ + public boolean hasRollout() { + return rolloutBuilder_ != null || rollout_ != null; + } + /** + * + * + *
+       * Optional. Rollout strategy of the patch job.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rollout. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout getRollout() { + if (rolloutBuilder_ == null) { + return rollout_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.getDefaultInstance() + : rollout_; + } else { + return rolloutBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Rollout strategy of the patch job.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRollout(com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout value) { + if (rolloutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rollout_ = value; + onChanged(); + } else { + rolloutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Rollout strategy of the patch job.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRollout( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder builderForValue) { + if (rolloutBuilder_ == null) { + rollout_ = builderForValue.build(); + onChanged(); + } else { + rolloutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. Rollout strategy of the patch job.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRollout(com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout value) { + if (rolloutBuilder_ == null) { + if (rollout_ != null) { + rollout_ = + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.newBuilder(rollout_) + .mergeFrom(value) + .buildPartial(); + } else { + rollout_ = value; + } + onChanged(); + } else { + rolloutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Rollout strategy of the patch job.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRollout() { + if (rolloutBuilder_ == null) { + rollout_ = null; + onChanged(); + } else { + rollout_ = null; + rolloutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. Rollout strategy of the patch job.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder getRolloutBuilder() { + + onChanged(); + return getRolloutFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Rollout strategy of the patch job.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder + getRolloutOrBuilder() { + if (rolloutBuilder_ != null) { + return rolloutBuilder_.getMessageOrBuilder(); + } else { + return rollout_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.getDefaultInstance() + : rollout_; + } + } + /** + * + * + *
+       * Optional. Rollout strategy of the patch job.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder> + getRolloutFieldBuilder() { + if (rolloutBuilder_ == null) { + rolloutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder>( + getRollout(), getParentForChildren(), isClean()); + rollout_ = null; + } + return rolloutBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+       * Output only. Current state of the patch deployment.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * Output only. Current state of the patch deployment.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Current state of the patch deployment.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.State result = + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.State.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Output only. Current state of the patch deployment.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Current state of the patch deployment.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -3999,8 +4664,7 @@ public interface OneTimeScheduleOrBuilder * *
    * Sets the time for a one time patch deployment. Timestamp is in
-   * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-   * text format.
+   * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
    * 
* * Protobuf type {@code google.cloud.osconfig.v1beta.OneTimeSchedule} @@ -4318,8 +4982,7 @@ protected Builder newBuilderForType( * *
      * Sets the time for a one time patch deployment. Timestamp is in
-     * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
-     * text format.
+     * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
      * 
* * Protobuf type {@code google.cloud.osconfig.v1beta.OneTimeSchedule} @@ -5361,8 +6024,8 @@ public enum Frequency implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Indicates that the frequency should be expressed in terms of
-       * weeks.
+       * Indicates that the frequency of recurrence should be expressed in terms
+       * of weeks.
        * 
* * WEEKLY = 1; @@ -5372,8 +6035,8 @@ public enum Frequency implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Indicates that the frequency should be expressed in terms of
-       * months.
+       * Indicates that the frequency of recurrence should be expressed in terms
+       * of months.
        * 
* * MONTHLY = 2; @@ -5383,8 +6046,8 @@ public enum Frequency implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Indicates that the frequency should be expressed in terms of
-       * days.
+       * Indicates that the frequency of recurrence should be expressed in terms
+       * of days.
        * 
* * DAILY = 3; @@ -5407,8 +6070,8 @@ public enum Frequency implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Indicates that the frequency should be expressed in terms of
-       * weeks.
+       * Indicates that the frequency of recurrence should be expressed in terms
+       * of weeks.
        * 
* * WEEKLY = 1; @@ -5418,8 +6081,8 @@ public enum Frequency implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Indicates that the frequency should be expressed in terms of
-       * months.
+       * Indicates that the frequency of recurrence should be expressed in terms
+       * of months.
        * 
* * MONTHLY = 2; @@ -5429,8 +6092,8 @@ public enum Frequency implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Indicates that the frequency should be expressed in terms of
-       * days.
+       * Indicates that the frequency of recurrence should be expressed in terms
+       * of days.
        * 
* * DAILY = 3; @@ -10270,6 +10933,25 @@ public interface WeekDayOfMonthOrBuilder * @return The dayOfWeek. */ com.google.type.DayOfWeek getDayOfWeek(); + + /** + * + * + *
+     * Optional. Represents the number of days before or after the given week day of month
+     * that the patch deployment is scheduled for. For example if `week_ordinal`
+     * and `day_of_week` values point to the second day of the month and this
+     * `day_offset` value is set to `3`, the patch deployment takes place three
+     * days after the second Tuesday of the month. If this value is negative, for
+     * example -5, the patches  are deployed five days before before the second
+     * Tuesday of the month. Allowed values are in range `[-30, 30]`.
+     * 
+ * + * int32 day_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dayOffset. + */ + int getDayOffset(); } /** * @@ -10335,6 +11017,11 @@ private WeekDayOfMonth( dayOfWeek_ = rawValue; break; } + case 24: + { + dayOffset_ = input.readInt32(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -10425,6 +11112,30 @@ public com.google.type.DayOfWeek getDayOfWeek() { return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; } + public static final int DAY_OFFSET_FIELD_NUMBER = 3; + private int dayOffset_; + /** + * + * + *
+     * Optional. Represents the number of days before or after the given week day of month
+     * that the patch deployment is scheduled for. For example if `week_ordinal`
+     * and `day_of_week` values point to the second day of the month and this
+     * `day_offset` value is set to `3`, the patch deployment takes place three
+     * days after the second Tuesday of the month. If this value is negative, for
+     * example -5, the patches  are deployed five days before before the second
+     * Tuesday of the month. Allowed values are in range `[-30, 30]`.
+     * 
+ * + * int32 day_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dayOffset. + */ + @java.lang.Override + public int getDayOffset() { + return dayOffset_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -10445,6 +11156,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { output.writeEnum(2, dayOfWeek_); } + if (dayOffset_ != 0) { + output.writeInt32(3, dayOffset_); + } unknownFields.writeTo(output); } @@ -10460,6 +11174,9 @@ public int getSerializedSize() { if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, dayOfWeek_); } + if (dayOffset_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, dayOffset_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -10478,6 +11195,7 @@ public boolean equals(final java.lang.Object obj) { if (getWeekOrdinal() != other.getWeekOrdinal()) return false; if (dayOfWeek_ != other.dayOfWeek_) return false; + if (getDayOffset() != other.getDayOffset()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -10493,6 +11211,8 @@ public int hashCode() { hash = (53 * hash) + getWeekOrdinal(); hash = (37 * hash) + DAY_OF_WEEK_FIELD_NUMBER; hash = (53 * hash) + dayOfWeek_; + hash = (37 * hash) + DAY_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getDayOffset(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -10647,6 +11367,8 @@ public Builder clear() { dayOfWeek_ = 0; + dayOffset_ = 0; + return this; } @@ -10678,6 +11400,7 @@ public com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth buildPar new com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth(this); result.weekOrdinal_ = weekOrdinal_; result.dayOfWeek_ = dayOfWeek_; + result.dayOffset_ = dayOffset_; onBuilt(); return result; } @@ -10739,6 +11462,9 @@ public Builder mergeFrom( if (other.dayOfWeek_ != 0) { setDayOfWeekValue(other.getDayOfWeekValue()); } + if (other.getDayOffset() != 0) { + setDayOffset(other.getDayOffset()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -10920,9 +11646,79 @@ public Builder clearDayOfWeek() { return this; } + private int dayOffset_; + /** + * + * + *
+       * Optional. Represents the number of days before or after the given week day of month
+       * that the patch deployment is scheduled for. For example if `week_ordinal`
+       * and `day_of_week` values point to the second day of the month and this
+       * `day_offset` value is set to `3`, the patch deployment takes place three
+       * days after the second Tuesday of the month. If this value is negative, for
+       * example -5, the patches  are deployed five days before before the second
+       * Tuesday of the month. Allowed values are in range `[-30, 30]`.
+       * 
+ * + * int32 day_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dayOffset. + */ @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public int getDayOffset() { + return dayOffset_; + } + /** + * + * + *
+       * Optional. Represents the number of days before or after the given week day of month
+       * that the patch deployment is scheduled for. For example if `week_ordinal`
+       * and `day_of_week` values point to the second day of the month and this
+       * `day_offset` value is set to `3`, the patch deployment takes place three
+       * days after the second Tuesday of the month. If this value is negative, for
+       * example -5, the patches  are deployed five days before before the second
+       * Tuesday of the month. Allowed values are in range `[-30, 30]`.
+       * 
+ * + * int32 day_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dayOffset to set. + * @return This builder for chaining. + */ + public Builder setDayOffset(int value) { + + dayOffset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Represents the number of days before or after the given week day of month
+       * that the patch deployment is scheduled for. For example if `week_ordinal`
+       * and `day_of_week` values point to the second day of the month and this
+       * `day_offset` value is set to `3`, the patch deployment takes place three
+       * days after the second Tuesday of the month. If this value is negative, for
+       * example -5, the patches  are deployed five days before before the second
+       * Tuesday of the month. Allowed values are in range `[-30, 30]`.
+       * 
+ * + * int32 day_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDayOffset() { + + dayOffset_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -15937,223 +16733,2855 @@ public com.google.protobuf.Parser getParserForType } } - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_osconfig_v1beta_PatchDeployment_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_osconfig_v1beta_PatchDeployment_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_fieldAccessorTable; + public interface UpdatePatchDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.UpdatePatchDeploymentRequest) + com.google.protobuf.MessageOrBuilder { - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; + /** + * + * + *
+     * Required. The patch deployment to Update.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the patchDeployment field is set. + */ + boolean hasPatchDeployment(); + /** + * + * + *
+     * Required. The patch deployment to Update.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The patchDeployment. + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment getPatchDeployment(); + /** + * + * + *
+     * Required. The patch deployment to Update.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder + getPatchDeploymentOrBuilder(); + + /** + * + * + *
+     * Optional. Field mask that controls which fields of the patch deployment should be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+     * Optional. Field mask that controls which fields of the patch deployment should be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+     * Optional. Field mask that controls which fields of the patch deployment should be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); } + /** + * + * + *
+   * A request message for updating a patch deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.UpdatePatchDeploymentRequest} + */ + public static final class UpdatePatchDeploymentRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.UpdatePatchDeploymentRequest) + UpdatePatchDeploymentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdatePatchDeploymentRequest.newBuilder() to construct. + private UpdatePatchDeploymentRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + private UpdatePatchDeploymentRequest() {} - static { - java.lang.String[] descriptorData = { - "\n4google/cloud/osconfig/v1beta/patch_dep" - + "loyments.proto\022\034google.cloud.osconfig.v1" - + "beta\032\037google/api/field_behavior.proto\032\031g" - + "oogle/api/resource.proto\032-google/cloud/o" - + "sconfig/v1beta/patch_jobs.proto\032\036google/" - + "protobuf/duration.proto\032\037google/protobuf" - + "/timestamp.proto\032\032google/type/datetime.p" - + "roto\032\033google/type/dayofweek.proto\032\033googl" - + "e/type/timeofday.proto\"\333\004\n\017PatchDeployme" - + "nt\022\014\n\004name\030\001 \001(\t\022\030\n\013description\030\002 \001(\tB\003\340" - + "A\001\022O\n\017instance_filter\030\003 \001(\01321.google.clo" - + "ud.osconfig.v1beta.PatchInstanceFilterB\003" - + "\340A\002\022D\n\014patch_config\030\004 \001(\0132).google.cloud" - + ".osconfig.v1beta.PatchConfigB\003\340A\001\0220\n\010dur" - + "ation\030\005 \001(\0132\031.google.protobuf.DurationB\003" - + "\340A\001\022O\n\021one_time_schedule\030\006 \001(\0132-.google." - + "cloud.osconfig.v1beta.OneTimeScheduleB\003\340" - + "A\002H\000\022R\n\022recurring_schedule\030\007 \001(\0132/.googl" - + "e.cloud.osconfig.v1beta.RecurringSchedul" - + "eB\003\340A\002H\000\0224\n\013create_time\030\010 \001(\0132\032.google.p" - + "rotobuf.TimestampB\003\340A\003\0224\n\013update_time\030\t " - + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\022:\n\021" - + "last_execute_time\030\n \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003B\n\n\010schedule\"H\n\017OneTimeS" - + "chedule\0225\n\014execute_time\030\001 \001(\0132\032.google.p" - + "rotobuf.TimestampB\003\340A\002\"\222\005\n\021RecurringSche" - + "dule\022-\n\ttime_zone\030\001 \001(\0132\025.google.type.Ti" - + "meZoneB\003\340A\002\0223\n\nstart_time\030\002 \001(\0132\032.google" - + ".protobuf.TimestampB\003\340A\001\0221\n\010end_time\030\003 \001" - + "(\0132\032.google.protobuf.TimestampB\003\340A\001\0220\n\013t" - + "ime_of_day\030\004 \001(\0132\026.google.type.TimeOfDay" - + "B\003\340A\002\022Q\n\tfrequency\030\005 \001(\01629.google.cloud." - + "osconfig.v1beta.RecurringSchedule.Freque" - + "ncyB\003\340A\002\022C\n\006weekly\030\006 \001(\0132,.google.cloud." - + "osconfig.v1beta.WeeklyScheduleB\003\340A\002H\000\022E\n" - + "\007monthly\030\007 \001(\0132-.google.cloud.osconfig.v" - + "1beta.MonthlyScheduleB\003\340A\002H\000\022:\n\021last_exe" - + "cute_time\030\t \001(\0132\032.google.protobuf.Timest" - + "ampB\003\340A\003\022:\n\021next_execute_time\030\n \001(\0132\032.go" - + "ogle.protobuf.TimestampB\003\340A\003\"J\n\tFrequenc" - + "y\022\031\n\025FREQUENCY_UNSPECIFIED\020\000\022\n\n\006WEEKLY\020\001" - + "\022\013\n\007MONTHLY\020\002\022\t\n\005DAILY\020\003B\021\n\017schedule_con" - + "fig\"B\n\016WeeklySchedule\0220\n\013day_of_week\030\001 \001" - + "(\0162\026.google.type.DayOfWeekB\003\340A\002\"\213\001\n\017Mont" - + "hlySchedule\022N\n\021week_day_of_month\030\001 \001(\0132," - + ".google.cloud.osconfig.v1beta.WeekDayOfM" - + "onthB\003\340A\002H\000\022\030\n\tmonth_day\030\002 \001(\005B\003\340A\002H\000B\016\n" - + "\014day_of_month\"]\n\016WeekDayOfMonth\022\031\n\014week_" - + "ordinal\030\001 \001(\005B\003\340A\002\0220\n\013day_of_week\030\002 \001(\0162" - + "\026.google.type.DayOfWeekB\003\340A\002\"\243\001\n\034CreateP" - + "atchDeploymentRequest\022\023\n\006parent\030\001 \001(\tB\003\340" - + "A\002\022 \n\023patch_deployment_id\030\002 \001(\tB\003\340A\002\022L\n\020" - + "patch_deployment\030\003 \001(\0132-.google.cloud.os" - + "config.v1beta.PatchDeploymentB\003\340A\002\".\n\031Ge" - + "tPatchDeploymentRequest\022\021\n\004name\030\001 \001(\tB\003\340" - + "A\002\"c\n\033ListPatchDeploymentsRequest\022\023\n\006par" - + "ent\030\001 \001(\tB\003\340A\002\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027" - + "\n\npage_token\030\003 \001(\tB\003\340A\001\"\201\001\n\034ListPatchDep" - + "loymentsResponse\022H\n\021patch_deployments\030\001 " - + "\003(\0132-.google.cloud.osconfig.v1beta.Patch" - + "Deployment\022\027\n\017next_page_token\030\002 \001(\t\"1\n\034D" - + "eletePatchDeploymentRequest\022\021\n\004name\030\001 \001(" - + "\tB\003\340A\002Bz\n com.google.cloud.osconfig.v1be" - + "taB\020PatchDeploymentsZDgoogle.golang.org/" - + "genproto/googleapis/cloud/osconfig/v1bet" - + "a;osconfigb\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.osconfig.v1beta.PatchJobs.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.type.DateTimeProto.getDescriptor(), - com.google.type.DayOfWeekProto.getDescriptor(), - com.google.type.TimeOfDayProto.getDescriptor(), - }); - internal_static_google_cloud_osconfig_v1beta_PatchDeployment_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_osconfig_v1beta_PatchDeployment_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_osconfig_v1beta_PatchDeployment_descriptor, - new java.lang.String[] { - "Name", - "Description", - "InstanceFilter", - "PatchConfig", - "Duration", - "OneTimeSchedule", - "RecurringSchedule", - "CreateTime", - "UpdateTime", - "LastExecuteTime", - "Schedule", - }); - internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_descriptor, - new java.lang.String[] { - "ExecuteTime", - }); - internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_descriptor, - new java.lang.String[] { - "TimeZone", - "StartTime", - "EndTime", - "TimeOfDay", - "Frequency", - "Weekly", - "Monthly", - "LastExecuteTime", - "NextExecuteTime", - "ScheduleConfig", - }); - internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_descriptor, - new java.lang.String[] { - "DayOfWeek", - }); - internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_descriptor, - new java.lang.String[] { - "WeekDayOfMonth", "MonthDay", "DayOfMonth", - }); - internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_descriptor, - new java.lang.String[] { - "WeekOrdinal", "DayOfWeek", - }); - internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_descriptor, - new java.lang.String[] { - "Parent", "PatchDeploymentId", "PatchDeployment", - }); - internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_descriptor = + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdatePatchDeploymentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdatePatchDeploymentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder + subBuilder = null; + if (patchDeployment_ != null) { + subBuilder = patchDeployment_.toBuilder(); + } + patchDeployment_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(patchDeployment_); + patchDeployment_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_UpdatePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_UpdatePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest.Builder + .class); + } + + public static final int PATCH_DEPLOYMENT_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment patchDeployment_; + /** + * + * + *
+     * Required. The patch deployment to Update.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the patchDeployment field is set. + */ + @java.lang.Override + public boolean hasPatchDeployment() { + return patchDeployment_ != null; + } + /** + * + * + *
+     * Required. The patch deployment to Update.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The patchDeployment. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment getPatchDeployment() { + return patchDeployment_ == null + ? com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.getDefaultInstance() + : patchDeployment_; + } + /** + * + * + *
+     * Required. The patch deployment to Update.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder + getPatchDeploymentOrBuilder() { + return getPatchDeployment(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+     * Optional. Field mask that controls which fields of the patch deployment should be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+     * Optional. Field mask that controls which fields of the patch deployment should be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+     * Optional. Field mask that controls which fields of the patch deployment should be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (patchDeployment_ != null) { + output.writeMessage(1, getPatchDeployment()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (patchDeployment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPatchDeployment()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest other = + (com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest) obj; + + if (hasPatchDeployment() != other.hasPatchDeployment()) return false; + if (hasPatchDeployment()) { + if (!getPatchDeployment().equals(other.getPatchDeployment())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPatchDeployment()) { + hash = (37 * hash) + PATCH_DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getPatchDeployment().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A request message for updating a patch deployment.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.UpdatePatchDeploymentRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.UpdatePatchDeploymentRequest) + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_UpdatePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_UpdatePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + .class, + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (patchDeploymentBuilder_ == null) { + patchDeployment_ = null; + } else { + patchDeployment_ = null; + patchDeploymentBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_UpdatePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest result = + new com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest( + this); + if (patchDeploymentBuilder_ == null) { + result.patchDeployment_ = patchDeployment_; + } else { + result.patchDeployment_ = patchDeploymentBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + .getDefaultInstance()) return this; + if (other.hasPatchDeployment()) { + mergePatchDeployment(other.getPatchDeployment()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment patchDeployment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder> + patchDeploymentBuilder_; + /** + * + * + *
+       * Required. The patch deployment to Update.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the patchDeployment field is set. + */ + public boolean hasPatchDeployment() { + return patchDeploymentBuilder_ != null || patchDeployment_ != null; + } + /** + * + * + *
+       * Required. The patch deployment to Update.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The patchDeployment. + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + getPatchDeployment() { + if (patchDeploymentBuilder_ == null) { + return patchDeployment_ == null + ? com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + .getDefaultInstance() + : patchDeployment_; + } else { + return patchDeploymentBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The patch deployment to Update.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment value) { + if (patchDeploymentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + patchDeployment_ = value; + onChanged(); + } else { + patchDeploymentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. The patch deployment to Update.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder + builderForValue) { + if (patchDeploymentBuilder_ == null) { + patchDeployment_ = builderForValue.build(); + onChanged(); + } else { + patchDeploymentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. The patch deployment to Update.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment value) { + if (patchDeploymentBuilder_ == null) { + if (patchDeployment_ != null) { + patchDeployment_ = + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.newBuilder( + patchDeployment_) + .mergeFrom(value) + .buildPartial(); + } else { + patchDeployment_ = value; + } + onChanged(); + } else { + patchDeploymentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. The patch deployment to Update.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPatchDeployment() { + if (patchDeploymentBuilder_ == null) { + patchDeployment_ = null; + onChanged(); + } else { + patchDeployment_ = null; + patchDeploymentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. The patch deployment to Update.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder + getPatchDeploymentBuilder() { + + onChanged(); + return getPatchDeploymentFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The patch deployment to Update.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder + getPatchDeploymentOrBuilder() { + if (patchDeploymentBuilder_ != null) { + return patchDeploymentBuilder_.getMessageOrBuilder(); + } else { + return patchDeployment_ == null + ? com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + .getDefaultInstance() + : patchDeployment_; + } + } + /** + * + * + *
+       * Required. The patch deployment to Update.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder> + getPatchDeploymentFieldBuilder() { + if (patchDeploymentBuilder_ == null) { + patchDeploymentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder>( + getPatchDeployment(), getParentForChildren(), isClean()); + patchDeployment_ = null; + } + return patchDeploymentBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+       * Optional. Field mask that controls which fields of the patch deployment should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+       * Optional. Field mask that controls which fields of the patch deployment should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Field mask that controls which fields of the patch deployment should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Field mask that controls which fields of the patch deployment should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. Field mask that controls which fields of the patch deployment should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_) + .mergeFrom(value) + .buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Field mask that controls which fields of the patch deployment should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. Field mask that controls which fields of the patch deployment should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Field mask that controls which fields of the patch deployment should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+       * Optional. Field mask that controls which fields of the patch deployment should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1beta.UpdatePatchDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.UpdatePatchDeploymentRequest) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments + .UpdatePatchDeploymentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest(); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePatchDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdatePatchDeploymentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.UpdatePatchDeploymentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PausePatchDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.PausePatchDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * A request message for pausing a patch deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.PausePatchDeploymentRequest} + */ + public static final class PausePatchDeploymentRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.PausePatchDeploymentRequest) + PausePatchDeploymentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PausePatchDeploymentRequest.newBuilder() to construct. + private PausePatchDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PausePatchDeploymentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PausePatchDeploymentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PausePatchDeploymentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_PausePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_PausePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest other = + (com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A request message for pausing a patch deployment.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.PausePatchDeploymentRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.PausePatchDeploymentRequest) + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_PausePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_PausePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_PausePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest result = + new com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1beta.PausePatchDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.PausePatchDeploymentRequest) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments + .PausePatchDeploymentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest(); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PausePatchDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PausePatchDeploymentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PausePatchDeploymentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ResumePatchDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.ResumePatchDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * A request message for resuming a patch deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.ResumePatchDeploymentRequest} + */ + public static final class ResumePatchDeploymentRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.ResumePatchDeploymentRequest) + ResumePatchDeploymentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResumePatchDeploymentRequest.newBuilder() to construct. + private ResumePatchDeploymentRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResumePatchDeploymentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResumePatchDeploymentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResumePatchDeploymentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ResumePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ResumePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest other = + (com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A request message for resuming a patch deployment.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.ResumePatchDeploymentRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ResumePatchDeploymentRequest) + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ResumePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ResumePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + .class, + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ResumePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest result = + new com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest( + this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the patch deployment in the form
+       * `projects/*/patchDeployments/*`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1beta.ResumePatchDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ResumePatchDeploymentRequest) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments + .ResumePatchDeploymentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest(); + } + + public static com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResumePatchDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResumePatchDeploymentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.ResumePatchDeploymentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_PatchDeployment_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_PatchDeployment_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_UpdatePatchDeploymentRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_UpdatePatchDeploymentRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_PausePatchDeploymentRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_PausePatchDeploymentRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ResumePatchDeploymentRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ResumePatchDeploymentRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/osconfig/v1beta/patch_dep" + + "loyments.proto\022\034google.cloud.osconfig.v1" + + "beta\032\034google/api/annotations.proto\032\037goog" + + "le/api/field_behavior.proto\032\031google/api/" + + "resource.proto\032-google/cloud/osconfig/v1" + + "beta/patch_jobs.proto\032\036google/protobuf/d" + + "uration.proto\032 google/protobuf/field_mas" + + "k.proto\032\037google/protobuf/timestamp.proto" + + "\032\032google/type/datetime.proto\032\033google/typ" + + "e/dayofweek.proto\032\033google/type/timeofday" + + ".proto\"\204\007\n\017PatchDeployment\022\014\n\004name\030\001 \001(\t" + + "\022\030\n\013description\030\002 \001(\tB\003\340A\001\022O\n\017instance_f" + + "ilter\030\003 \001(\01321.google.cloud.osconfig.v1be" + + "ta.PatchInstanceFilterB\003\340A\002\022D\n\014patch_con" + + "fig\030\004 \001(\0132).google.cloud.osconfig.v1beta" + + ".PatchConfigB\003\340A\001\0220\n\010duration\030\005 \001(\0132\031.go" + + "ogle.protobuf.DurationB\003\340A\001\022O\n\021one_time_" + + "schedule\030\006 \001(\0132-.google.cloud.osconfig.v" + + "1beta.OneTimeScheduleB\003\340A\002H\000\022R\n\022recurrin" + + "g_schedule\030\007 \001(\0132/.google.cloud.osconfig" + + ".v1beta.RecurringScheduleB\003\340A\002H\000\0224\n\013crea" + + "te_time\030\010 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\0224\n\013update_time\030\t \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\022:\n\021last_execute_tim" + + "e\030\n \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\022@\n\007rollout\030\013 \001(\0132*.google.cloud.osconfi" + + "g.v1beta.PatchRolloutB\003\340A\001\022G\n\005state\030\014 \001(" + + "\01623.google.cloud.osconfig.v1beta.PatchDe" + + "ployment.StateB\003\340A\003\"6\n\005State\022\025\n\021STATE_UN" + + "SPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\n\n\006PAUSED\020\002:d\352Aa" + + "\n\'osconfig.googleapis.com/PatchDeploymen" + + "t\0226projects/{project}/patchDeployments/{" + + "patch_deployment}B\n\n\010schedule\"H\n\017OneTime" + + "Schedule\0225\n\014execute_time\030\001 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\002\"\222\005\n\021RecurringSch" + + "edule\022-\n\ttime_zone\030\001 \001(\0132\025.google.type.T" + + "imeZoneB\003\340A\002\0223\n\nstart_time\030\002 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\001\0221\n\010end_time\030\003 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\001\0220\n\013" + + "time_of_day\030\004 \001(\0132\026.google.type.TimeOfDa" + + "yB\003\340A\002\022Q\n\tfrequency\030\005 \001(\01629.google.cloud" + + ".osconfig.v1beta.RecurringSchedule.Frequ" + + "encyB\003\340A\002\022C\n\006weekly\030\006 \001(\0132,.google.cloud" + + ".osconfig.v1beta.WeeklyScheduleB\003\340A\002H\000\022E" + + "\n\007monthly\030\007 \001(\0132-.google.cloud.osconfig." + + "v1beta.MonthlyScheduleB\003\340A\002H\000\022:\n\021last_ex" + + "ecute_time\030\t \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\022:\n\021next_execute_time\030\n \001(\0132\032.g" + + "oogle.protobuf.TimestampB\003\340A\003\"J\n\tFrequen" + + "cy\022\031\n\025FREQUENCY_UNSPECIFIED\020\000\022\n\n\006WEEKLY\020" + + "\001\022\013\n\007MONTHLY\020\002\022\t\n\005DAILY\020\003B\021\n\017schedule_co" + + "nfig\"B\n\016WeeklySchedule\0220\n\013day_of_week\030\001 " + + "\001(\0162\026.google.type.DayOfWeekB\003\340A\002\"\213\001\n\017Mon" + + "thlySchedule\022N\n\021week_day_of_month\030\001 \001(\0132" + + ",.google.cloud.osconfig.v1beta.WeekDayOf" + + "MonthB\003\340A\002H\000\022\030\n\tmonth_day\030\002 \001(\005B\003\340A\002H\000B\016" + + "\n\014day_of_month\"v\n\016WeekDayOfMonth\022\031\n\014week" + + "_ordinal\030\001 \001(\005B\003\340A\002\0220\n\013day_of_week\030\002 \001(\016" + + "2\026.google.type.DayOfWeekB\003\340A\002\022\027\n\nday_off" + + "set\030\003 \001(\005B\003\340A\001\"\243\001\n\034CreatePatchDeployment" + + "Request\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022 \n\023patch_de" + + "ployment_id\030\002 \001(\tB\003\340A\002\022L\n\020patch_deployme" + + "nt\030\003 \001(\0132-.google.cloud.osconfig.v1beta." + + "PatchDeploymentB\003\340A\002\".\n\031GetPatchDeployme" + + "ntRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\"c\n\033ListPatc" + + "hDeploymentsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002" + + "\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003" + + " \001(\tB\003\340A\001\"\201\001\n\034ListPatchDeploymentsRespon" + + "se\022H\n\021patch_deployments\030\001 \003(\0132-.google.c" + + "loud.osconfig.v1beta.PatchDeployment\022\027\n\017" + + "next_page_token\030\002 \001(\t\"1\n\034DeletePatchDepl" + + "oymentRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\"\242\001\n\034Upd" + + "atePatchDeploymentRequest\022L\n\020patch_deplo" + + "yment\030\001 \001(\0132-.google.cloud.osconfig.v1be" + + "ta.PatchDeploymentB\003\340A\002\0224\n\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"\\\n" + + "\033PausePatchDeploymentRequest\022=\n\004name\030\001 \001" + + "(\tB/\340A\002\372A)\n\'osconfig.googleapis.com/Patc" + + "hDeployment\"]\n\034ResumePatchDeploymentRequ" + + "est\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'osconfig.goog" + + "leapis.com/PatchDeploymentBz\n com.google" + + ".cloud.osconfig.v1betaB\020PatchDeployments" + + "ZDgoogle.golang.org/genproto/googleapis/" + + "cloud/osconfig/v1beta;osconfigb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.osconfig.v1beta.PatchJobs.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.DateTimeProto.getDescriptor(), + com.google.type.DayOfWeekProto.getDescriptor(), + com.google.type.TimeOfDayProto.getDescriptor(), + }); + internal_static_google_cloud_osconfig_v1beta_PatchDeployment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1beta_PatchDeployment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_PatchDeployment_descriptor, + new java.lang.String[] { + "Name", + "Description", + "InstanceFilter", + "PatchConfig", + "Duration", + "OneTimeSchedule", + "RecurringSchedule", + "CreateTime", + "UpdateTime", + "LastExecuteTime", + "Rollout", + "State", + "Schedule", + }); + internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_descriptor, + new java.lang.String[] { + "ExecuteTime", + }); + internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_descriptor, + new java.lang.String[] { + "TimeZone", + "StartTime", + "EndTime", + "TimeOfDay", + "Frequency", + "Weekly", + "Monthly", + "LastExecuteTime", + "NextExecuteTime", + "ScheduleConfig", + }); + internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_descriptor, + new java.lang.String[] { + "DayOfWeek", + }); + internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_descriptor, + new java.lang.String[] { + "WeekDayOfMonth", "MonthDay", "DayOfMonth", + }); + internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_descriptor, + new java.lang.String[] { + "WeekOrdinal", "DayOfWeek", "DayOffset", + }); + internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_descriptor, + new java.lang.String[] { + "Parent", "PatchDeploymentId", "PatchDeployment", + }); + internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( @@ -16177,15 +19605,43 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); + internal_static_google_cloud_osconfig_v1beta_UpdatePatchDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_osconfig_v1beta_UpdatePatchDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_UpdatePatchDeploymentRequest_descriptor, + new java.lang.String[] { + "PatchDeployment", "UpdateMask", + }); + internal_static_google_cloud_osconfig_v1beta_PausePatchDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_osconfig_v1beta_PausePatchDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_PausePatchDeploymentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1beta_ResumePatchDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_osconfig_v1beta_ResumePatchDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ResumePatchDeploymentRequest_descriptor, + new java.lang.String[] { + "Name", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.osconfig.v1beta.PatchJobs.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.type.DateTimeProto.getDescriptor(); com.google.type.DayOfWeekProto.getDescriptor(); diff --git a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchJobs.java b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchJobs.java index a8adfbf5..39b642bd 100644 --- a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchJobs.java +++ b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchJobs.java @@ -243,13 +243,47 @@ public interface ExecutePatchJobRequestOrBuilder * @return The bytes for displayName. */ com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+     * Rollout strategy of the patch job.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + * + * @return Whether the rollout field is set. + */ + boolean hasRollout(); + /** + * + * + *
+     * Rollout strategy of the patch job.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + * + * @return The rollout. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout getRollout(); + /** + * + * + *
+     * Rollout strategy of the patch job.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder getRolloutOrBuilder(); } /** * * *
-   * A request message to initiate patching across Google Compute Engine
-   * instances.
+   * A request message to initiate patching across Compute Engine instances.
    * 
* * Protobuf type {@code google.cloud.osconfig.v1beta.ExecutePatchJobRequest} @@ -373,6 +407,23 @@ private ExecutePatchJobRequest( java.lang.String s = input.readStringRequireUtf8(); displayName_ = s; + break; + } + case 74: + { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder subBuilder = null; + if (rollout_ != null) { + subBuilder = rollout_.toBuilder(); + } + rollout_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rollout_); + rollout_ = subBuilder.buildPartial(); + } + break; } default: @@ -736,6 +787,54 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { } } + public static final int ROLLOUT_FIELD_NUMBER = 9; + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout rollout_; + /** + * + * + *
+     * Rollout strategy of the patch job.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + * + * @return Whether the rollout field is set. + */ + @java.lang.Override + public boolean hasRollout() { + return rollout_ != null; + } + /** + * + * + *
+     * Rollout strategy of the patch job.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + * + * @return The rollout. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout getRollout() { + return rollout_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.getDefaultInstance() + : rollout_; + } + /** + * + * + *
+     * Rollout strategy of the patch job.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder getRolloutOrBuilder() { + return getRollout(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -771,6 +870,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, displayName_); } + if (rollout_ != null) { + output.writeMessage(9, getRollout()); + } unknownFields.writeTo(output); } @@ -801,6 +903,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, displayName_); } + if (rollout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getRollout()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -833,6 +938,10 @@ public boolean equals(final java.lang.Object obj) { } if (getDryRun() != other.getDryRun()) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasRollout() != other.hasRollout()) return false; + if (hasRollout()) { + if (!getRollout().equals(other.getRollout())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -864,6 +973,10 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDryRun()); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); + if (hasRollout()) { + hash = (37 * hash) + ROLLOUT_FIELD_NUMBER; + hash = (53 * hash) + getRollout().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -971,8 +1084,7 @@ protected Builder newBuilderForType( * * *
-     * A request message to initiate patching across Google Compute Engine
-     * instances.
+     * A request message to initiate patching across Compute Engine instances.
      * 
* * Protobuf type {@code google.cloud.osconfig.v1beta.ExecutePatchJobRequest} @@ -1041,6 +1153,12 @@ public Builder clear() { displayName_ = ""; + if (rolloutBuilder_ == null) { + rollout_ = null; + } else { + rollout_ = null; + rolloutBuilder_ = null; + } return this; } @@ -1089,6 +1207,11 @@ public com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest buildPa } result.dryRun_ = dryRun_; result.displayName_ = displayName_; + if (rolloutBuilder_ == null) { + result.rollout_ = rollout_; + } else { + result.rollout_ = rolloutBuilder_.build(); + } onBuilt(); return result; } @@ -1168,6 +1291,9 @@ public Builder mergeFrom( displayName_ = other.displayName_; onChanged(); } + if (other.hasRollout()) { + mergeRollout(other.getRollout()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2181,6 +2307,193 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout rollout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder> + rolloutBuilder_; + /** + * + * + *
+       * Rollout strategy of the patch job.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + * + * @return Whether the rollout field is set. + */ + public boolean hasRollout() { + return rolloutBuilder_ != null || rollout_ != null; + } + /** + * + * + *
+       * Rollout strategy of the patch job.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + * + * @return The rollout. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout getRollout() { + if (rolloutBuilder_ == null) { + return rollout_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.getDefaultInstance() + : rollout_; + } else { + return rolloutBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Rollout strategy of the patch job.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + */ + public Builder setRollout(com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout value) { + if (rolloutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rollout_ = value; + onChanged(); + } else { + rolloutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Rollout strategy of the patch job.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + */ + public Builder setRollout( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder builderForValue) { + if (rolloutBuilder_ == null) { + rollout_ = builderForValue.build(); + onChanged(); + } else { + rolloutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Rollout strategy of the patch job.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + */ + public Builder mergeRollout(com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout value) { + if (rolloutBuilder_ == null) { + if (rollout_ != null) { + rollout_ = + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.newBuilder(rollout_) + .mergeFrom(value) + .buildPartial(); + } else { + rollout_ = value; + } + onChanged(); + } else { + rolloutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Rollout strategy of the patch job.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + */ + public Builder clearRollout() { + if (rolloutBuilder_ == null) { + rollout_ = null; + onChanged(); + } else { + rollout_ = null; + rolloutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Rollout strategy of the patch job.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder getRolloutBuilder() { + + onChanged(); + return getRolloutFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Rollout strategy of the patch job.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder + getRolloutOrBuilder() { + if (rolloutBuilder_ != null) { + return rolloutBuilder_.getMessageOrBuilder(); + } else { + return rollout_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.getDefaultInstance() + : rollout_; + } + } + /** + * + * + *
+       * Rollout strategy of the patch job.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder> + getRolloutFieldBuilder() { + if (rolloutBuilder_ == null) { + rolloutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder>( + getRollout(), getParentForChildren(), isClean()); + rollout_ = null; + } + return rolloutBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -5577,7 +5890,7 @@ public interface PatchJobInstanceDetailsOrBuilder * Patch details for a VM instance. For more information about reviewing VM * instance details, see * [Listing all VM instance details for a specific patch - * job](/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details). + * job](https://cloud.google.com/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details). * * * Protobuf type {@code google.cloud.osconfig.v1beta.PatchJobInstanceDetails} @@ -6109,7 +6422,7 @@ protected Builder newBuilderForType( * Patch details for a VM instance. For more information about reviewing VM * instance details, see * [Listing all VM instance details for a specific patch - * job](/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details). + * job](https://cloud.google.com/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details). * * * Protobuf type {@code google.cloud.osconfig.v1beta.PatchJobInstanceDetails} @@ -9405,7 +9718,7 @@ public interface PatchJobOrBuilder * * *
-     * The current state of the PatchJob .
+     * The current state of the PatchJob.
      * 
* * .google.cloud.osconfig.v1beta.PatchJob.State state = 5; @@ -9417,7 +9730,7 @@ public interface PatchJobOrBuilder * * *
-     * The current state of the PatchJob .
+     * The current state of the PatchJob.
      * 
* * .google.cloud.osconfig.v1beta.PatchJob.State state = 5; @@ -9657,6 +9970,41 @@ public interface PatchJobOrBuilder * @return The bytes for patchDeployment. */ com.google.protobuf.ByteString getPatchDeploymentBytes(); + + /** + * + * + *
+     * Rollout strategy being applied.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + * + * @return Whether the rollout field is set. + */ + boolean hasRollout(); + /** + * + * + *
+     * Rollout strategy being applied.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + * + * @return The rollout. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout getRollout(); + /** + * + * + *
+     * Rollout strategy being applied.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder getRolloutOrBuilder(); } /** * @@ -9664,10 +10012,11 @@ public interface PatchJobOrBuilder *
    * A high level representation of a patch job that is either in progress
    * or has completed.
-   * Instances details are not included in the job. To paginate through instance
-   * details, use ListPatchJobInstanceDetails.
+   * Instance details are not included in the job. To paginate through instance
+   * details, use `ListPatchJobInstanceDetails`.
    * For more information about patch jobs, see
-   * [Creating patch jobs](/compute/docs/os-patch-management/create-patch-job).
+   * [Creating patch
+   * jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
    * 
* * Protobuf type {@code google.cloud.osconfig.v1beta.PatchJob} @@ -9869,6 +10218,23 @@ private PatchJob( java.lang.String s = input.readStringRequireUtf8(); patchDeployment_ = s; + break; + } + case 130: + { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder subBuilder = null; + if (rollout_ != null) { + subBuilder = rollout_.toBuilder(); + } + rollout_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rollout_); + rollout_ = subBuilder.buildPartial(); + } + break; } default: @@ -12489,7 +12855,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-     * The current state of the PatchJob .
+     * The current state of the PatchJob.
      * 
* * .google.cloud.osconfig.v1beta.PatchJob.State state = 5; @@ -12504,7 +12870,7 @@ public int getStateValue() { * * *
-     * The current state of the PatchJob .
+     * The current state of the PatchJob.
      * 
* * .google.cloud.osconfig.v1beta.PatchJob.State state = 5; @@ -12864,6 +13230,54 @@ public com.google.protobuf.ByteString getPatchDeploymentBytes() { } } + public static final int ROLLOUT_FIELD_NUMBER = 16; + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout rollout_; + /** + * + * + *
+     * Rollout strategy being applied.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + * + * @return Whether the rollout field is set. + */ + @java.lang.Override + public boolean hasRollout() { + return rollout_ != null; + } + /** + * + * + *
+     * Rollout strategy being applied.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + * + * @return The rollout. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout getRollout() { + return rollout_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.getDefaultInstance() + : rollout_; + } + /** + * + * + *
+     * Rollout strategy being applied.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder getRolloutOrBuilder() { + return getRollout(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -12922,6 +13336,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(patchDeployment_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 15, patchDeployment_); } + if (rollout_ != null) { + output.writeMessage(16, getRollout()); + } unknownFields.writeTo(output); } @@ -12977,6 +13394,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(patchDeployment_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, patchDeployment_); } + if (rollout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getRollout()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -13026,6 +13446,10 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Double.doubleToLongBits(getPercentComplete()) != java.lang.Double.doubleToLongBits(other.getPercentComplete())) return false; if (!getPatchDeployment().equals(other.getPatchDeployment())) return false; + if (hasRollout() != other.hasRollout()) return false; + if (hasRollout()) { + if (!getRollout().equals(other.getRollout())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -13080,6 +13504,10 @@ public int hashCode() { java.lang.Double.doubleToLongBits(getPercentComplete())); hash = (37 * hash) + PATCH_DEPLOYMENT_FIELD_NUMBER; hash = (53 * hash) + getPatchDeployment().hashCode(); + if (hasRollout()) { + hash = (37 * hash) + ROLLOUT_FIELD_NUMBER; + hash = (53 * hash) + getRollout().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -13188,10 +13616,11 @@ protected Builder newBuilderForType( *
      * A high level representation of a patch job that is either in progress
      * or has completed.
-     * Instances details are not included in the job. To paginate through instance
-     * details, use ListPatchJobInstanceDetails.
+     * Instance details are not included in the job. To paginate through instance
+     * details, use `ListPatchJobInstanceDetails`.
      * For more information about patch jobs, see
-     * [Creating patch jobs](/compute/docs/os-patch-management/create-patch-job).
+     * [Creating patch
+     * jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
      * 
* * Protobuf type {@code google.cloud.osconfig.v1beta.PatchJob} @@ -13285,6 +13714,12 @@ public Builder clear() { patchDeployment_ = ""; + if (rolloutBuilder_ == null) { + rollout_ = null; + } else { + rollout_ = null; + rolloutBuilder_ = null; + } return this; } @@ -13350,6 +13785,11 @@ public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob buildPartial() { result.errorMessage_ = errorMessage_; result.percentComplete_ = percentComplete_; result.patchDeployment_ = patchDeployment_; + if (rolloutBuilder_ == null) { + result.rollout_ = rollout_; + } else { + result.rollout_ = rolloutBuilder_.build(); + } onBuilt(); return result; } @@ -13449,6 +13889,9 @@ public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob oth patchDeployment_ = other.patchDeployment_; onChanged(); } + if (other.hasRollout()) { + mergeRollout(other.getRollout()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -14182,7 +14625,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-       * The current state of the PatchJob .
+       * The current state of the PatchJob.
        * 
* * .google.cloud.osconfig.v1beta.PatchJob.State state = 5; @@ -14197,7 +14640,7 @@ public int getStateValue() { * * *
-       * The current state of the PatchJob .
+       * The current state of the PatchJob.
        * 
* * .google.cloud.osconfig.v1beta.PatchJob.State state = 5; @@ -14215,7 +14658,7 @@ public Builder setStateValue(int value) { * * *
-       * The current state of the PatchJob .
+       * The current state of the PatchJob.
        * 
* * .google.cloud.osconfig.v1beta.PatchJob.State state = 5; @@ -14235,7 +14678,7 @@ public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.State getState() { * * *
-       * The current state of the PatchJob .
+       * The current state of the PatchJob.
        * 
* * .google.cloud.osconfig.v1beta.PatchJob.State state = 5; @@ -14256,7 +14699,7 @@ public Builder setState(com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.Stat * * *
-       * The current state of the PatchJob .
+       * The current state of the PatchJob.
        * 
* * .google.cloud.osconfig.v1beta.PatchJob.State state = 5; @@ -15381,6 +15824,193 @@ public Builder setPatchDeploymentBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout rollout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder> + rolloutBuilder_; + /** + * + * + *
+       * Rollout strategy being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + * + * @return Whether the rollout field is set. + */ + public boolean hasRollout() { + return rolloutBuilder_ != null || rollout_ != null; + } + /** + * + * + *
+       * Rollout strategy being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + * + * @return The rollout. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout getRollout() { + if (rolloutBuilder_ == null) { + return rollout_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.getDefaultInstance() + : rollout_; + } else { + return rolloutBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Rollout strategy being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + */ + public Builder setRollout(com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout value) { + if (rolloutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rollout_ = value; + onChanged(); + } else { + rolloutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Rollout strategy being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + */ + public Builder setRollout( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder builderForValue) { + if (rolloutBuilder_ == null) { + rollout_ = builderForValue.build(); + onChanged(); + } else { + rolloutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Rollout strategy being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + */ + public Builder mergeRollout(com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout value) { + if (rolloutBuilder_ == null) { + if (rollout_ != null) { + rollout_ = + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.newBuilder(rollout_) + .mergeFrom(value) + .buildPartial(); + } else { + rollout_ = value; + } + onChanged(); + } else { + rolloutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Rollout strategy being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + */ + public Builder clearRollout() { + if (rolloutBuilder_ == null) { + rollout_ = null; + onChanged(); + } else { + rollout_ = null; + rolloutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Rollout strategy being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder getRolloutBuilder() { + + onChanged(); + return getRolloutFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Rollout strategy being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder + getRolloutOrBuilder() { + if (rolloutBuilder_ != null) { + return rolloutBuilder_.getMessageOrBuilder(); + } else { + return rollout_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.getDefaultInstance() + : rollout_; + } + } + /** + * + * + *
+       * Rollout strategy being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout rollout = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder> + getRolloutFieldBuilder() { + if (rolloutBuilder_ == null) { + rolloutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder>( + getRollout(), getParentForChildren(), isClean()); + rollout_ = null; + } + return rolloutBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -15720,6 +16350,19 @@ public interface PatchConfigOrBuilder * .google.cloud.osconfig.v1beta.ExecStep post_step = 9; */ com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder getPostStepOrBuilder(); + + /** + * + * + *
+     * Allows the patch job to run on Managed instance groups (MIGs).
+     * 
+ * + * bool mig_instances_allowed = 10; + * + * @return The migInstancesAllowed. + */ + boolean getMigInstancesAllowed(); } /** * @@ -15899,6 +16542,11 @@ private PatchConfig( postStep_ = subBuilder.buildPartial(); } + break; + } + case 80: + { + migInstancesAllowed_ = input.readBool(); break; } default: @@ -16510,6 +17158,24 @@ public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder getPostStepO return getPostStep(); } + public static final int MIG_INSTANCES_ALLOWED_FIELD_NUMBER = 10; + private boolean migInstancesAllowed_; + /** + * + * + *
+     * Allows the patch job to run on Managed instance groups (MIGs).
+     * 
+ * + * bool mig_instances_allowed = 10; + * + * @return The migInstancesAllowed. + */ + @java.lang.Override + public boolean getMigInstancesAllowed() { + return migInstancesAllowed_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -16551,6 +17217,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (postStep_ != null) { output.writeMessage(9, getPostStep()); } + if (migInstancesAllowed_ != false) { + output.writeBool(10, migInstancesAllowed_); + } unknownFields.writeTo(output); } @@ -16587,6 +17256,9 @@ public int getSerializedSize() { if (postStep_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getPostStep()); } + if (migInstancesAllowed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, migInstancesAllowed_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -16632,6 +17304,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPostStep()) { if (!getPostStep().equals(other.getPostStep())) return false; } + if (getMigInstancesAllowed() != other.getMigInstancesAllowed()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -16673,6 +17346,8 @@ public int hashCode() { hash = (37 * hash) + POST_STEP_FIELD_NUMBER; hash = (53 * hash) + getPostStep().hashCode(); } + hash = (37 * hash) + MIG_INSTANCES_ALLOWED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMigInstancesAllowed()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -16866,6 +17541,8 @@ public Builder clear() { postStep_ = null; postStepBuilder_ = null; } + migInstancesAllowed_ = false; + return this; } @@ -16929,6 +17606,7 @@ public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig buildPartial() { } else { result.postStep_ = postStepBuilder_.build(); } + result.migInstancesAllowed_ = migInstancesAllowed_; onBuilt(); return result; } @@ -17005,6 +17683,9 @@ public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig if (other.hasPostStep()) { mergePostStep(other.getPostStep()); } + if (other.getMigInstancesAllowed() != false) { + setMigInstancesAllowed(other.getMigInstancesAllowed()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -18477,6 +19158,58 @@ public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder getPostStepO return postStepBuilder_; } + private boolean migInstancesAllowed_; + /** + * + * + *
+       * Allows the patch job to run on Managed instance groups (MIGs).
+       * 
+ * + * bool mig_instances_allowed = 10; + * + * @return The migInstancesAllowed. + */ + @java.lang.Override + public boolean getMigInstancesAllowed() { + return migInstancesAllowed_; + } + /** + * + * + *
+       * Allows the patch job to run on Managed instance groups (MIGs).
+       * 
+ * + * bool mig_instances_allowed = 10; + * + * @param value The migInstancesAllowed to set. + * @return This builder for chaining. + */ + public Builder setMigInstancesAllowed(boolean value) { + + migInstancesAllowed_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Allows the patch job to run on Managed instance groups (MIGs).
+       * 
+ * + * bool mig_instances_allowed = 10; + * + * @return This builder for chaining. + */ + public Builder clearMigInstancesAllowed() { + + migInstancesAllowed_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -31837,8 +32570,8 @@ public interface GroupLabelOrBuilder * * *
-       * Google Compute Engine instance labels that must be present for a VM
-       * instance to be targeted by this filter.
+       * Compute Engine instance labels that must be present for a VM instance to
+       * be targeted by this filter.
        * 
* * map<string, string> labels = 1; @@ -31848,8 +32581,8 @@ public interface GroupLabelOrBuilder * * *
-       * Google Compute Engine instance labels that must be present for a VM
-       * instance to be targeted by this filter.
+       * Compute Engine instance labels that must be present for a VM instance to
+       * be targeted by this filter.
        * 
* * map<string, string> labels = 1; @@ -31862,8 +32595,8 @@ public interface GroupLabelOrBuilder * * *
-       * Google Compute Engine instance labels that must be present for a VM
-       * instance to be targeted by this filter.
+       * Compute Engine instance labels that must be present for a VM instance to
+       * be targeted by this filter.
        * 
* * map<string, string> labels = 1; @@ -31873,8 +32606,8 @@ public interface GroupLabelOrBuilder * * *
-       * Google Compute Engine instance labels that must be present for a VM
-       * instance to be targeted by this filter.
+       * Compute Engine instance labels that must be present for a VM instance to
+       * be targeted by this filter.
        * 
* * map<string, string> labels = 1; @@ -31884,8 +32617,8 @@ public interface GroupLabelOrBuilder * * *
-       * Google Compute Engine instance labels that must be present for a VM
-       * instance to be targeted by this filter.
+       * Compute Engine instance labels that must be present for a VM instance to
+       * be targeted by this filter.
        * 
* * map<string, string> labels = 1; @@ -32035,8 +32768,8 @@ public int getLabelsCount() { * * *
-       * Google Compute Engine instance labels that must be present for a VM
-       * instance to be targeted by this filter.
+       * Compute Engine instance labels that must be present for a VM instance to
+       * be targeted by this filter.
        * 
* * map<string, string> labels = 1; @@ -32058,8 +32791,8 @@ public java.util.Map getLabels() { * * *
-       * Google Compute Engine instance labels that must be present for a VM
-       * instance to be targeted by this filter.
+       * Compute Engine instance labels that must be present for a VM instance to
+       * be targeted by this filter.
        * 
* * map<string, string> labels = 1; @@ -32072,8 +32805,8 @@ public java.util.Map getLabelsMap() { * * *
-       * Google Compute Engine instance labels that must be present for a VM
-       * instance to be targeted by this filter.
+       * Compute Engine instance labels that must be present for a VM instance to
+       * be targeted by this filter.
        * 
* * map<string, string> labels = 1; @@ -32091,8 +32824,8 @@ public java.lang.String getLabelsOrDefault( * * *
-       * Google Compute Engine instance labels that must be present for a VM
-       * instance to be targeted by this filter.
+       * Compute Engine instance labels that must be present for a VM instance to
+       * be targeted by this filter.
        * 
* * map<string, string> labels = 1; @@ -32515,8 +33248,8 @@ public int getLabelsCount() { * * *
-         * Google Compute Engine instance labels that must be present for a VM
-         * instance to be targeted by this filter.
+         * Compute Engine instance labels that must be present for a VM instance to
+         * be targeted by this filter.
          * 
* * map<string, string> labels = 1; @@ -32538,8 +33271,8 @@ public java.util.Map getLabels() { * * *
-         * Google Compute Engine instance labels that must be present for a VM
-         * instance to be targeted by this filter.
+         * Compute Engine instance labels that must be present for a VM instance to
+         * be targeted by this filter.
          * 
* * map<string, string> labels = 1; @@ -32552,8 +33285,8 @@ public java.util.Map getLabelsMap() { * * *
-         * Google Compute Engine instance labels that must be present for a VM
-         * instance to be targeted by this filter.
+         * Compute Engine instance labels that must be present for a VM instance to
+         * be targeted by this filter.
          * 
* * map<string, string> labels = 1; @@ -32571,8 +33304,8 @@ public java.lang.String getLabelsOrDefault( * * *
-         * Google Compute Engine instance labels that must be present for a VM
-         * instance to be targeted by this filter.
+         * Compute Engine instance labels that must be present for a VM instance to
+         * be targeted by this filter.
          * 
* * map<string, string> labels = 1; @@ -32597,8 +33330,8 @@ public Builder clearLabels() { * * *
-         * Google Compute Engine instance labels that must be present for a VM
-         * instance to be targeted by this filter.
+         * Compute Engine instance labels that must be present for a VM instance to
+         * be targeted by this filter.
          * 
* * map<string, string> labels = 1; @@ -32619,8 +33352,8 @@ public java.util.Map getMutableLabels() { * * *
-         * Google Compute Engine instance labels that must be present for a VM
-         * instance to be targeted by this filter.
+         * Compute Engine instance labels that must be present for a VM instance to
+         * be targeted by this filter.
          * 
* * map<string, string> labels = 1; @@ -32639,8 +33372,8 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * * *
-         * Google Compute Engine instance labels that must be present for a VM
-         * instance to be targeted by this filter.
+         * Compute Engine instance labels that must be present for a VM instance to
+         * be targeted by this filter.
          * 
* * map<string, string> labels = 1; @@ -34615,6 +35348,1398 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface PatchRolloutOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.PatchRollout) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Mode of the patch rollout.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout.Mode mode = 1; + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + /** + * + * + *
+     * Mode of the patch rollout.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout.Mode mode = 1; + * + * @return The mode. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Mode getMode(); + + /** + * + * + *
+     * The maximum number (or percentage) of VMs per zone to disrupt at any given
+     * moment. The number of VMs calculated from multiplying the percentage by the
+     * total number of VMs in a zone is rounded up.
+     * During patching, a VM is considered disrupted from the time the agent is
+     * notified to begin until patching has completed. This disruption time
+     * includes the time to complete reboot and any post-patch steps.
+     * A VM contributes to the disruption budget if its patching operation fails
+     * either when applying the patches, running pre or post patch steps, or if it
+     * fails to respond with a success notification before timing out. VMs that
+     * are not running or do not have an active agent do not count toward this
+     * disruption budget.
+     * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+     * the patch job stops, because continuing to the next zone requires
+     * completion of the patch process in the previous zone.
+     * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+     * fail to patch in the current zone, the patch job continues to patch 2 VMs
+     * at a time until the zone is completed. When that zone is completed
+     * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+     * VMs in the next zone fail to patch, the patch job stops.
+     * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + * + * @return Whether the disruptionBudget field is set. + */ + boolean hasDisruptionBudget(); + /** + * + * + *
+     * The maximum number (or percentage) of VMs per zone to disrupt at any given
+     * moment. The number of VMs calculated from multiplying the percentage by the
+     * total number of VMs in a zone is rounded up.
+     * During patching, a VM is considered disrupted from the time the agent is
+     * notified to begin until patching has completed. This disruption time
+     * includes the time to complete reboot and any post-patch steps.
+     * A VM contributes to the disruption budget if its patching operation fails
+     * either when applying the patches, running pre or post patch steps, or if it
+     * fails to respond with a success notification before timing out. VMs that
+     * are not running or do not have an active agent do not count toward this
+     * disruption budget.
+     * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+     * the patch job stops, because continuing to the next zone requires
+     * completion of the patch process in the previous zone.
+     * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+     * fail to patch in the current zone, the patch job continues to patch 2 VMs
+     * at a time until the zone is completed. When that zone is completed
+     * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+     * VMs in the next zone fail to patch, the patch job stops.
+     * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + * + * @return The disruptionBudget. + */ + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent getDisruptionBudget(); + /** + * + * + *
+     * The maximum number (or percentage) of VMs per zone to disrupt at any given
+     * moment. The number of VMs calculated from multiplying the percentage by the
+     * total number of VMs in a zone is rounded up.
+     * During patching, a VM is considered disrupted from the time the agent is
+     * notified to begin until patching has completed. This disruption time
+     * includes the time to complete reboot and any post-patch steps.
+     * A VM contributes to the disruption budget if its patching operation fails
+     * either when applying the patches, running pre or post patch steps, or if it
+     * fails to respond with a success notification before timing out. VMs that
+     * are not running or do not have an active agent do not count toward this
+     * disruption budget.
+     * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+     * the patch job stops, because continuing to the next zone requires
+     * completion of the patch process in the previous zone.
+     * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+     * fail to patch in the current zone, the patch job continues to patch 2 VMs
+     * at a time until the zone is completed. When that zone is completed
+     * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+     * VMs in the next zone fail to patch, the patch job stops.
+     * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + */ + com.google.cloud.osconfig.v1beta.Common.FixedOrPercentOrBuilder getDisruptionBudgetOrBuilder(); + } + /** + * + * + *
+   * Patch rollout configuration specifications. Contains details on the
+   * concurrency control when applying patch(es) to all targeted VMs.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.PatchRollout} + */ + public static final class PatchRollout extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.PatchRollout) + PatchRolloutOrBuilder { + private static final long serialVersionUID = 0L; + // Use PatchRollout.newBuilder() to construct. + private PatchRollout(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PatchRollout() { + mode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PatchRollout(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PatchRollout( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + mode_ = rawValue; + break; + } + case 18: + { + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.Builder subBuilder = null; + if (disruptionBudget_ != null) { + subBuilder = disruptionBudget_.toBuilder(); + } + disruptionBudget_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(disruptionBudget_); + disruptionBudget_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchRollout_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchRollout_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.class, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder.class); + } + + /** + * + * + *
+     * Type of the rollout.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1beta.PatchRollout.Mode} + */ + public enum Mode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Mode must be specified.
+       * 
+ * + * MODE_UNSPECIFIED = 0; + */ + MODE_UNSPECIFIED(0), + /** + * + * + *
+       * Patches are applied one zone at a time. The patch job begins in the
+       * region with the lowest number of targeted VMs. Within the region,
+       * patching begins in the zone with the lowest number of targeted VMs. If
+       * multiple regions (or zones within a region) have the same number of
+       * targeted VMs, a tie-breaker is achieved by sorting the regions or zones
+       * in alphabetical order.
+       * 
+ * + * ZONE_BY_ZONE = 1; + */ + ZONE_BY_ZONE(1), + /** + * + * + *
+       * Patches are applied to VMs in all zones at the same time.
+       * 
+ * + * CONCURRENT_ZONES = 2; + */ + CONCURRENT_ZONES(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Mode must be specified.
+       * 
+ * + * MODE_UNSPECIFIED = 0; + */ + public static final int MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Patches are applied one zone at a time. The patch job begins in the
+       * region with the lowest number of targeted VMs. Within the region,
+       * patching begins in the zone with the lowest number of targeted VMs. If
+       * multiple regions (or zones within a region) have the same number of
+       * targeted VMs, a tie-breaker is achieved by sorting the regions or zones
+       * in alphabetical order.
+       * 
+ * + * ZONE_BY_ZONE = 1; + */ + public static final int ZONE_BY_ZONE_VALUE = 1; + /** + * + * + *
+       * Patches are applied to VMs in all zones at the same time.
+       * 
+ * + * CONCURRENT_ZONES = 2; + */ + public static final int CONCURRENT_ZONES_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Mode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Mode forNumber(int value) { + switch (value) { + case 0: + return MODE_UNSPECIFIED; + case 1: + return ZONE_BY_ZONE; + case 2: + return CONCURRENT_ZONES; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Mode findValueByNumber(int number) { + return Mode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Mode[] VALUES = values(); + + public static Mode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Mode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1beta.PatchRollout.Mode) + } + + public static final int MODE_FIELD_NUMBER = 1; + private int mode_; + /** + * + * + *
+     * Mode of the patch rollout.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout.Mode mode = 1; + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+     * Mode of the patch rollout.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout.Mode mode = 1; + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Mode getMode() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Mode result = + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Mode.valueOf(mode_); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Mode.UNRECOGNIZED + : result; + } + + public static final int DISRUPTION_BUDGET_FIELD_NUMBER = 2; + private com.google.cloud.osconfig.v1beta.Common.FixedOrPercent disruptionBudget_; + /** + * + * + *
+     * The maximum number (or percentage) of VMs per zone to disrupt at any given
+     * moment. The number of VMs calculated from multiplying the percentage by the
+     * total number of VMs in a zone is rounded up.
+     * During patching, a VM is considered disrupted from the time the agent is
+     * notified to begin until patching has completed. This disruption time
+     * includes the time to complete reboot and any post-patch steps.
+     * A VM contributes to the disruption budget if its patching operation fails
+     * either when applying the patches, running pre or post patch steps, or if it
+     * fails to respond with a success notification before timing out. VMs that
+     * are not running or do not have an active agent do not count toward this
+     * disruption budget.
+     * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+     * the patch job stops, because continuing to the next zone requires
+     * completion of the patch process in the previous zone.
+     * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+     * fail to patch in the current zone, the patch job continues to patch 2 VMs
+     * at a time until the zone is completed. When that zone is completed
+     * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+     * VMs in the next zone fail to patch, the patch job stops.
+     * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + * + * @return Whether the disruptionBudget field is set. + */ + @java.lang.Override + public boolean hasDisruptionBudget() { + return disruptionBudget_ != null; + } + /** + * + * + *
+     * The maximum number (or percentage) of VMs per zone to disrupt at any given
+     * moment. The number of VMs calculated from multiplying the percentage by the
+     * total number of VMs in a zone is rounded up.
+     * During patching, a VM is considered disrupted from the time the agent is
+     * notified to begin until patching has completed. This disruption time
+     * includes the time to complete reboot and any post-patch steps.
+     * A VM contributes to the disruption budget if its patching operation fails
+     * either when applying the patches, running pre or post patch steps, or if it
+     * fails to respond with a success notification before timing out. VMs that
+     * are not running or do not have an active agent do not count toward this
+     * disruption budget.
+     * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+     * the patch job stops, because continuing to the next zone requires
+     * completion of the patch process in the previous zone.
+     * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+     * fail to patch in the current zone, the patch job continues to patch 2 VMs
+     * at a time until the zone is completed. When that zone is completed
+     * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+     * VMs in the next zone fail to patch, the patch job stops.
+     * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + * + * @return The disruptionBudget. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.Common.FixedOrPercent getDisruptionBudget() { + return disruptionBudget_ == null + ? com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.getDefaultInstance() + : disruptionBudget_; + } + /** + * + * + *
+     * The maximum number (or percentage) of VMs per zone to disrupt at any given
+     * moment. The number of VMs calculated from multiplying the percentage by the
+     * total number of VMs in a zone is rounded up.
+     * During patching, a VM is considered disrupted from the time the agent is
+     * notified to begin until patching has completed. This disruption time
+     * includes the time to complete reboot and any post-patch steps.
+     * A VM contributes to the disruption budget if its patching operation fails
+     * either when applying the patches, running pre or post patch steps, or if it
+     * fails to respond with a success notification before timing out. VMs that
+     * are not running or do not have an active agent do not count toward this
+     * disruption budget.
+     * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+     * the patch job stops, because continuing to the next zone requires
+     * completion of the patch process in the previous zone.
+     * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+     * fail to patch in the current zone, the patch job continues to patch 2 VMs
+     * at a time until the zone is completed. When that zone is completed
+     * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+     * VMs in the next zone fail to patch, the patch job stops.
+     * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.Common.FixedOrPercentOrBuilder + getDisruptionBudgetOrBuilder() { + return getDisruptionBudget(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (mode_ + != com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Mode.MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, mode_); + } + if (disruptionBudget_ != null) { + output.writeMessage(2, getDisruptionBudget()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mode_ + != com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Mode.MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); + } + if (disruptionBudget_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDisruptionBudget()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout other = + (com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout) obj; + + if (mode_ != other.mode_) return false; + if (hasDisruptionBudget() != other.hasDisruptionBudget()) return false; + if (hasDisruptionBudget()) { + if (!getDisruptionBudget().equals(other.getDisruptionBudget())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + if (hasDisruptionBudget()) { + hash = (37 * hash) + DISRUPTION_BUDGET_FIELD_NUMBER; + hash = (53 * hash) + getDisruptionBudget().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Patch rollout configuration specifications. Contains details on the
+     * concurrency control when applying patch(es) to all targeted VMs.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.PatchRollout} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.PatchRollout) + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRolloutOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchRollout_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchRollout_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.class, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + mode_ = 0; + + if (disruptionBudgetBuilder_ == null) { + disruptionBudget_ = null; + } else { + disruptionBudget_ = null; + disruptionBudgetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchRollout_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout build() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout result = + new com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout(this); + result.mode_ = mode_; + if (disruptionBudgetBuilder_ == null) { + result.disruptionBudget_ = disruptionBudget_; + } else { + result.disruptionBudget_ = disruptionBudgetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout other) { + if (other == com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.getDefaultInstance()) + return this; + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + if (other.hasDisruptionBudget()) { + mergeDisruptionBudget(other.getDisruptionBudget()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int mode_ = 0; + /** + * + * + *
+       * Mode of the patch rollout.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout.Mode mode = 1; + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+       * Mode of the patch rollout.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout.Mode mode = 1; + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + + mode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Mode of the patch rollout.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout.Mode mode = 1; + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Mode getMode() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Mode result = + com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Mode.valueOf(mode_); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Mode.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Mode of the patch rollout.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout.Mode mode = 1; + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout.Mode value) { + if (value == null) { + throw new NullPointerException(); + } + + mode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Mode of the patch rollout.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchRollout.Mode mode = 1; + * + * @return This builder for chaining. + */ + public Builder clearMode() { + + mode_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1beta.Common.FixedOrPercent disruptionBudget_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent, + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.Builder, + com.google.cloud.osconfig.v1beta.Common.FixedOrPercentOrBuilder> + disruptionBudgetBuilder_; + /** + * + * + *
+       * The maximum number (or percentage) of VMs per zone to disrupt at any given
+       * moment. The number of VMs calculated from multiplying the percentage by the
+       * total number of VMs in a zone is rounded up.
+       * During patching, a VM is considered disrupted from the time the agent is
+       * notified to begin until patching has completed. This disruption time
+       * includes the time to complete reboot and any post-patch steps.
+       * A VM contributes to the disruption budget if its patching operation fails
+       * either when applying the patches, running pre or post patch steps, or if it
+       * fails to respond with a success notification before timing out. VMs that
+       * are not running or do not have an active agent do not count toward this
+       * disruption budget.
+       * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+       * the patch job stops, because continuing to the next zone requires
+       * completion of the patch process in the previous zone.
+       * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+       * fail to patch in the current zone, the patch job continues to patch 2 VMs
+       * at a time until the zone is completed. When that zone is completed
+       * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+       * VMs in the next zone fail to patch, the patch job stops.
+       * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + * + * @return Whether the disruptionBudget field is set. + */ + public boolean hasDisruptionBudget() { + return disruptionBudgetBuilder_ != null || disruptionBudget_ != null; + } + /** + * + * + *
+       * The maximum number (or percentage) of VMs per zone to disrupt at any given
+       * moment. The number of VMs calculated from multiplying the percentage by the
+       * total number of VMs in a zone is rounded up.
+       * During patching, a VM is considered disrupted from the time the agent is
+       * notified to begin until patching has completed. This disruption time
+       * includes the time to complete reboot and any post-patch steps.
+       * A VM contributes to the disruption budget if its patching operation fails
+       * either when applying the patches, running pre or post patch steps, or if it
+       * fails to respond with a success notification before timing out. VMs that
+       * are not running or do not have an active agent do not count toward this
+       * disruption budget.
+       * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+       * the patch job stops, because continuing to the next zone requires
+       * completion of the patch process in the previous zone.
+       * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+       * fail to patch in the current zone, the patch job continues to patch 2 VMs
+       * at a time until the zone is completed. When that zone is completed
+       * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+       * VMs in the next zone fail to patch, the patch job stops.
+       * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + * + * @return The disruptionBudget. + */ + public com.google.cloud.osconfig.v1beta.Common.FixedOrPercent getDisruptionBudget() { + if (disruptionBudgetBuilder_ == null) { + return disruptionBudget_ == null + ? com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.getDefaultInstance() + : disruptionBudget_; + } else { + return disruptionBudgetBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The maximum number (or percentage) of VMs per zone to disrupt at any given
+       * moment. The number of VMs calculated from multiplying the percentage by the
+       * total number of VMs in a zone is rounded up.
+       * During patching, a VM is considered disrupted from the time the agent is
+       * notified to begin until patching has completed. This disruption time
+       * includes the time to complete reboot and any post-patch steps.
+       * A VM contributes to the disruption budget if its patching operation fails
+       * either when applying the patches, running pre or post patch steps, or if it
+       * fails to respond with a success notification before timing out. VMs that
+       * are not running or do not have an active agent do not count toward this
+       * disruption budget.
+       * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+       * the patch job stops, because continuing to the next zone requires
+       * completion of the patch process in the previous zone.
+       * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+       * fail to patch in the current zone, the patch job continues to patch 2 VMs
+       * at a time until the zone is completed. When that zone is completed
+       * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+       * VMs in the next zone fail to patch, the patch job stops.
+       * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + */ + public Builder setDisruptionBudget( + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent value) { + if (disruptionBudgetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + disruptionBudget_ = value; + onChanged(); + } else { + disruptionBudgetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The maximum number (or percentage) of VMs per zone to disrupt at any given
+       * moment. The number of VMs calculated from multiplying the percentage by the
+       * total number of VMs in a zone is rounded up.
+       * During patching, a VM is considered disrupted from the time the agent is
+       * notified to begin until patching has completed. This disruption time
+       * includes the time to complete reboot and any post-patch steps.
+       * A VM contributes to the disruption budget if its patching operation fails
+       * either when applying the patches, running pre or post patch steps, or if it
+       * fails to respond with a success notification before timing out. VMs that
+       * are not running or do not have an active agent do not count toward this
+       * disruption budget.
+       * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+       * the patch job stops, because continuing to the next zone requires
+       * completion of the patch process in the previous zone.
+       * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+       * fail to patch in the current zone, the patch job continues to patch 2 VMs
+       * at a time until the zone is completed. When that zone is completed
+       * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+       * VMs in the next zone fail to patch, the patch job stops.
+       * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + */ + public Builder setDisruptionBudget( + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.Builder builderForValue) { + if (disruptionBudgetBuilder_ == null) { + disruptionBudget_ = builderForValue.build(); + onChanged(); + } else { + disruptionBudgetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The maximum number (or percentage) of VMs per zone to disrupt at any given
+       * moment. The number of VMs calculated from multiplying the percentage by the
+       * total number of VMs in a zone is rounded up.
+       * During patching, a VM is considered disrupted from the time the agent is
+       * notified to begin until patching has completed. This disruption time
+       * includes the time to complete reboot and any post-patch steps.
+       * A VM contributes to the disruption budget if its patching operation fails
+       * either when applying the patches, running pre or post patch steps, or if it
+       * fails to respond with a success notification before timing out. VMs that
+       * are not running or do not have an active agent do not count toward this
+       * disruption budget.
+       * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+       * the patch job stops, because continuing to the next zone requires
+       * completion of the patch process in the previous zone.
+       * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+       * fail to patch in the current zone, the patch job continues to patch 2 VMs
+       * at a time until the zone is completed. When that zone is completed
+       * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+       * VMs in the next zone fail to patch, the patch job stops.
+       * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + */ + public Builder mergeDisruptionBudget( + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent value) { + if (disruptionBudgetBuilder_ == null) { + if (disruptionBudget_ != null) { + disruptionBudget_ = + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.newBuilder(disruptionBudget_) + .mergeFrom(value) + .buildPartial(); + } else { + disruptionBudget_ = value; + } + onChanged(); + } else { + disruptionBudgetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The maximum number (or percentage) of VMs per zone to disrupt at any given
+       * moment. The number of VMs calculated from multiplying the percentage by the
+       * total number of VMs in a zone is rounded up.
+       * During patching, a VM is considered disrupted from the time the agent is
+       * notified to begin until patching has completed. This disruption time
+       * includes the time to complete reboot and any post-patch steps.
+       * A VM contributes to the disruption budget if its patching operation fails
+       * either when applying the patches, running pre or post patch steps, or if it
+       * fails to respond with a success notification before timing out. VMs that
+       * are not running or do not have an active agent do not count toward this
+       * disruption budget.
+       * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+       * the patch job stops, because continuing to the next zone requires
+       * completion of the patch process in the previous zone.
+       * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+       * fail to patch in the current zone, the patch job continues to patch 2 VMs
+       * at a time until the zone is completed. When that zone is completed
+       * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+       * VMs in the next zone fail to patch, the patch job stops.
+       * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + */ + public Builder clearDisruptionBudget() { + if (disruptionBudgetBuilder_ == null) { + disruptionBudget_ = null; + onChanged(); + } else { + disruptionBudget_ = null; + disruptionBudgetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The maximum number (or percentage) of VMs per zone to disrupt at any given
+       * moment. The number of VMs calculated from multiplying the percentage by the
+       * total number of VMs in a zone is rounded up.
+       * During patching, a VM is considered disrupted from the time the agent is
+       * notified to begin until patching has completed. This disruption time
+       * includes the time to complete reboot and any post-patch steps.
+       * A VM contributes to the disruption budget if its patching operation fails
+       * either when applying the patches, running pre or post patch steps, or if it
+       * fails to respond with a success notification before timing out. VMs that
+       * are not running or do not have an active agent do not count toward this
+       * disruption budget.
+       * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+       * the patch job stops, because continuing to the next zone requires
+       * completion of the patch process in the previous zone.
+       * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+       * fail to patch in the current zone, the patch job continues to patch 2 VMs
+       * at a time until the zone is completed. When that zone is completed
+       * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+       * VMs in the next zone fail to patch, the patch job stops.
+       * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + */ + public com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.Builder + getDisruptionBudgetBuilder() { + + onChanged(); + return getDisruptionBudgetFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The maximum number (or percentage) of VMs per zone to disrupt at any given
+       * moment. The number of VMs calculated from multiplying the percentage by the
+       * total number of VMs in a zone is rounded up.
+       * During patching, a VM is considered disrupted from the time the agent is
+       * notified to begin until patching has completed. This disruption time
+       * includes the time to complete reboot and any post-patch steps.
+       * A VM contributes to the disruption budget if its patching operation fails
+       * either when applying the patches, running pre or post patch steps, or if it
+       * fails to respond with a success notification before timing out. VMs that
+       * are not running or do not have an active agent do not count toward this
+       * disruption budget.
+       * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+       * the patch job stops, because continuing to the next zone requires
+       * completion of the patch process in the previous zone.
+       * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+       * fail to patch in the current zone, the patch job continues to patch 2 VMs
+       * at a time until the zone is completed. When that zone is completed
+       * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+       * VMs in the next zone fail to patch, the patch job stops.
+       * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + */ + public com.google.cloud.osconfig.v1beta.Common.FixedOrPercentOrBuilder + getDisruptionBudgetOrBuilder() { + if (disruptionBudgetBuilder_ != null) { + return disruptionBudgetBuilder_.getMessageOrBuilder(); + } else { + return disruptionBudget_ == null + ? com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.getDefaultInstance() + : disruptionBudget_; + } + } + /** + * + * + *
+       * The maximum number (or percentage) of VMs per zone to disrupt at any given
+       * moment. The number of VMs calculated from multiplying the percentage by the
+       * total number of VMs in a zone is rounded up.
+       * During patching, a VM is considered disrupted from the time the agent is
+       * notified to begin until patching has completed. This disruption time
+       * includes the time to complete reboot and any post-patch steps.
+       * A VM contributes to the disruption budget if its patching operation fails
+       * either when applying the patches, running pre or post patch steps, or if it
+       * fails to respond with a success notification before timing out. VMs that
+       * are not running or do not have an active agent do not count toward this
+       * disruption budget.
+       * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
+       * the patch job stops, because continuing to the next zone requires
+       * completion of the patch process in the previous zone.
+       * For example, if the disruption budget has a fixed value of `10`, and 8 VMs
+       * fail to patch in the current zone, the patch job continues to patch 2 VMs
+       * at a time until the zone is completed. When that zone is completed
+       * successfully, patching begins with 10 VMs at a time in the next zone. If 10
+       * VMs in the next zone fail to patch, the patch job stops.
+       * 
+ * + * .google.cloud.osconfig.v1beta.FixedOrPercent disruption_budget = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent, + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.Builder, + com.google.cloud.osconfig.v1beta.Common.FixedOrPercentOrBuilder> + getDisruptionBudgetFieldBuilder() { + if (disruptionBudgetBuilder_ == null) { + disruptionBudgetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent, + com.google.cloud.osconfig.v1beta.Common.FixedOrPercent.Builder, + com.google.cloud.osconfig.v1beta.Common.FixedOrPercentOrBuilder>( + getDisruptionBudget(), getParentForChildren(), isClean()); + disruptionBudget_ = null; + } + return disruptionBudgetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1beta.PatchRollout) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.PatchRollout) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout(); + } + + public static com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PatchRollout parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PatchRollout(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchRollout getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_osconfig_v1beta_ExecutePatchJobRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -34707,6 +36832,10 @@ public com.google.protobuf.Parser getParserForType() { internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_LabelsEntry_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_LabelsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_PatchRollout_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_PatchRollout_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -34717,146 +36846,161 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n-google/cloud/osconfig/v1beta/patch_job" - + "s.proto\022\034google.cloud.osconfig.v1beta\032\037g" - + "oogle/api/field_behavior.proto\032\031google/a" - + "pi/resource.proto\032\036google/protobuf/durat" - + "ion.proto\032\037google/protobuf/timestamp.pro" - + "to\"\250\002\n\026ExecutePatchJobRequest\022\023\n\006parent\030" - + "\001 \001(\tB\003\340A\002\022\023\n\013description\030\002 \001(\t\022O\n\017insta" - + "nce_filter\030\007 \001(\01321.google.cloud.osconfig" - + ".v1beta.PatchInstanceFilterB\003\340A\002\022?\n\014patc" - + "h_config\030\004 \001(\0132).google.cloud.osconfig.v" - + "1beta.PatchConfig\022+\n\010duration\030\005 \001(\0132\031.go" - + "ogle.protobuf.Duration\022\017\n\007dry_run\030\006 \001(\010\022" - + "\024\n\014display_name\030\010 \001(\t\"\'\n\022GetPatchJobRequ" - + "est\022\021\n\004name\030\001 \001(\tB\003\340A\002\"p\n\"ListPatchJobIn" - + "stanceDetailsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A" - + "\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" - + "\022\016\n\006filter\030\004 \001(\t\"\231\001\n#ListPatchJobInstanc" - + "eDetailsResponse\022Y\n\032patch_job_instance_d" - + "etails\030\001 \003(\01325.google.cloud.osconfig.v1b" - + "eta.PatchJobInstanceDetails\022\027\n\017next_page" - + "_token\030\002 \001(\t\"\264\001\n\027PatchJobInstanceDetails" - + "\022\014\n\004name\030\001 \001(\t\022\032\n\022instance_system_id\030\002 \001" - + "(\t\022@\n\005state\030\003 \001(\01621.google.cloud.osconfi" - + "g.v1beta.Instance.PatchState\022\026\n\016failure_" - + "reason\030\004 \001(\t\022\025\n\rattempt_count\030\005 \001(\003\"b\n\024L" - + "istPatchJobsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002" - + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022" - + "\016\n\006filter\030\004 \001(\t\"l\n\025ListPatchJobsResponse" - + "\022:\n\npatch_jobs\030\001 \003(\0132&.google.cloud.osco" - + "nfig.v1beta.PatchJob\022\027\n\017next_page_token\030" - + "\002 \001(\t\"\266\n\n\010PatchJob\022\014\n\004name\030\001 \001(\t\022\024\n\014disp" - + "lay_name\030\016 \001(\t\022\023\n\013description\030\002 \001(\t\022/\n\013c" - + "reate_time\030\003 \001(\0132\032.google.protobuf.Times" - + "tamp\022/\n\013update_time\030\004 \001(\0132\032.google.proto" - + "buf.Timestamp\022;\n\005state\030\005 \001(\0162,.google.cl" - + "oud.osconfig.v1beta.PatchJob.State\022J\n\017in" - + "stance_filter\030\r \001(\01321.google.cloud.oscon" - + "fig.v1beta.PatchInstanceFilter\022?\n\014patch_" - + "config\030\007 \001(\0132).google.cloud.osconfig.v1b" - + "eta.PatchConfig\022+\n\010duration\030\010 \001(\0132\031.goog" - + "le.protobuf.Duration\022_\n\030instance_details" - + "_summary\030\t \001(\0132=.google.cloud.osconfig.v" - + "1beta.PatchJob.InstanceDetailsSummary\022\017\n" - + "\007dry_run\030\n \001(\010\022\025\n\rerror_message\030\013 \001(\t\022\030\n" - + "\020percent_complete\030\014 \001(\001\022\035\n\020patch_deploym" - + "ent\030\017 \001(\tB\003\340A\003\032\275\004\n\026InstanceDetailsSummar" - + "y\022\036\n\026pending_instance_count\030\001 \001(\003\022\037\n\027ina" - + "ctive_instance_count\030\002 \001(\003\022\037\n\027notified_i" - + "nstance_count\030\003 \001(\003\022\036\n\026started_instance_" - + "count\030\004 \001(\003\022*\n\"downloading_patches_insta" - + "nce_count\030\005 \001(\003\022\'\n\037applying_patches_inst" - + "ance_count\030\006 \001(\003\022 \n\030rebooting_instance_c" - + "ount\030\007 \001(\003\022 \n\030succeeded_instance_count\030\010" - + " \001(\003\0220\n(succeeded_reboot_required_instan" - + "ce_count\030\t \001(\003\022\035\n\025failed_instance_count\030" - + "\n \001(\003\022\034\n\024acked_instance_count\030\013 \001(\003\022 \n\030t" - + "imed_out_instance_count\030\014 \001(\003\022%\n\035pre_pat" - + "ch_step_instance_count\030\r \001(\003\022&\n\036post_pat" - + "ch_step_instance_count\030\016 \001(\003\022(\n no_agent" - + "_detected_instance_count\030\017 \001(\003\"\225\001\n\005State" - + "\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007STARTED\020\001\022\023\n\017" - + "INSTANCE_LOOKUP\020\002\022\014\n\010PATCHING\020\003\022\r\n\tSUCCE" - + "EDED\020\004\022\031\n\025COMPLETED_WITH_ERRORS\020\005\022\014\n\010CAN" - + "CELED\020\006\022\r\n\tTIMED_OUT\020\007\"\327\004\n\013PatchConfig\022M" - + "\n\rreboot_config\030\001 \001(\01626.google.cloud.osc" - + "onfig.v1beta.PatchConfig.RebootConfig\0226\n" - + "\003apt\030\003 \001(\0132).google.cloud.osconfig.v1bet" - + "a.AptSettings\0226\n\003yum\030\004 \001(\0132).google.clou" - + "d.osconfig.v1beta.YumSettings\0226\n\003goo\030\005 \001" - + "(\0132).google.cloud.osconfig.v1beta.GooSet" - + "tings\022<\n\006zypper\030\006 \001(\0132,.google.cloud.osc" - + "onfig.v1beta.ZypperSettings\022K\n\016windows_u" - + "pdate\030\007 \001(\01323.google.cloud.osconfig.v1be" - + "ta.WindowsUpdateSettings\0228\n\010pre_step\030\010 \001" - + "(\0132&.google.cloud.osconfig.v1beta.ExecSt" - + "ep\0229\n\tpost_step\030\t \001(\0132&.google.cloud.osc" - + "onfig.v1beta.ExecStep\"Q\n\014RebootConfig\022\035\n" - + "\031REBOOT_CONFIG_UNSPECIFIED\020\000\022\013\n\007DEFAULT\020" - + "\001\022\n\n\006ALWAYS\020\002\022\t\n\005NEVER\020\003\"\316\002\n\010Instance\"\301\002" - + "\n\nPatchState\022\033\n\027PATCH_STATE_UNSPECIFIED\020" - + "\000\022\013\n\007PENDING\020\001\022\014\n\010INACTIVE\020\002\022\014\n\010NOTIFIED" - + "\020\003\022\013\n\007STARTED\020\004\022\027\n\023DOWNLOADING_PATCHES\020\005" - + "\022\024\n\020APPLYING_PATCHES\020\006\022\r\n\tREBOOTING\020\007\022\r\n" - + "\tSUCCEEDED\020\010\022\035\n\031SUCCEEDED_REBOOT_REQUIRE" - + "D\020\t\022\n\n\006FAILED\020\n\022\t\n\005ACKED\020\013\022\r\n\tTIMED_OUT\020" - + "\014\022\032\n\026RUNNING_PRE_PATCH_STEP\020\r\022\033\n\027RUNNING" - + "_POST_PATCH_STEP\020\016\022\025\n\021NO_AGENT_DETECTED\020" - + "\017\"*\n\025CancelPatchJobRequest\022\021\n\004name\030\001 \001(\t" - + "B\003\340A\002\"\256\001\n\013AptSettings\022<\n\004type\030\001 \001(\0162..go" - + "ogle.cloud.osconfig.v1beta.AptSettings.T" - + "ype\022\020\n\010excludes\030\002 \003(\t\022\032\n\022exclusive_packa" - + "ges\030\003 \003(\t\"3\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022" - + "\010\n\004DIST\020\001\022\013\n\007UPGRADE\020\002\"^\n\013YumSettings\022\020\n" - + "\010security\030\001 \001(\010\022\017\n\007minimal\030\002 \001(\010\022\020\n\010excl" - + "udes\030\003 \003(\t\022\032\n\022exclusive_packages\030\004 \003(\t\"\r" - + "\n\013GooSettings\"\221\001\n\016ZypperSettings\022\025\n\rwith" - + "_optional\030\001 \001(\010\022\023\n\013with_update\030\002 \001(\010\022\022\n\n" - + "categories\030\003 \003(\t\022\022\n\nseverities\030\004 \003(\t\022\020\n\010" - + "excludes\030\005 \003(\t\022\031\n\021exclusive_patches\030\006 \003(" - + "\t\"\331\002\n\025WindowsUpdateSettings\022[\n\017classific" - + "ations\030\001 \003(\0162B.google.cloud.osconfig.v1b" - + "eta.WindowsUpdateSettings.Classification" - + "\022\020\n\010excludes\030\002 \003(\t\022\031\n\021exclusive_patches\030" - + "\003 \003(\t\"\265\001\n\016Classification\022\036\n\032CLASSIFICATI" - + "ON_UNSPECIFIED\020\000\022\014\n\010CRITICAL\020\001\022\014\n\010SECURI" - + "TY\020\002\022\016\n\nDEFINITION\020\003\022\n\n\006DRIVER\020\004\022\020\n\014FEAT" - + "URE_PACK\020\005\022\020\n\014SERVICE_PACK\020\006\022\010\n\004TOOL\020\007\022\021" - + "\n\rUPDATE_ROLLUP\020\010\022\n\n\006UPDATE\020\t\"\250\001\n\010ExecSt" - + "ep\022L\n\026linux_exec_step_config\030\001 \001(\0132,.goo" - + "gle.cloud.osconfig.v1beta.ExecStepConfig" - + "\022N\n\030windows_exec_step_config\030\002 \001(\0132,.goo" - + "gle.cloud.osconfig.v1beta.ExecStepConfig" - + "\"\250\002\n\016ExecStepConfig\022\024\n\nlocal_path\030\001 \001(\tH" - + "\000\022=\n\ngcs_object\030\002 \001(\0132\'.google.cloud.osc" - + "onfig.v1beta.GcsObjectH\000\022\035\n\025allowed_succ" - + "ess_codes\030\003 \003(\005\022M\n\013interpreter\030\004 \001(\01628.g" - + "oogle.cloud.osconfig.v1beta.ExecStepConf" - + "ig.Interpreter\"E\n\013Interpreter\022\033\n\027INTERPR" - + "ETER_UNSPECIFIED\020\000\022\t\n\005SHELL\020\001\022\016\n\nPOWERSH" - + "ELL\020\002B\014\n\nexecutable\"U\n\tGcsObject\022\023\n\006buck" - + "et\030\001 \001(\tB\003\340A\002\022\023\n\006object\030\002 \001(\tB\003\340A\002\022\036\n\021ge" - + "neration_number\030\003 \001(\003B\003\340A\002\"\320\002\n\023PatchInst" - + "anceFilter\022\013\n\003all\030\001 \001(\010\022R\n\014group_labels\030" - + "\002 \003(\0132<.google.cloud.osconfig.v1beta.Pat" - + "chInstanceFilter.GroupLabel\022\r\n\005zones\030\003 \003" - + "(\t\022\021\n\tinstances\030\004 \003(\t\022\036\n\026instance_name_p" - + "refixes\030\005 \003(\t\032\225\001\n\nGroupLabel\022X\n\006labels\030\001" - + " \003(\0132H.google.cloud.osconfig.v1beta.Patc" - + "hInstanceFilter.GroupLabel.LabelsEntry\032-" - + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\001Bs\n com.google.cloud.osconfig.v1bet" - + "aB\tPatchJobsZDgoogle.golang.org/genproto" - + "/googleapis/cloud/osconfig/v1beta;osconf" - + "igb\006proto3" + + "s.proto\022\034google.cloud.osconfig.v1beta\032\034g" + + "oogle/api/annotations.proto\032\037google/api/" + + "field_behavior.proto\032\031google/api/resourc" + + "e.proto\0322google/cloud/osconfig/v1beta/os" + + "config_common.proto\032\036google/protobuf/dur" + + "ation.proto\032\037google/protobuf/timestamp.p" + + "roto\"\345\002\n\026ExecutePatchJobRequest\022\023\n\006paren" + + "t\030\001 \001(\tB\003\340A\002\022\023\n\013description\030\002 \001(\t\022O\n\017ins" + + "tance_filter\030\007 \001(\01321.google.cloud.osconf" + + "ig.v1beta.PatchInstanceFilterB\003\340A\002\022?\n\014pa" + + "tch_config\030\004 \001(\0132).google.cloud.osconfig" + + ".v1beta.PatchConfig\022+\n\010duration\030\005 \001(\0132\031." + + "google.protobuf.Duration\022\017\n\007dry_run\030\006 \001(" + + "\010\022\024\n\014display_name\030\010 \001(\t\022;\n\007rollout\030\t \001(\013" + + "2*.google.cloud.osconfig.v1beta.PatchRol" + + "lout\"\'\n\022GetPatchJobRequest\022\021\n\004name\030\001 \001(\t" + + "B\003\340A\002\"p\n\"ListPatchJobInstanceDetailsRequ" + + "est\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030\002 " + + "\001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"" + + "\231\001\n#ListPatchJobInstanceDetailsResponse\022" + + "Y\n\032patch_job_instance_details\030\001 \003(\01325.go" + + "ogle.cloud.osconfig.v1beta.PatchJobInsta" + + "nceDetails\022\027\n\017next_page_token\030\002 \001(\t\"\264\001\n\027" + + "PatchJobInstanceDetails\022\014\n\004name\030\001 \001(\t\022\032\n" + + "\022instance_system_id\030\002 \001(\t\022@\n\005state\030\003 \001(\016" + + "21.google.cloud.osconfig.v1beta.Instance" + + ".PatchState\022\026\n\016failure_reason\030\004 \001(\t\022\025\n\ra" + + "ttempt_count\030\005 \001(\003\"b\n\024ListPatchJobsReque" + + "st\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030\002 \001" + + "(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"l" + + "\n\025ListPatchJobsResponse\022:\n\npatch_jobs\030\001 " + + "\003(\0132&.google.cloud.osconfig.v1beta.Patch" + + "Job\022\027\n\017next_page_token\030\002 \001(\t\"\304\013\n\010PatchJo" + + "b\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\016 \001(\t\022\023\n" + + "\013description\030\002 \001(\t\022/\n\013create_time\030\003 \001(\0132" + + "\032.google.protobuf.Timestamp\022/\n\013update_ti" + + "me\030\004 \001(\0132\032.google.protobuf.Timestamp\022;\n\005" + + "state\030\005 \001(\0162,.google.cloud.osconfig.v1be" + + "ta.PatchJob.State\022J\n\017instance_filter\030\r \001" + + "(\01321.google.cloud.osconfig.v1beta.PatchI" + + "nstanceFilter\022?\n\014patch_config\030\007 \001(\0132).go" + + "ogle.cloud.osconfig.v1beta.PatchConfig\022+" + + "\n\010duration\030\010 \001(\0132\031.google.protobuf.Durat" + + "ion\022_\n\030instance_details_summary\030\t \001(\0132=." + + "google.cloud.osconfig.v1beta.PatchJob.In" + + "stanceDetailsSummary\022\017\n\007dry_run\030\n \001(\010\022\025\n" + + "\rerror_message\030\013 \001(\t\022\030\n\020percent_complete" + + "\030\014 \001(\001\022\035\n\020patch_deployment\030\017 \001(\tB\003\340A\003\022;\n" + + "\007rollout\030\020 \001(\0132*.google.cloud.osconfig.v" + + "1beta.PatchRollout\032\275\004\n\026InstanceDetailsSu" + + "mmary\022\036\n\026pending_instance_count\030\001 \001(\003\022\037\n" + + "\027inactive_instance_count\030\002 \001(\003\022\037\n\027notifi" + + "ed_instance_count\030\003 \001(\003\022\036\n\026started_insta" + + "nce_count\030\004 \001(\003\022*\n\"downloading_patches_i" + + "nstance_count\030\005 \001(\003\022\'\n\037applying_patches_" + + "instance_count\030\006 \001(\003\022 \n\030rebooting_instan" + + "ce_count\030\007 \001(\003\022 \n\030succeeded_instance_cou" + + "nt\030\010 \001(\003\0220\n(succeeded_reboot_required_in" + + "stance_count\030\t \001(\003\022\035\n\025failed_instance_co" + + "unt\030\n \001(\003\022\034\n\024acked_instance_count\030\013 \001(\003\022" + + " \n\030timed_out_instance_count\030\014 \001(\003\022%\n\035pre" + + "_patch_step_instance_count\030\r \001(\003\022&\n\036post" + + "_patch_step_instance_count\030\016 \001(\003\022(\n no_a" + + "gent_detected_instance_count\030\017 \001(\003\"\225\001\n\005S" + + "tate\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007STARTED\020\001" + + "\022\023\n\017INSTANCE_LOOKUP\020\002\022\014\n\010PATCHING\020\003\022\r\n\tS" + + "UCCEEDED\020\004\022\031\n\025COMPLETED_WITH_ERRORS\020\005\022\014\n" + + "\010CANCELED\020\006\022\r\n\tTIMED_OUT\020\007:O\352AL\n osconfi" + + "g.googleapis.com/PatchJob\022(projects/{pro" + + "ject}/patchJobs/{patch_job}\"\366\004\n\013PatchCon" + + "fig\022M\n\rreboot_config\030\001 \001(\01626.google.clou" + + "d.osconfig.v1beta.PatchConfig.RebootConf" + + "ig\0226\n\003apt\030\003 \001(\0132).google.cloud.osconfig." + + "v1beta.AptSettings\0226\n\003yum\030\004 \001(\0132).google" + + ".cloud.osconfig.v1beta.YumSettings\0226\n\003go" + + "o\030\005 \001(\0132).google.cloud.osconfig.v1beta.G" + + "ooSettings\022<\n\006zypper\030\006 \001(\0132,.google.clou" + + "d.osconfig.v1beta.ZypperSettings\022K\n\016wind" + + "ows_update\030\007 \001(\01323.google.cloud.osconfig" + + ".v1beta.WindowsUpdateSettings\0228\n\010pre_ste" + + "p\030\010 \001(\0132&.google.cloud.osconfig.v1beta.E" + + "xecStep\0229\n\tpost_step\030\t \001(\0132&.google.clou" + + "d.osconfig.v1beta.ExecStep\022\035\n\025mig_instan" + + "ces_allowed\030\n \001(\010\"Q\n\014RebootConfig\022\035\n\031REB" + + "OOT_CONFIG_UNSPECIFIED\020\000\022\013\n\007DEFAULT\020\001\022\n\n" + + "\006ALWAYS\020\002\022\t\n\005NEVER\020\003\"\316\002\n\010Instance\"\301\002\n\nPa" + + "tchState\022\033\n\027PATCH_STATE_UNSPECIFIED\020\000\022\013\n" + + "\007PENDING\020\001\022\014\n\010INACTIVE\020\002\022\014\n\010NOTIFIED\020\003\022\013" + + "\n\007STARTED\020\004\022\027\n\023DOWNLOADING_PATCHES\020\005\022\024\n\020" + + "APPLYING_PATCHES\020\006\022\r\n\tREBOOTING\020\007\022\r\n\tSUC" + + "CEEDED\020\010\022\035\n\031SUCCEEDED_REBOOT_REQUIRED\020\t\022" + + "\n\n\006FAILED\020\n\022\t\n\005ACKED\020\013\022\r\n\tTIMED_OUT\020\014\022\032\n" + + "\026RUNNING_PRE_PATCH_STEP\020\r\022\033\n\027RUNNING_POS" + + "T_PATCH_STEP\020\016\022\025\n\021NO_AGENT_DETECTED\020\017\"*\n" + + "\025CancelPatchJobRequest\022\021\n\004name\030\001 \001(\tB\003\340A" + + "\002\"\256\001\n\013AptSettings\022<\n\004type\030\001 \001(\0162..google" + + ".cloud.osconfig.v1beta.AptSettings.Type\022" + + "\020\n\010excludes\030\002 \003(\t\022\032\n\022exclusive_packages\030" + + "\003 \003(\t\"3\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\010\n\004D" + + "IST\020\001\022\013\n\007UPGRADE\020\002\"^\n\013YumSettings\022\020\n\010sec" + + "urity\030\001 \001(\010\022\017\n\007minimal\030\002 \001(\010\022\020\n\010excludes" + + "\030\003 \003(\t\022\032\n\022exclusive_packages\030\004 \003(\t\"\r\n\013Go" + + "oSettings\"\221\001\n\016ZypperSettings\022\025\n\rwith_opt" + + "ional\030\001 \001(\010\022\023\n\013with_update\030\002 \001(\010\022\022\n\ncate" + + "gories\030\003 \003(\t\022\022\n\nseverities\030\004 \003(\t\022\020\n\010excl" + + "udes\030\005 \003(\t\022\031\n\021exclusive_patches\030\006 \003(\t\"\331\002" + + "\n\025WindowsUpdateSettings\022[\n\017classificatio" + + "ns\030\001 \003(\0162B.google.cloud.osconfig.v1beta." + + "WindowsUpdateSettings.Classification\022\020\n\010" + + "excludes\030\002 \003(\t\022\031\n\021exclusive_patches\030\003 \003(" + + "\t\"\265\001\n\016Classification\022\036\n\032CLASSIFICATION_U" + + "NSPECIFIED\020\000\022\014\n\010CRITICAL\020\001\022\014\n\010SECURITY\020\002" + + "\022\016\n\nDEFINITION\020\003\022\n\n\006DRIVER\020\004\022\020\n\014FEATURE_" + + "PACK\020\005\022\020\n\014SERVICE_PACK\020\006\022\010\n\004TOOL\020\007\022\021\n\rUP" + + "DATE_ROLLUP\020\010\022\n\n\006UPDATE\020\t\"\250\001\n\010ExecStep\022L" + + "\n\026linux_exec_step_config\030\001 \001(\0132,.google." + + "cloud.osconfig.v1beta.ExecStepConfig\022N\n\030" + + "windows_exec_step_config\030\002 \001(\0132,.google." + + "cloud.osconfig.v1beta.ExecStepConfig\"\250\002\n" + + "\016ExecStepConfig\022\024\n\nlocal_path\030\001 \001(\tH\000\022=\n" + + "\ngcs_object\030\002 \001(\0132\'.google.cloud.osconfi" + + "g.v1beta.GcsObjectH\000\022\035\n\025allowed_success_" + + "codes\030\003 \003(\005\022M\n\013interpreter\030\004 \001(\01628.googl" + + "e.cloud.osconfig.v1beta.ExecStepConfig.I" + + "nterpreter\"E\n\013Interpreter\022\033\n\027INTERPRETER" + + "_UNSPECIFIED\020\000\022\t\n\005SHELL\020\001\022\016\n\nPOWERSHELL\020" + + "\002B\014\n\nexecutable\"U\n\tGcsObject\022\023\n\006bucket\030\001" + + " \001(\tB\003\340A\002\022\023\n\006object\030\002 \001(\tB\003\340A\002\022\036\n\021genera" + + "tion_number\030\003 \001(\003B\003\340A\002\"\320\002\n\023PatchInstance" + + "Filter\022\013\n\003all\030\001 \001(\010\022R\n\014group_labels\030\002 \003(" + + "\0132<.google.cloud.osconfig.v1beta.PatchIn" + + "stanceFilter.GroupLabel\022\r\n\005zones\030\003 \003(\t\022\021" + + "\n\tinstances\030\004 \003(\t\022\036\n\026instance_name_prefi" + + "xes\030\005 \003(\t\032\225\001\n\nGroupLabel\022X\n\006labels\030\001 \003(\013" + + "2H.google.cloud.osconfig.v1beta.PatchIns" + + "tanceFilter.GroupLabel.LabelsEntry\032-\n\013La" + + "belsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" + + "\001\"\334\001\n\014PatchRollout\022=\n\004mode\030\001 \001(\0162/.googl" + + "e.cloud.osconfig.v1beta.PatchRollout.Mod" + + "e\022G\n\021disruption_budget\030\002 \001(\0132,.google.cl" + + "oud.osconfig.v1beta.FixedOrPercent\"D\n\004Mo" + + "de\022\024\n\020MODE_UNSPECIFIED\020\000\022\020\n\014ZONE_BY_ZONE" + + "\020\001\022\024\n\020CONCURRENT_ZONES\020\002Bs\n com.google.c" + + "loud.osconfig.v1betaB\tPatchJobsZDgoogle." + + "golang.org/genproto/googleapis/cloud/osc" + + "onfig/v1beta;osconfigb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.osconfig.v1beta.Common.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); @@ -34873,6 +37017,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Duration", "DryRun", "DisplayName", + "Rollout", }); internal_static_google_cloud_osconfig_v1beta_GetPatchJobRequest_descriptor = getDescriptor().getMessageTypes().get(1); @@ -34942,6 +37087,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ErrorMessage", "PercentComplete", "PatchDeployment", + "Rollout", }); internal_static_google_cloud_osconfig_v1beta_PatchJob_InstanceDetailsSummary_descriptor = internal_static_google_cloud_osconfig_v1beta_PatchJob_descriptor.getNestedTypes().get(0); @@ -34971,7 +37117,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_osconfig_v1beta_PatchConfig_descriptor, new java.lang.String[] { - "RebootConfig", "Apt", "Yum", "Goo", "Zypper", "WindowsUpdate", "PreStep", "PostStep", + "RebootConfig", + "Apt", + "Yum", + "Goo", + "Zypper", + "WindowsUpdate", + "PreStep", + "PostStep", + "MigInstancesAllowed", }); internal_static_google_cloud_osconfig_v1beta_Instance_descriptor = getDescriptor().getMessageTypes().get(9); @@ -35082,13 +37236,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_osconfig_v1beta_PatchRollout_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_osconfig_v1beta_PatchRollout_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_PatchRollout_descriptor, + new java.lang.String[] { + "Mode", "DisruptionBudget", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.osconfig.v1beta.Common.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/guest_policies.proto b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/guest_policies.proto index f7fd0747..80586657 100644 --- a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/guest_policies.proto +++ b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/guest_policies.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.osconfig.v1beta; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; @@ -148,6 +149,23 @@ message Assignment { repeated OsType os_types = 5; } +// The desired state that the OS Config agent maintains on the VM instance. +enum DesiredState { + // The default is to ensure the package is installed. + DESIRED_STATE_UNSPECIFIED = 0; + + // The agent ensures that the package is installed. + INSTALLED = 1; + + // The agent ensures that the package is installed and + // periodically checks for and install any updates. + UPDATED = 2; + + // The agent ensures that the package is not installed and uninstall it + // if detected. + REMOVED = 3; +} + // Package is a reference to the software package to be installed or removed. // The agent on the VM instance uses the system package manager to apply the // config. @@ -296,23 +314,6 @@ message GooRepository { string url = 2 [(google.api.field_behavior) = REQUIRED]; } -// The desired state that the OS Config agent maintains on the VM instance. -enum DesiredState { - // The default is to ensure the package is installed. - DESIRED_STATE_UNSPECIFIED = 0; - - // The agent ensures that the package is installed. - INSTALLED = 1; - - // The agent ensures that the package is installed and - // periodically checks for and install any updates. - UPDATED = 2; - - // The agent ensures that the package is not installed and uninstall it - // if detected. - REMOVED = 3; -} - // A package repository. message PackageRepository { // A specific type of repository. @@ -347,7 +348,7 @@ message PackageRepository { // // If a recipe is assigned to an instance and there is a recipe with the same // name but a lower version already installed and the assigned state -// of the recipe is `INSTALLED_KEEP_UPDATED`, then the recipe is updated to +// of the recipe is `UPDATED`, then the recipe is updated to // the new version. // // Script Working Directories @@ -614,10 +615,9 @@ message SoftwareRecipe { // // INSTALLED: The software recipe is installed on the instance but // won't be updated to new versions. - // INSTALLED_KEEP_UPDATED: The software recipe is installed on the - // instance. The recipe is updated to a higher - // version, if a higher version of the recipe is - // assigned to this instance. + // UPDATED: The software recipe is installed on the instance. The recipe is + // updated to a higher version, if a higher version of the recipe is + // assigned to this instance. // REMOVE: Remove is unsupported for software recipes and attempts to // create or update a recipe to the REMOVE state is rejected. DesiredState desired_state = 6; diff --git a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/osconfig_common.proto b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/osconfig_common.proto new file mode 100644 index 00000000..fea7e2b5 --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/osconfig_common.proto @@ -0,0 +1,37 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1beta; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta;osconfig"; +option java_outer_classname = "Common"; +option java_package = "com.google.cloud.osconfig.v1beta"; + +// Message encapsulating a value that can be either absolute ("fixed") or +// relative ("percent") to a value. +message FixedOrPercent { + // Type of the value. + oneof mode { + // Specifies a fixed value. + int32 fixed = 1; + + // Specifies the relative value defined as a percentage, which will be + // multiplied by a reference value. + int32 percent = 2; + } +} diff --git a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/osconfig_service.proto b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/osconfig_service.proto index 2211d835..d69b7f79 100644 --- a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/osconfig_service.proto +++ b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/osconfig_service.proto @@ -104,6 +104,35 @@ service OsConfigService { }; } + // Update an OS Config patch deployment. + rpc UpdatePatchDeployment(UpdatePatchDeploymentRequest) returns (PatchDeployment) { + option (google.api.http) = { + patch: "/v1beta/{patch_deployment.name=projects/*/patchDeployments/*}" + body: "patch_deployment" + }; + option (google.api.method_signature) = "patch_deployment,update_mask"; + } + + // Change state of patch deployment to "PAUSED". + // Patch deployment in paused state doesn't generate patch jobs. + rpc PausePatchDeployment(PausePatchDeploymentRequest) returns (PatchDeployment) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/patchDeployments/*}:pause" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Change state of patch deployment back to "ACTIVE". + // Patch deployment in active state continues to generate patch jobs. + rpc ResumePatchDeployment(ResumePatchDeploymentRequest) returns (PatchDeployment) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/patchDeployments/*}:resume" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + // Create an OS Config guest policy. rpc CreateGuestPolicy(CreateGuestPolicyRequest) returns (GuestPolicy) { option (google.api.http) = { diff --git a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_deployments.proto b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_deployments.proto index 255c0c98..601231a3 100644 --- a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_deployments.proto +++ b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_deployments.proto @@ -16,10 +16,12 @@ syntax = "proto3"; package google.cloud.osconfig.v1beta; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/osconfig/v1beta/patch_jobs.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/type/datetime.proto"; import "google/type/dayofweek.proto"; @@ -33,8 +35,26 @@ option java_package = "com.google.cloud.osconfig.v1beta"; // complete a patch. These configurations include instance filter, package // repository settings, and a schedule. For more information about creating and // managing patch deployments, see [Scheduling patch -// jobs](/compute/docs/os-patch-management/schedule-patch-jobs). +// jobs](https://cloud.google.com/compute/docs/os-patch-management/schedule-patch-jobs). message PatchDeployment { + option (google.api.resource) = { + type: "osconfig.googleapis.com/PatchDeployment" + pattern: "projects/{project}/patchDeployments/{patch_deployment}" + }; + + // Represents state of patch peployment. + enum State { + // The default value. This value is used if the state is omitted. + STATE_UNSPECIFIED = 0; + + // Active value means that patch deployment generates Patch Jobs. + ACTIVE = 1; + + // Paused value means that patch deployment does not generate + // Patch jobs. Requires user action to move in and out from this state. + PAUSED = 2; + } + // Unique name for the patch deployment resource in a project. The patch // deployment name is in the form: // `projects/{project_id}/patchDeployments/{patch_deployment_id}`. @@ -64,25 +84,27 @@ message PatchDeployment { } // Output only. Time the patch deployment was created. Timestamp is in - // RFC3339 - // text format. + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time the patch deployment was last updated. Timestamp is in - // RFC3339 - // text format. + // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last time a patch job was started by this deployment. - // Timestamp is in - // RFC3339 - // text format. + // Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text + // format. google.protobuf.Timestamp last_execute_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Rollout strategy of the patch job. + PatchRollout rollout = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the patch deployment. + State state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Sets the time for a one time patch deployment. Timestamp is in -// RFC3339 -// text format. +// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. message OneTimeSchedule { // Required. The desired patch job execution time. google.protobuf.Timestamp execute_time = 1 [(google.api.field_behavior) = REQUIRED]; @@ -95,16 +117,16 @@ message RecurringSchedule { // Invalid. A frequency must be specified. FREQUENCY_UNSPECIFIED = 0; - // Indicates that the frequency should be expressed in terms of - // weeks. + // Indicates that the frequency of recurrence should be expressed in terms + // of weeks. WEEKLY = 1; - // Indicates that the frequency should be expressed in terms of - // months. + // Indicates that the frequency of recurrence should be expressed in terms + // of months. MONTHLY = 2; - // Indicates that the frequency should be expressed in terms of - // days. + // Indicates that the frequency of recurrence should be expressed in terms + // of days. DAILY = 3; } @@ -173,6 +195,15 @@ message WeekDayOfMonth { // Required. A day of the week. google.type.DayOfWeek day_of_week = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Represents the number of days before or after the given week day of month + // that the patch deployment is scheduled for. For example if `week_ordinal` + // and `day_of_week` values point to the second day of the month and this + // `day_offset` value is set to `3`, the patch deployment takes place three + // days after the second Tuesday of the month. If this value is negative, for + // example -5, the patches are deployed five days before before the second + // Tuesday of the month. Allowed values are in range `[-30, 30]`. + int32 day_offset = 3 [(google.api.field_behavior) = OPTIONAL]; } // A request message for creating a patch deployment. @@ -229,3 +260,37 @@ message DeletePatchDeploymentRequest { // `projects/*/patchDeployments/*`. string name = 1 [(google.api.field_behavior) = REQUIRED]; } + +// A request message for updating a patch deployment. +message UpdatePatchDeploymentRequest { + // Required. The patch deployment to Update. + PatchDeployment patch_deployment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Field mask that controls which fields of the patch deployment should be + // updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request message for pausing a patch deployment. +message PausePatchDeploymentRequest { + // Required. The resource name of the patch deployment in the form + // `projects/*/patchDeployments/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} + +// A request message for resuming a patch deployment. +message ResumePatchDeploymentRequest { + // Required. The resource name of the patch deployment in the form + // `projects/*/patchDeployments/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/PatchDeployment" + } + ]; +} diff --git a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_jobs.proto b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_jobs.proto index 780e18be..c835900e 100644 --- a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_jobs.proto +++ b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_jobs.proto @@ -16,8 +16,10 @@ syntax = "proto3"; package google.cloud.osconfig.v1beta; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/osconfig/v1beta/osconfig_common.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -25,8 +27,7 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta option java_outer_classname = "PatchJobs"; option java_package = "com.google.cloud.osconfig.v1beta"; -// A request message to initiate patching across Google Compute Engine -// instances. +// A request message to initiate patching across Compute Engine instances. message ExecutePatchJobRequest { // Required. The project in which to run this patch in the form `projects/*` string parent = 1 [(google.api.field_behavior) = REQUIRED]; @@ -53,6 +54,9 @@ message ExecutePatchJobRequest { // Display name for this patch job. This does not have to be unique. string display_name = 8; + + // Rollout strategy of the patch job. + PatchRollout rollout = 9; } // Request to get an active or completed patch job. @@ -91,7 +95,7 @@ message ListPatchJobInstanceDetailsResponse { // Patch details for a VM instance. For more information about reviewing VM // instance details, see // [Listing all VM instance details for a specific patch -// job](/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details). +// job](https://cloud.google.com/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details). message PatchJobInstanceDetails { // The instance name in the form `projects/*/zones/*/instances/*` string name = 1; @@ -140,12 +144,46 @@ message ListPatchJobsResponse { // A high level representation of a patch job that is either in progress // or has completed. // -// Instances details are not included in the job. To paginate through instance -// details, use ListPatchJobInstanceDetails. +// Instance details are not included in the job. To paginate through instance +// details, use `ListPatchJobInstanceDetails`. // // For more information about patch jobs, see -// [Creating patch jobs](/compute/docs/os-patch-management/create-patch-job). +// [Creating patch +// jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job). message PatchJob { + option (google.api.resource) = { + type: "osconfig.googleapis.com/PatchJob" + pattern: "projects/{project}/patchJobs/{patch_job}" + }; + + // Enumeration of the various states a patch job passes through as it + // executes. + enum State { + // State must be specified. + STATE_UNSPECIFIED = 0; + + // The patch job was successfully initiated. + STARTED = 1; + + // The patch job is looking up instances to run the patch on. + INSTANCE_LOOKUP = 2; + + // Instances are being patched. + PATCHING = 3; + + // Patch job completed successfully. + SUCCEEDED = 4; + + // Patch job completed but there were errors. + COMPLETED_WITH_ERRORS = 5; + + // The patch job was canceled. + CANCELED = 6; + + // The patch job timed out. + TIMED_OUT = 7; + } + // A summary of the current patch state across all instances that this patch // job affects. Contains counts of instances in different states. These states // map to `InstancePatchState`. List patch job instance details to see the @@ -199,34 +237,6 @@ message PatchJob { int64 no_agent_detected_instance_count = 15; } - // Enumeration of the various states a patch job passes through as it - // executes. - enum State { - // State must be specified. - STATE_UNSPECIFIED = 0; - - // The patch job was successfully initiated. - STARTED = 1; - - // The patch job is looking up instances to run the patch on. - INSTANCE_LOOKUP = 2; - - // Instances are being patched. - PATCHING = 3; - - // Patch job completed successfully. - SUCCEEDED = 4; - - // Patch job completed but there were errors. - COMPLETED_WITH_ERRORS = 5; - - // The patch job was canceled. - CANCELED = 6; - - // The patch job timed out. - TIMED_OUT = 7; - } - // Unique identifier for this patch job in the form // `projects/*/patchJobs/*` string name = 1; @@ -244,7 +254,7 @@ message PatchJob { // Last time this patch job was updated. google.protobuf.Timestamp update_time = 4; - // The current state of the PatchJob . + // The current state of the PatchJob. State state = 5; // Instances to patch. @@ -274,6 +284,9 @@ message PatchJob { // Output only. Name of the patch deployment that created this patch job. string patch_deployment = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Rollout strategy being applied. + PatchRollout rollout = 16; } // Patch configuration specifications. Contains details on how to apply the @@ -324,6 +337,9 @@ message PatchConfig { // The `ExecStep` to run after the patch update. ExecStep post_step = 9; + + // Allows the patch job to run on Managed instance groups (MIGs). + bool mig_instances_allowed = 10; } // Namespace for instance state enums. @@ -608,8 +624,8 @@ message PatchInstanceFilter { // Represents a group of VMs that can be identified as having all these // labels, for example "env=prod and app=web". message GroupLabel { - // Google Compute Engine instance labels that must be present for a VM - // instance to be targeted by this filter. + // Compute Engine instance labels that must be present for a VM instance to + // be targeted by this filter. map labels = 1; } @@ -636,3 +652,52 @@ message PatchInstanceFilter { // example prefix="prod-". repeated string instance_name_prefixes = 5; } + +// Patch rollout configuration specifications. Contains details on the +// concurrency control when applying patch(es) to all targeted VMs. +message PatchRollout { + // Type of the rollout. + enum Mode { + // Mode must be specified. + MODE_UNSPECIFIED = 0; + + // Patches are applied one zone at a time. The patch job begins in the + // region with the lowest number of targeted VMs. Within the region, + // patching begins in the zone with the lowest number of targeted VMs. If + // multiple regions (or zones within a region) have the same number of + // targeted VMs, a tie-breaker is achieved by sorting the regions or zones + // in alphabetical order. + ZONE_BY_ZONE = 1; + + // Patches are applied to VMs in all zones at the same time. + CONCURRENT_ZONES = 2; + } + + // Mode of the patch rollout. + Mode mode = 1; + + // The maximum number (or percentage) of VMs per zone to disrupt at any given + // moment. The number of VMs calculated from multiplying the percentage by the + // total number of VMs in a zone is rounded up. + // + // During patching, a VM is considered disrupted from the time the agent is + // notified to begin until patching has completed. This disruption time + // includes the time to complete reboot and any post-patch steps. + // + // A VM contributes to the disruption budget if its patching operation fails + // either when applying the patches, running pre or post patch steps, or if it + // fails to respond with a success notification before timing out. VMs that + // are not running or do not have an active agent do not count toward this + // disruption budget. + // + // For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, + // the patch job stops, because continuing to the next zone requires + // completion of the patch process in the previous zone. + // + // For example, if the disruption budget has a fixed value of `10`, and 8 VMs + // fail to patch in the current zone, the patch job continues to patch 2 VMs + // at a time until the zone is completed. When that zone is completed + // successfully, patching begins with 10 VMs at a time in the next zone. If 10 + // VMs in the next zone fail to patch, the patch job stops. + FixedOrPercent disruption_budget = 2; +}