From 8540396a492b7e9049f2180d59a38b674298b486 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Thu, 20 Feb 2020 15:03:49 -0800 Subject: [PATCH 1/5] [CHANGE ME] Re-generated to pick up changes in the API or client library generator. --- .../v1/SecurityCenterClient.java | 31 +- .../v1/stub/SecurityCenterStubSettings.java | 12 +- .../v1/SecurityCenterClientTest.java | 25 +- .../v1/AssetSecurityMarksName.java | 4 +- .../v1/FindingSecurityMarksName.java | 4 +- .../securitycenter/v1/SecurityMarksName.java | 321 ++++++++++++++++++ .../securitycenter/v1/SecurityMarksNames.java | 38 +++ .../v1/UntypedSecurityMarksName.java | 106 ++++++ synth.metadata | 34 +- 9 files changed, 521 insertions(+), 54 deletions(-) create mode 100644 proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityMarksName.java create mode 100644 proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityMarksNames.java create mode 100644 proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UntypedSecurityMarksName.java diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java index b35f69575..0e7ea1c69 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java @@ -27,6 +27,7 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.resourcenames.ResourceName; import com.google.cloud.securitycenter.v1.stub.SecurityCenterStub; import com.google.cloud.securitycenter.v1.stub.SecurityCenterStubSettings; import com.google.common.util.concurrent.MoreExecutors; @@ -411,7 +412,7 @@ public final UnaryCallable createFindingCallable( * *

    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
    *   Policy response = securityCenterClient.getIamPolicy(resource);
    * }
    * 
@@ -420,7 +421,7 @@ public final UnaryCallable createFindingCallable( * operation documentation for the appropriate value for this field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Policy getIamPolicy(SourceName resource) { + public final Policy getIamPolicy(ResourceName resource) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource(resource == null ? null : resource.toString()) @@ -436,7 +437,7 @@ public final Policy getIamPolicy(SourceName resource) { * *

    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
    *   Policy response = securityCenterClient.getIamPolicy(resource.toString());
    * }
    * 
@@ -458,7 +459,7 @@ public final Policy getIamPolicy(String resource) { * *

    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
    *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
    *     .setResource(resource.toString())
    *     .build();
@@ -481,7 +482,7 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
    *
    * 

    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
    *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
    *     .setResource(resource.toString())
    *     .build();
@@ -1508,7 +1509,7 @@ public final UnaryCallable setFindingStateCalla
    *
    * 

    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
    *   Policy policy = Policy.newBuilder().build();
    *   Policy response = securityCenterClient.setIamPolicy(resource, policy);
    * }
@@ -1521,7 +1522,7 @@ public final UnaryCallable setFindingStateCalla
    *     Platform services (such as Projects) might reject them.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final Policy setIamPolicy(SourceName resource, Policy policy) {
+  public final Policy setIamPolicy(ResourceName resource, Policy policy) {
     SetIamPolicyRequest request =
         SetIamPolicyRequest.newBuilder()
             .setResource(resource == null ? null : resource.toString())
@@ -1538,7 +1539,7 @@ public final Policy setIamPolicy(SourceName resource, Policy policy) {
    *
    * 

    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
    *   Policy policy = Policy.newBuilder().build();
    *   Policy response = securityCenterClient.setIamPolicy(resource.toString(), policy);
    * }
@@ -1565,7 +1566,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
    *
    * 

    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
    *   Policy policy = Policy.newBuilder().build();
    *   SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
    *     .setResource(resource.toString())
@@ -1590,7 +1591,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
    *
    * 

    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
    *   Policy policy = Policy.newBuilder().build();
    *   SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
    *     .setResource(resource.toString())
@@ -1614,7 +1615,7 @@ public final UnaryCallable setIamPolicyCallable() {
    *
    * 

    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
    *   List<String> permissions = new ArrayList<>();
    *   TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(resource, permissions);
    * }
@@ -1628,7 +1629,7 @@ public final UnaryCallable setIamPolicyCallable() {
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   public final TestIamPermissionsResponse testIamPermissions(
-      SourceName resource, List permissions) {
+      ResourceName resource, List permissions) {
     TestIamPermissionsRequest request =
         TestIamPermissionsRequest.newBuilder()
             .setResource(resource == null ? null : resource.toString())
@@ -1645,7 +1646,7 @@ public final TestIamPermissionsResponse testIamPermissions(
    *
    * 

    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
    *   List<String> permissions = new ArrayList<>();
    *   TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(resource.toString(), permissions);
    * }
@@ -1676,7 +1677,7 @@ public final TestIamPermissionsResponse testIamPermissions(
    *
    * 

    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
    *   List<String> permissions = new ArrayList<>();
    *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
    *     .setResource(resource.toString())
@@ -1701,7 +1702,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
    *
    * 

    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
    *   List<String> permissions = new ArrayList<>();
    *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
    *     .setResource(resource.toString())
diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java
index 85cae49c6..7fb60e19d 100644
--- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java
+++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java
@@ -704,9 +704,9 @@ public static class Builder extends StubSettings.Builder permissions = new ArrayList<>();
 
     TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions);
@@ -777,7 +778,7 @@ public void testIamPermissionsExceptionTest() throws Exception {
     mockSecurityCenter.addException(exception);
 
     try {
-      SourceName resource = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+      ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
       List permissions = new ArrayList<>();
 
       client.testIamPermissions(resource, permissions);
@@ -840,11 +841,11 @@ public void updateFindingExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void updateOrganizationSettingsTest() {
-    String name = "name3373707";
+    OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
     boolean enableAssetDiscovery = false;
     OrganizationSettings expectedResponse =
         OrganizationSettings.newBuilder()
-            .setName(name)
+            .setName(name.toString())
             .setEnableAssetDiscovery(enableAssetDiscovery)
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
@@ -931,8 +932,8 @@ public void updateSourceExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void updateSecurityMarksTest() {
-    String name = "name3373707";
-    SecurityMarks expectedResponse = SecurityMarks.newBuilder().setName(name).build();
+    SecurityMarksName name = AssetSecurityMarksName.of("[ORGANIZATION]", "[ASSET]");
+    SecurityMarks expectedResponse = SecurityMarks.newBuilder().setName(name.toString()).build();
     mockSecurityCenter.addResponse(expectedResponse);
 
     SecurityMarks securityMarks = SecurityMarks.newBuilder().build();
diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetSecurityMarksName.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetSecurityMarksName.java
index 7b8952afb..e09f9a2ca 100644
--- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetSecurityMarksName.java
+++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AssetSecurityMarksName.java
@@ -30,7 +30,7 @@
  */
 @javax.annotation.Generated("by GAPIC protoc plugin")
 @Deprecated
-public class AssetSecurityMarksName extends SecuritymarksName {
+public class AssetSecurityMarksName extends SecurityMarksName {
 
   private static final PathTemplate PATH_TEMPLATE =
       PathTemplate.createWithoutUrlEncoding(
@@ -128,7 +128,7 @@ public String toString() {
   }
 
   /** Builder for AssetSecurityMarksName. */
-  public static class Builder {
+  public static class Builder extends SecurityMarksName.Builder {
 
     private String organization;
     private String asset;
diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingSecurityMarksName.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingSecurityMarksName.java
index c1dfec3e8..7bda84131 100644
--- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingSecurityMarksName.java
+++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingSecurityMarksName.java
@@ -30,7 +30,7 @@
  */
 @javax.annotation.Generated("by GAPIC protoc plugin")
 @Deprecated
-public class FindingSecurityMarksName extends SecuritymarksName {
+public class FindingSecurityMarksName extends SecurityMarksName {
 
   private static final PathTemplate PATH_TEMPLATE =
       PathTemplate.createWithoutUrlEncoding(
@@ -141,7 +141,7 @@ public String toString() {
   }
 
   /** Builder for FindingSecurityMarksName. */
-  public static class Builder {
+  public static class Builder extends SecurityMarksName.Builder {
 
     private String organization;
     private String source;
diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityMarksName.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityMarksName.java
new file mode 100644
index 000000000..bbe40e199
--- /dev/null
+++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityMarksName.java
@@ -0,0 +1,321 @@
+/*
+ * 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.
+ */
+
+package com.google.cloud.securitycenter.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.pathtemplate.ValidationException;
+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;
+
+/** AUTO-GENERATED DOCUMENTATION AND CLASS */
+@javax.annotation.Generated("by GAPIC protoc plugin")
+public class SecurityMarksName implements ResourceName {
+
+  @Deprecated
+  protected SecurityMarksName() {}
+
+  private static final PathTemplate ORGANIZATION_ASSET_PATH_TEMPLATE =
+      PathTemplate.createWithoutUrlEncoding(
+          "organizations/{organization}/assets/{asset}/securityMarks");
+  private static final PathTemplate ORGANIZATION_SOURCE_FINDING_PATH_TEMPLATE =
+      PathTemplate.createWithoutUrlEncoding(
+          "organizations/{organization}/sources/{source}/findings/{finding}/securityMarks");
+
+  private volatile Map fieldValuesMap;
+  private PathTemplate pathTemplate;
+  private String fixedValue;
+
+  private String organization;
+  private String asset;
+  private String source;
+  private String finding;
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  public String getAsset() {
+    return asset;
+  }
+
+  public String getSource() {
+    return source;
+  }
+
+  public String getFinding() {
+    return finding;
+  }
+
+  private SecurityMarksName(Builder builder) {
+    organization = Preconditions.checkNotNull(builder.getOrganization());
+    asset = Preconditions.checkNotNull(builder.getAsset());
+    pathTemplate = ORGANIZATION_ASSET_PATH_TEMPLATE;
+  }
+
+  private SecurityMarksName(OrganizationSourceFindingBuilder builder) {
+    organization = Preconditions.checkNotNull(builder.getOrganization());
+    source = Preconditions.checkNotNull(builder.getSource());
+    finding = Preconditions.checkNotNull(builder.getFinding());
+    pathTemplate = ORGANIZATION_SOURCE_FINDING_PATH_TEMPLATE;
+  }
+
+  public static Builder newBuilder() {
+    return new Builder();
+  }
+
+  public static Builder newOrganizationAssetBuilder() {
+    return new Builder();
+  }
+
+  public static OrganizationSourceFindingBuilder newOrganizationSourceFindingBuilder() {
+    return new OrganizationSourceFindingBuilder();
+  }
+
+  public Builder toBuilder() {
+    return new Builder(this);
+  }
+
+  public static SecurityMarksName of(String organization, String asset) {
+    return newOrganizationAssetBuilder().setOrganization(organization).setAsset(asset).build();
+  }
+
+  public static SecurityMarksName ofOrganizationAssetName(String organization, String asset) {
+    return newOrganizationAssetBuilder().setOrganization(organization).setAsset(asset).build();
+  }
+
+  public static SecurityMarksName ofOrganizationSourceFindingName(
+      String organization, String source, String finding) {
+    return newOrganizationSourceFindingBuilder()
+        .setOrganization(organization)
+        .setSource(source)
+        .setFinding(finding)
+        .build();
+  }
+
+  public static String format(String organization, String asset) {
+    return newBuilder().setOrganization(organization).setAsset(asset).build().toString();
+  }
+
+  public static String formatOrganizationAssetName(String organization, String asset) {
+    return newBuilder().setOrganization(organization).setAsset(asset).build().toString();
+  }
+
+  public static String formatOrganizationSourceFindingName(
+      String organization, String source, String finding) {
+    return newOrganizationSourceFindingBuilder()
+        .setOrganization(organization)
+        .setSource(source)
+        .setFinding(finding)
+        .build()
+        .toString();
+  }
+
+  public static SecurityMarksName parse(String formattedString) {
+    if (formattedString.isEmpty()) {
+      return null;
+    }
+    if (ORGANIZATION_ASSET_PATH_TEMPLATE.matches(formattedString)) {
+      Map matchMap = ORGANIZATION_ASSET_PATH_TEMPLATE.match(formattedString);
+      return ofOrganizationAssetName(matchMap.get("organization"), matchMap.get("asset"));
+    } else if (ORGANIZATION_SOURCE_FINDING_PATH_TEMPLATE.matches(formattedString)) {
+      Map matchMap =
+          ORGANIZATION_SOURCE_FINDING_PATH_TEMPLATE.match(formattedString);
+      return ofOrganizationSourceFindingName(
+          matchMap.get("organization"), matchMap.get("source"), matchMap.get("finding"));
+    }
+    throw new ValidationException("JobName.parse: formattedString not in valid format");
+  }
+
+  @BetaApi("The method will be renamed to parseList after subclasses of this class are removed.")
+  public static List parse(List formattedStrings) {
+    List list = new ArrayList<>(formattedStrings.size());
+    for (String formattedString : formattedStrings) {
+      list.add(parse(formattedString));
+    }
+    return list;
+  }
+
+  @BetaApi("The method will be renamed to toStringList after subclasses of this class are removed.")
+  public static List toStrings(List values) {
+    List list = new ArrayList<>(values.size());
+    for (SecurityMarksName value : values) {
+      if (value == null) {
+        list.add("");
+      } else {
+        list.add(value.toString());
+      }
+    }
+    return list;
+  }
+
+  public static boolean isParsableFrom(String formattedString) {
+    return ORGANIZATION_ASSET_PATH_TEMPLATE.matches(formattedString)
+        || ORGANIZATION_SOURCE_FINDING_PATH_TEMPLATE.matches(formattedString);
+  }
+
+  @Override
+  public Map getFieldValuesMap() {
+    if (fieldValuesMap == null) {
+      synchronized (this) {
+        if (fieldValuesMap == null) {
+          ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
+          if (organization != null) {
+            fieldMapBuilder.put("organization", organization);
+          }
+          if (asset != null) {
+            fieldMapBuilder.put("asset", asset);
+          }
+          if (source != null) {
+            fieldMapBuilder.put("source", source);
+          }
+          if (finding != null) {
+            fieldMapBuilder.put("finding", finding);
+          }
+          fieldValuesMap = fieldMapBuilder.build();
+        }
+      }
+    }
+    return fieldValuesMap;
+  }
+
+  public String getFieldValue(String fieldName) {
+    return getFieldValuesMap().get(fieldName);
+  }
+
+  @Override
+  public String toString() {
+    return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap());
+  }
+
+  /** Builder for organizations/{organization}/assets/{asset}/securityMarks. */
+  public static class Builder {
+
+    private String organization;
+    private String asset;
+
+    protected Builder() {}
+
+    public String getOrganization() {
+      return organization;
+    }
+
+    public String getAsset() {
+      return asset;
+    }
+
+    public Builder setOrganization(String organization) {
+      this.organization = organization;
+      return this;
+    }
+
+    public Builder setAsset(String asset) {
+      this.asset = asset;
+      return this;
+    }
+
+    private Builder(SecurityMarksName securityMarksName) {
+      Preconditions.checkArgument(
+          securityMarksName.pathTemplate == ORGANIZATION_ASSET_PATH_TEMPLATE,
+          "toBuilder is only supported when SecurityMarksName has the pattern of "
+              + "organizations/{organization}/assets/{asset}/securityMarks.");
+      organization = securityMarksName.organization;
+      asset = securityMarksName.asset;
+    }
+
+    public SecurityMarksName build() {
+      return new SecurityMarksName(this);
+    }
+  }
+
+  /** Builder for organizations/{organization}/sources/{source}/findings/{finding}/securityMarks. */
+  public static class OrganizationSourceFindingBuilder {
+
+    private String organization;
+    private String source;
+    private String finding;
+
+    private OrganizationSourceFindingBuilder() {}
+
+    public String getOrganization() {
+      return organization;
+    }
+
+    public String getSource() {
+      return source;
+    }
+
+    public String getFinding() {
+      return finding;
+    }
+
+    public OrganizationSourceFindingBuilder setOrganization(String organization) {
+      this.organization = organization;
+      return this;
+    }
+
+    public OrganizationSourceFindingBuilder setSource(String source) {
+      this.source = source;
+      return this;
+    }
+
+    public OrganizationSourceFindingBuilder setFinding(String finding) {
+      this.finding = finding;
+      return this;
+    }
+
+    public SecurityMarksName build() {
+      return new SecurityMarksName(this);
+    }
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      SecurityMarksName that = (SecurityMarksName) o;
+      return (Objects.equals(this.organization, that.organization))
+          && (Objects.equals(this.asset, that.asset))
+          && (Objects.equals(this.source, that.source))
+          && (Objects.equals(this.finding, that.finding));
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    int h = 1;
+    h *= 1000003;
+    h ^= Objects.hashCode(fixedValue);
+    h *= 1000003;
+    h ^= Objects.hashCode(organization);
+    h *= 1000003;
+    h ^= Objects.hashCode(asset);
+    h *= 1000003;
+    h ^= Objects.hashCode(source);
+    h *= 1000003;
+    h ^= Objects.hashCode(finding);
+    return h;
+  }
+}
diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityMarksNames.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityMarksNames.java
new file mode 100644
index 000000000..6f82499af
--- /dev/null
+++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityMarksNames.java
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+package com.google.cloud.securitycenter.v1;
+
+/**
+ * AUTO-GENERATED DOCUMENTATION AND CLASS
+ *
+ * @deprecated This resource name class will be removed in the next major version.
+ */
+@javax.annotation.Generated("by GAPIC protoc plugin")
+@Deprecated
+public class SecurityMarksNames {
+  private SecurityMarksNames() {}
+
+  public static SecurityMarksName parse(String resourceNameString) {
+    if (AssetSecurityMarksName.isParsableFrom(resourceNameString)) {
+      return AssetSecurityMarksName.parse(resourceNameString);
+    }
+    if (FindingSecurityMarksName.isParsableFrom(resourceNameString)) {
+      return FindingSecurityMarksName.parse(resourceNameString);
+    }
+    return UntypedSecurityMarksName.parse(resourceNameString);
+  }
+}
diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UntypedSecurityMarksName.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UntypedSecurityMarksName.java
new file mode 100644
index 000000000..a3233a065
--- /dev/null
+++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UntypedSecurityMarksName.java
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+
+package com.google.cloud.securitycenter.v1;
+
+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;
+
+/**
+ * AUTO-GENERATED DOCUMENTATION AND CLASS
+ *
+ * @deprecated This resource name class will be removed in the next major version.
+ */
+@javax.annotation.Generated("by GAPIC protoc plugin")
+@Deprecated
+public class UntypedSecurityMarksName extends SecurityMarksName {
+
+  private final String rawValue;
+  private Map valueMap;
+
+  private UntypedSecurityMarksName(String rawValue) {
+    this.rawValue = Preconditions.checkNotNull(rawValue);
+    this.valueMap = ImmutableMap.of("", rawValue);
+  }
+
+  public static UntypedSecurityMarksName from(ResourceName resourceName) {
+    return new UntypedSecurityMarksName(resourceName.toString());
+  }
+
+  public static UntypedSecurityMarksName parse(String formattedString) {
+    return new UntypedSecurityMarksName(formattedString);
+  }
+
+  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 (UntypedSecurityMarksName value : values) {
+      if (value == null) {
+        list.add("");
+      } else {
+        list.add(value.toString());
+      }
+    }
+    return list;
+  }
+
+  public static boolean isParsableFrom(String formattedString) {
+    return true;
+  }
+
+  /** Return a map with a single value rawValue keyed on an empty String "". */
+  public Map getFieldValuesMap() {
+    return valueMap;
+  }
+
+  /** Return the initial rawValue if @param fieldName is an empty String, else return null. */
+  public String getFieldValue(String fieldName) {
+    return valueMap.get(fieldName);
+  }
+
+  @Override
+  public String toString() {
+    return rawValue;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof UntypedSecurityMarksName) {
+      UntypedSecurityMarksName that = (UntypedSecurityMarksName) o;
+      return this.rawValue.equals(that.rawValue);
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return rawValue.hashCode();
+  }
+}
diff --git a/synth.metadata b/synth.metadata
index 715df7b24..d954dccb5 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -1,34 +1,34 @@
 {
-  "updateTime": "2020-02-14T23:02:56.052502Z",
+  "updateTime": "2020-02-20T23:03:49.486464Z",
   "sources": [
     {
-      "git": {
-        "name": ".",
-        "remote": "https://github.com/googleapis/java-securitycenter.git",
-        "sha": "ae90837be1d694a28dbc68237bac754174f79780"
+      "generator": {
+        "name": "artman",
+        "version": "0.45.0",
+        "dockerImage": "googleapis/artman@sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b"
       }
     },
     {
       "git": {
-        "name": "synthtool",
-        "remote": "rpc://devrel/cloud/libraries/tools/autosynth",
-        "sha": "dd7cd93888cbeb1d4c56a1ca814491c7813160e8"
+        "name": ".",
+        "remote": "https://github.com/googleapis/java-securitycenter.git",
+        "sha": "1ea386e246b70a10f768f27fe2a59ec1c4600f01"
       }
     },
     {
-      "generator": {
-        "name": "artman",
-        "version": "0.45.0",
-        "dockerImage": "googleapis/artman@sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b"
+      "git": {
+        "name": "googleapis",
+        "remote": "https://github.com/googleapis/googleapis.git",
+        "sha": "3eaaaf8626ce5b0c0bc7eee05e143beffa373b01",
+        "internalRef": "296274723",
+        "log": "3eaaaf8626ce5b0c0bc7eee05e143beffa373b01\nAdd BUILD.bazel for v1 secretmanager.googleapis.com\n\nPiperOrigin-RevId: 296274723\n\ne76149c3d992337f85eeb45643106aacae7ede82\nMove securitycenter v1 to use generate from annotations.\n\nPiperOrigin-RevId: 296266862\n\n203740c78ac69ee07c3bf6be7408048751f618f8\nAdd StackdriverLoggingConfig field to Cloud Tasks v2 API.\n\nPiperOrigin-RevId: 296256388\n\ne4117d5e9ed8bbca28da4a60a94947ca51cb2083\nCreate a Bazel BUILD file for the google.actions.type export.\n\nPiperOrigin-RevId: 296212567\n\na9639a0a9854fd6e1be08bba1ac3897f4f16cb2f\nAdd secretmanager.googleapis.com v1 protos\n\nPiperOrigin-RevId: 295983266\n\nce4f4c21d9dd2bfab18873a80449b9d9851efde8\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295861722\n\ncb61d6c2d070b589980c779b68ffca617f789116\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295855449\n\nab2685d8d3a0e191dc8aef83df36773c07cb3d06\nfix: Dataproc v1 - AutoscalingPolicy annotation\n\nThis adds the second resource name pattern to the\nAutoscalingPolicy resource.\n\nCommitter: @lukesneeringer\nPiperOrigin-RevId: 295738415\n\n8a1020bf6828f6e3c84c3014f2c51cb62b739140\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295286165\n\n5cfa105206e77670369e4b2225597386aba32985\nAdd service control related proto build rule.\n\nPiperOrigin-RevId: 295262088\n\nee4dddf805072004ab19ac94df2ce669046eec26\nmonitoring v3: Add prefix \"https://cloud.google.com/\" into the link for global access\ncl 295167522, get ride of synth.py hacks\n\nPiperOrigin-RevId: 295238095\n\n"
       }
     },
     {
       "git": {
-        "name": "googleapis",
-        "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "d9835e922ea79eed8497db270d2f9f85099a519c",
-        "internalRef": "295185610",
-        "log": "d9835e922ea79eed8497db270d2f9f85099a519c\nUpdate some minor docs changes about user event proto\n\nPiperOrigin-RevId: 295185610\n\n5f311e416e69c170243de722023b22f3df89ec1c\nfix: use correct PHP package name in gapic configuration\n\nPiperOrigin-RevId: 295161330\n\n6cdd74dcdb071694da6a6b5a206e3a320b62dd11\npubsub: v1 add client config annotations and retry config\n\nPiperOrigin-RevId: 295158776\n\n5169f46d9f792e2934d9fa25c36d0515b4fd0024\nAdded cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295026522\n\n56b55aa8818cd0a532a7d779f6ef337ba809ccbd\nFix: Resource annotations for CreateTimeSeriesRequest and ListTimeSeriesRequest should refer to valid resources. TimeSeries is not a named resource.\n\nPiperOrigin-RevId: 294931650\n\n"
+        "name": "synthtool",
+        "remote": "rpc://devrel/cloud/libraries/tools/autosynth",
+        "sha": "706a38c26db42299845396cdae55db635c38794a"
       }
     },
     {

From 54d63912ccc33ea08854881fee1d22bc39bccde8 Mon Sep 17 00:00:00 2001
From: Hanzhen Yi 
Date: Mon, 24 Feb 2020 11:57:42 -0800
Subject: [PATCH 2/5] remove lower marks, update clirr diff

---
 .../clirr-ignored-differences.xml             |  10 ++
 .../clirr-ignored-differences.xml             |   9 ++
 .../securitycenter/v1/SecuritymarksName.java  |  25 -----
 .../securitycenter/v1/SecuritymarksNames.java |  38 -------
 .../v1/UntypedSecuritymarksName.java          | 106 ------------------
 5 files changed, 19 insertions(+), 169 deletions(-)
 create mode 100644 google-cloud-securitycenter/clirr-ignored-differences.xml
 delete mode 100644 proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritymarksName.java
 delete mode 100644 proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritymarksNames.java
 delete mode 100644 proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UntypedSecuritymarksName.java

diff --git a/google-cloud-securitycenter/clirr-ignored-differences.xml b/google-cloud-securitycenter/clirr-ignored-differences.xml
new file mode 100644
index 000000000..c99853fd1
--- /dev/null
+++ b/google-cloud-securitycenter/clirr-ignored-differences.xml
@@ -0,0 +1,10 @@
+
+
+
+  
+    7005
+    com/google/cloud/securitycenter/v1/SecurityCenterClient
+    *Iam*
+    *ResourceName*
+  
+
diff --git a/proto-google-cloud-securitycenter-v1/clirr-ignored-differences.xml b/proto-google-cloud-securitycenter-v1/clirr-ignored-differences.xml
index fa69c4d15..bfead26ef 100644
--- a/proto-google-cloud-securitycenter-v1/clirr-ignored-differences.xml
+++ b/proto-google-cloud-securitycenter-v1/clirr-ignored-differences.xml
@@ -16,4 +16,13 @@
     com/google/cloud/securitycenter/v1/*OrBuilder
     boolean has*(*)
   
+  
+    5001
+    com/google/cloud/securitycenter/v1/*Name
+    com/google/cloud/securitycenter/v1/*Name
+  
+  
+    8001
+    com/google/cloud/securitycenter/v1/*Name*
+  
 
diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritymarksName.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritymarksName.java
deleted file mode 100644
index ef794586d..000000000
--- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritymarksName.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.
- */
-
-package com.google.cloud.securitycenter.v1;
-
-import com.google.api.resourcenames.ResourceName;
-
-/** AUTO-GENERATED DOCUMENTATION AND CLASS */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-public abstract class SecuritymarksName implements ResourceName {
-  protected SecuritymarksName() {}
-}
diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritymarksNames.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritymarksNames.java
deleted file mode 100644
index 3e6f5f182..000000000
--- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritymarksNames.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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.
- */
-
-package com.google.cloud.securitycenter.v1;
-
-/**
- * AUTO-GENERATED DOCUMENTATION AND CLASS
- *
- * @deprecated This resource name class will be removed in the next major version.
- */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-@Deprecated
-public class SecuritymarksNames {
-  private SecuritymarksNames() {}
-
-  public static SecuritymarksName parse(String resourceNameString) {
-    if (AssetSecurityMarksName.isParsableFrom(resourceNameString)) {
-      return AssetSecurityMarksName.parse(resourceNameString);
-    }
-    if (FindingSecurityMarksName.isParsableFrom(resourceNameString)) {
-      return FindingSecurityMarksName.parse(resourceNameString);
-    }
-    return UntypedSecuritymarksName.parse(resourceNameString);
-  }
-}
diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UntypedSecuritymarksName.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UntypedSecuritymarksName.java
deleted file mode 100644
index 70434ef40..000000000
--- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UntypedSecuritymarksName.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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.
- */
-
-package com.google.cloud.securitycenter.v1;
-
-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;
-
-/**
- * AUTO-GENERATED DOCUMENTATION AND CLASS
- *
- * @deprecated This resource name class will be removed in the next major version.
- */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-@Deprecated
-public class UntypedSecuritymarksName extends SecuritymarksName {
-
-  private final String rawValue;
-  private Map valueMap;
-
-  private UntypedSecuritymarksName(String rawValue) {
-    this.rawValue = Preconditions.checkNotNull(rawValue);
-    this.valueMap = ImmutableMap.of("", rawValue);
-  }
-
-  public static UntypedSecuritymarksName from(ResourceName resourceName) {
-    return new UntypedSecuritymarksName(resourceName.toString());
-  }
-
-  public static UntypedSecuritymarksName parse(String formattedString) {
-    return new UntypedSecuritymarksName(formattedString);
-  }
-
-  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 (UntypedSecuritymarksName value : values) {
-      if (value == null) {
-        list.add("");
-      } else {
-        list.add(value.toString());
-      }
-    }
-    return list;
-  }
-
-  public static boolean isParsableFrom(String formattedString) {
-    return true;
-  }
-
-  /** Return a map with a single value rawValue keyed on an empty String "". */
-  public Map getFieldValuesMap() {
-    return valueMap;
-  }
-
-  /** Return the initial rawValue if @param fieldName is an empty String, else return null. */
-  public String getFieldValue(String fieldName) {
-    return valueMap.get(fieldName);
-  }
-
-  @Override
-  public String toString() {
-    return rawValue;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (o == this) {
-      return true;
-    }
-    if (o instanceof UntypedSecuritymarksName) {
-      UntypedSecuritymarksName that = (UntypedSecuritymarksName) o;
-      return this.rawValue.equals(that.rawValue);
-    }
-    return false;
-  }
-
-  @Override
-  public int hashCode() {
-    return rawValue.hashCode();
-  }
-}

From 475b1d4c48477720407b73cb529420a0e7c63cc0 Mon Sep 17 00:00:00 2001
From: Hanzhen Yi 
Date: Mon, 24 Feb 2020 12:10:58 -0800
Subject: [PATCH 3/5] remove one more class

---
 .../v1/OrganizationSourcesName.java           | 162 ------------------
 1 file changed, 162 deletions(-)
 delete mode 100644 proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/OrganizationSourcesName.java

diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/OrganizationSourcesName.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/OrganizationSourcesName.java
deleted file mode 100644
index 926552b11..000000000
--- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/OrganizationSourcesName.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * 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.
- */
-
-package com.google.cloud.securitycenter.v1;
-
-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;
-
-/** AUTO-GENERATED DOCUMENTATION AND CLASS */
-@javax.annotation.Generated("by GAPIC protoc plugin")
-public class OrganizationSourcesName implements ResourceName {
-
-  private static final PathTemplate PATH_TEMPLATE =
-      PathTemplate.createWithoutUrlEncoding("organizations/{organization}/sources/-");
-
-  private volatile Map fieldValuesMap;
-
-  private final String organization;
-
-  public String getOrganization() {
-    return organization;
-  }
-
-  public static Builder newBuilder() {
-    return new Builder();
-  }
-
-  public Builder toBuilder() {
-    return new Builder(this);
-  }
-
-  private OrganizationSourcesName(Builder builder) {
-    organization = Preconditions.checkNotNull(builder.getOrganization());
-  }
-
-  public static OrganizationSourcesName of(String organization) {
-    return newBuilder().setOrganization(organization).build();
-  }
-
-  public static String format(String organization) {
-    return newBuilder().setOrganization(organization).build().toString();
-  }
-
-  public static OrganizationSourcesName parse(String formattedString) {
-    if (formattedString.isEmpty()) {
-      return null;
-    }
-    Map matchMap =
-        PATH_TEMPLATE.validatedMatch(
-            formattedString, "OrganizationSourcesName.parse: formattedString not in valid format");
-    return of(matchMap.get("organization"));
-  }
-
-  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 (OrganizationSourcesName value : values) {
-      if (value == null) {
-        list.add("");
-      } else {
-        list.add(value.toString());
-      }
-    }
-    return list;
-  }
-
-  public static boolean isParsableFrom(String formattedString) {
-    return PATH_TEMPLATE.matches(formattedString);
-  }
-
-  public Map getFieldValuesMap() {
-    if (fieldValuesMap == null) {
-      synchronized (this) {
-        if (fieldValuesMap == null) {
-          ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
-          fieldMapBuilder.put("organization", organization);
-          fieldValuesMap = fieldMapBuilder.build();
-        }
-      }
-    }
-    return fieldValuesMap;
-  }
-
-  public String getFieldValue(String fieldName) {
-    return getFieldValuesMap().get(fieldName);
-  }
-
-  @Override
-  public String toString() {
-    return PATH_TEMPLATE.instantiate("organization", organization);
-  }
-
-  /** Builder for OrganizationSourcesName. */
-  public static class Builder {
-
-    private String organization;
-
-    public String getOrganization() {
-      return organization;
-    }
-
-    public Builder setOrganization(String organization) {
-      this.organization = organization;
-      return this;
-    }
-
-    private Builder() {}
-
-    private Builder(OrganizationSourcesName organizationSourcesName) {
-      organization = organizationSourcesName.organization;
-    }
-
-    public OrganizationSourcesName build() {
-      return new OrganizationSourcesName(this);
-    }
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (o == this) {
-      return true;
-    }
-    if (o instanceof OrganizationSourcesName) {
-      OrganizationSourcesName that = (OrganizationSourcesName) o;
-      return (this.organization.equals(that.organization));
-    }
-    return false;
-  }
-
-  @Override
-  public int hashCode() {
-    int h = 1;
-    h *= 1000003;
-    h ^= organization.hashCode();
-    return h;
-  }
-}

From 6bd7ea865762956c4ba7cc2afee1b1f857563178 Mon Sep 17 00:00:00 2001
From: Hanzhen Yi 
Date: Mon, 24 Feb 2020 13:11:29 -0800
Subject: [PATCH 4/5] trigger kokoro


From 0e66b018136c4a2b9d0752777bf775568e317683 Mon Sep 17 00:00:00 2001
From: Hanzhen Yi 
Date: Mon, 9 Mar 2020 14:43:47 -0700
Subject: [PATCH 5/5] regenerate with only resource names

---
 .kokoro/build.sh                              |  51 +-
 .kokoro/continuous/java8.cfg                  |   5 +
 .kokoro/nightly/integration.cfg               |  14 +
 .kokoro/nightly/java8.cfg                     |   5 +
 .kokoro/nightly/samples.cfg                   |  21 +-
 .kokoro/presubmit/java8.cfg                   |   5 +
 README.md                                     |   8 +-
 .../v1/SecurityCenterClient.java              | 915 +++++++++---------
 .../v1/SecurityCenterSettings.java            | 102 +-
 .../cloud/securitycenter/v1/package-info.java |   5 +-
 .../v1/stub/GrpcSecurityCenterStub.java       | 274 +++---
 .../v1/stub/SecurityCenterStub.java           |  44 +-
 .../v1/stub/SecurityCenterStubSettings.java   | 216 ++---
 .../v1/SecurityCenterClientTest.java          | 348 +++----
 .../v1p1beta1/SecurityCenterClientTest.java   |   4 +-
 .../securitycenter/v1/SecurityMarksName.java  |   9 +-
 .../v1beta1/AssetSecurityMarksName.java       |   7 +-
 .../v1beta1/FindingSecurityMarksName.java     |   7 +-
 .../v1p1beta1/SecurityMarksName.java          |   9 +-
 renovate.json                                 |   7 +
 synth.metadata                                |  29 +-
 21 files changed, 1068 insertions(+), 1017 deletions(-)

diff --git a/.kokoro/build.sh b/.kokoro/build.sh
index f1ae58408..eeefaf1fc 100755
--- a/.kokoro/build.sh
+++ b/.kokoro/build.sh
@@ -37,19 +37,23 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI
     export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS})
 fi
 
+RETURN_CODE=0
+set +e
+
 case ${JOB_TYPE} in
 test)
     mvn test -B -Dclirr.skip=true -Denforcer.skip=true
-    bash ${KOKORO_GFILE_DIR}/codecov.sh
-    bash .kokoro/coerce_logs.sh
+    RETURN_CODE=$?
     ;;
 lint)
     mvn \
       -Penable-samples \
       com.coveo:fmt-maven-plugin:check
+    RETURN_CODE=$?
     ;;
 javadoc)
     mvn javadoc:javadoc javadoc:test-javadoc
+    RETURN_CODE=$?
     ;;
 integration)
     mvn -B ${INTEGRATION_TEST_ARGS} \
@@ -59,21 +63,46 @@ integration)
       -Denforcer.skip=true \
       -fae \
       verify
-    bash .kokoro/coerce_logs.sh
+    RETURN_CODE=$?
     ;;
 samples)
-    mvn -B \
-      -Penable-samples \
-      -DtrimStackTrace=false \
-      -Dclirr.skip=true \
-      -Denforcer.skip=true \
-      -fae \
-      verify
-    bash .kokoro/coerce_logs.sh
+    if [[ -f samples/pom.xml ]]
+    then
+        pushd samples
+        mvn -B \
+          -Penable-samples \
+          -DtrimStackTrace=false \
+          -Dclirr.skip=true \
+          -Denforcer.skip=true \
+          -fae \
+          verify
+        RETURN_CODE=$?
+        popd
+    else
+        echo "no sample pom.xml found - skipping sample tests"
+    fi
     ;;
 clirr)
     mvn -B -Denforcer.skip=true clirr:check
+    RETURN_CODE=$?
     ;;
 *)
     ;;
 esac
+
+if [ "${REPORT_COVERAGE}" == "true" ]
+then
+  bash ${KOKORO_GFILE_DIR}/codecov.sh
+fi
+
+# fix output location of logs
+bash .kokoro/coerce_logs.sh
+
+if [[ "${ENABLE_BUILD_COP}" == "true" ]]
+then
+    chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop
+    ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-securitycenter
+fi
+
+echo "exiting with ${RETURN_CODE}"
+exit ${RETURN_CODE}
diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg
index 3b017fc80..495cc7bac 100644
--- a/.kokoro/continuous/java8.cfg
+++ b/.kokoro/continuous/java8.cfg
@@ -5,3 +5,8 @@ env_vars: {
   key: "TRAMPOLINE_IMAGE"
   value: "gcr.io/cloud-devrel-kokoro-resources/java8"
 }
+
+env_vars: {
+  key: "REPORT_COVERAGE"
+  value: "true"
+}
diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg
index 3b017fc80..8bf59c02e 100644
--- a/.kokoro/nightly/integration.cfg
+++ b/.kokoro/nightly/integration.cfg
@@ -5,3 +5,17 @@ env_vars: {
   key: "TRAMPOLINE_IMAGE"
   value: "gcr.io/cloud-devrel-kokoro-resources/java8"
 }
+
+env_vars: {
+  key: "ENABLE_BUILD_COP"
+  value: "true"
+}
+
+before_action {
+  fetch_keystore {
+    keystore_resource {
+      keystore_config_id: 73713
+      keyname: "java_it_service_account"
+    }
+  }
+}
diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg
index 3b017fc80..495cc7bac 100644
--- a/.kokoro/nightly/java8.cfg
+++ b/.kokoro/nightly/java8.cfg
@@ -5,3 +5,8 @@ env_vars: {
   key: "TRAMPOLINE_IMAGE"
   value: "gcr.io/cloud-devrel-kokoro-resources/java8"
 }
+
+env_vars: {
+  key: "REPORT_COVERAGE"
+  value: "true"
+}
diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg
index 9a9102490..b4b051cd0 100644
--- a/.kokoro/nightly/samples.cfg
+++ b/.kokoro/nightly/samples.cfg
@@ -2,23 +2,28 @@
 
 # Configure the docker image for kokoro-trampoline.
 env_vars: {
-    key: "TRAMPOLINE_IMAGE"
-    value: "gcr.io/cloud-devrel-kokoro-resources/java8"
+  key: "TRAMPOLINE_IMAGE"
+  value: "gcr.io/cloud-devrel-kokoro-resources/java8"
 }
 
 env_vars: {
-    key: "JOB_TYPE"
-    value: "samples"
+  key: "JOB_TYPE"
+  value: "samples"
 }
 
 env_vars: {
-    key: "GCLOUD_PROJECT"
-    value: "gcloud-devel"
+  key: "GCLOUD_PROJECT"
+  value: "gcloud-devel"
 }
 
 env_vars: {
-    key: "GOOGLE_APPLICATION_CREDENTIALS"
-    value: "keystore/73713_java_it_service_account"
+  key: "GOOGLE_APPLICATION_CREDENTIALS"
+  value: "keystore/73713_java_it_service_account"
+}
+
+env_vars: {
+  key: "ENABLE_BUILD_COP"
+  value: "true"
 }
 
 before_action {
diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg
index 3b017fc80..495cc7bac 100644
--- a/.kokoro/presubmit/java8.cfg
+++ b/.kokoro/presubmit/java8.cfg
@@ -5,3 +5,8 @@ env_vars: {
   key: "TRAMPOLINE_IMAGE"
   value: "gcr.io/cloud-devrel-kokoro-resources/java8"
 }
+
+env_vars: {
+  key: "REPORT_COVERAGE"
+  value: "true"
+}
diff --git a/README.md b/README.md
index 6a109b1df..e98f4830c 100644
--- a/README.md
+++ b/README.md
@@ -20,13 +20,12 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
     
       com.google.cloud
       libraries-bom
-      4.1.0
+      4.2.0
       pom
       import
     
   
 
-
 
   
     com.google.cloud
@@ -87,6 +86,8 @@ use this Google Cloud Security Command Center Client Library.
 
 
 
+
+
 ## Troubleshooting
 
 To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting].
@@ -158,4 +159,5 @@ Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5]
 [license]: https://github.com/googleapis/java-securitycenter/blob/master/LICENSE
 
 [enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=securitycenter.googleapis.com
-[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
\ No newline at end of file
+[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
+[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java
index 0e7ea1c69..cc278941d 100644
--- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java
+++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java
@@ -55,9 +55,8 @@
  * 
  * 
  * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
- *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- *   Source source = Source.newBuilder().build();
- *   Source response = securityCenterClient.createSource(parent, source);
+ *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
+ *   Policy response = securityCenterClient.getIamPolicy(resource);
  * }
  * 
  * 
@@ -181,764 +180,876 @@ public final OperationsClient getOperationsClient() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a source. + * Gets the access control policy on the specified Source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   Source source = Source.newBuilder().build();
-   *   Source response = securityCenterClient.createSource(parent, source);
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
+   *   Policy response = securityCenterClient.getIamPolicy(resource);
    * }
    * 
* - * @param parent Required. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". - * @param source Required. The Source being created, only the display_name and description will be - * used. All other fields will be ignored. + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Source createSource(OrganizationName parent, Source source) { - CreateSourceRequest request = - CreateSourceRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setSource(source) + public final Policy getIamPolicy(ResourceName resource) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) .build(); - return createSource(request); + return getIamPolicy(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a source. + * Gets the access control policy on the specified Source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   Source source = Source.newBuilder().build();
-   *   Source response = securityCenterClient.createSource(parent.toString(), source);
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
+   *   Policy response = securityCenterClient.getIamPolicy(resource.toString());
    * }
    * 
* - * @param parent Required. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". - * @param source Required. The Source being created, only the display_name and description will be - * used. All other fields will be ignored. + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Source createSource(String parent, Source source) { - CreateSourceRequest request = - CreateSourceRequest.newBuilder().setParent(parent).setSource(source).build(); - return createSource(request); + public final Policy getIamPolicy(String resource) { + GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); + return getIamPolicy(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a source. + * Gets the access control policy on the specified Source. + * + *

Sample code: + * + *


+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
+   *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .build();
+   *   Policy response = securityCenterClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the access control policy on the specified Source. + * + *

Sample code: + * + *


+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
+   *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .build();
+   *   ApiFuture<Policy> future = securityCenterClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something
+   *   Policy response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Filters an organization's assets and groups them by their specified properties. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   Source source = Source.newBuilder().build();
-   *   CreateSourceRequest request = CreateSourceRequest.newBuilder()
+   *   String groupBy = "";
+   *   GroupAssetsRequest request = GroupAssetsRequest.newBuilder()
    *     .setParent(parent.toString())
-   *     .setSource(source)
+   *     .setGroupBy(groupBy)
    *     .build();
-   *   Source response = securityCenterClient.createSource(request);
+   *   for (GroupResult element : securityCenterClient.groupAssets(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 Source createSource(CreateSourceRequest request) { - return createSourceCallable().call(request); + public final GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request) { + return groupAssetsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a source. + * Filters an organization's assets and groups them by their specified properties. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   Source source = Source.newBuilder().build();
-   *   CreateSourceRequest request = CreateSourceRequest.newBuilder()
+   *   String groupBy = "";
+   *   GroupAssetsRequest request = GroupAssetsRequest.newBuilder()
    *     .setParent(parent.toString())
-   *     .setSource(source)
+   *     .setGroupBy(groupBy)
    *     .build();
-   *   ApiFuture<Source> future = securityCenterClient.createSourceCallable().futureCall(request);
+   *   ApiFuture<GroupAssetsPagedResponse> future = securityCenterClient.groupAssetsPagedCallable().futureCall(request);
    *   // Do something
-   *   Source response = future.get();
+   *   for (GroupResult element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
*/ - public final UnaryCallable createSourceCallable() { - return stub.createSourceCallable(); + public final UnaryCallable + groupAssetsPagedCallable() { + return stub.groupAssetsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a finding. The corresponding source must exist for finding creation to succeed. + * Filters an organization's assets and groups them by their specified properties. + * + *

Sample code: + * + *


+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   String groupBy = "";
+   *   GroupAssetsRequest request = GroupAssetsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setGroupBy(groupBy)
+   *     .build();
+   *   while (true) {
+   *     GroupAssetsResponse response = securityCenterClient.groupAssetsCallable().call(request);
+   *     for (GroupResult element : response.getGroupByResultsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable groupAssetsCallable() { + return stub.groupAssetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Filters an organization or source's findings and groups them by their specified properties. + * + *

To group across all sources provide a `-` as the source id. Example: + * /v1/organizations/{organization_id}/sources/-/findings * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   String findingId = "";
-   *   Finding finding = Finding.newBuilder().build();
-   *   Finding response = securityCenterClient.createFinding(parent, findingId, finding);
+   *   String groupBy = "";
+   *   for (GroupResult element : securityCenterClient.groupFindings(parent, groupBy).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* - * @param parent Required. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". - * @param findingId Required. Unique identifier provided by the client within the parent scope. It - * must be alphanumeric and less than or equal to 32 characters and greater than 0 characters - * in length. - * @param finding Required. The Finding being created. The name and security_marks will be ignored - * as they are both output only fields on this resource. + * @param parent Required. Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]". To groupBy across all sources + * provide a source_id of `-`. For example: organizations/{organization_id}/sources/- + * @param groupBy Required. Expression that defines what assets fields to use for grouping + * (including `state_change`). The string value should follow SQL syntax: comma separated list + * of fields. For example: "parent,resource_name". + *

The following fields are supported: + *

* resource_name * category * state * parent + *

The following fields are supported when compare_duration is set: + *

* state_change * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Finding createFinding(SourceName parent, String findingId, Finding finding) { - CreateFindingRequest request = - CreateFindingRequest.newBuilder() + public final GroupFindingsPagedResponse groupFindings(SourceName parent, String groupBy) { + GroupFindingsRequest request = + GroupFindingsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) - .setFindingId(findingId) - .setFinding(finding) + .setGroupBy(groupBy) .build(); - return createFinding(request); + return groupFindings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a finding. The corresponding source must exist for finding creation to succeed. + * Filters an organization or source's findings and groups them by their specified properties. + * + *

To group across all sources provide a `-` as the source id. Example: + * /v1/organizations/{organization_id}/sources/-/findings * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   String findingId = "";
-   *   Finding finding = Finding.newBuilder().build();
-   *   Finding response = securityCenterClient.createFinding(parent.toString(), findingId, finding);
+   *   String groupBy = "";
+   *   for (GroupResult element : securityCenterClient.groupFindings(parent.toString(), groupBy).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* - * @param parent Required. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". - * @param findingId Required. Unique identifier provided by the client within the parent scope. It - * must be alphanumeric and less than or equal to 32 characters and greater than 0 characters - * in length. - * @param finding Required. The Finding being created. The name and security_marks will be ignored - * as they are both output only fields on this resource. + * @param parent Required. Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]". To groupBy across all sources + * provide a source_id of `-`. For example: organizations/{organization_id}/sources/- + * @param groupBy Required. Expression that defines what assets fields to use for grouping + * (including `state_change`). The string value should follow SQL syntax: comma separated list + * of fields. For example: "parent,resource_name". + *

The following fields are supported: + *

* resource_name * category * state * parent + *

The following fields are supported when compare_duration is set: + *

* state_change * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Finding createFinding(String parent, String findingId, Finding finding) { - CreateFindingRequest request = - CreateFindingRequest.newBuilder() - .setParent(parent) - .setFindingId(findingId) - .setFinding(finding) - .build(); - return createFinding(request); + public final GroupFindingsPagedResponse groupFindings(String parent, String groupBy) { + GroupFindingsRequest request = + GroupFindingsRequest.newBuilder().setParent(parent).setGroupBy(groupBy).build(); + return groupFindings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a finding. The corresponding source must exist for finding creation to succeed. + * Filters an organization or source's findings and groups them by their specified properties. + * + *

To group across all sources provide a `-` as the source id. Example: + * /v1/organizations/{organization_id}/sources/-/findings * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   String findingId = "";
-   *   Finding finding = Finding.newBuilder().build();
-   *   CreateFindingRequest request = CreateFindingRequest.newBuilder()
+   *   String groupBy = "";
+   *   GroupFindingsRequest request = GroupFindingsRequest.newBuilder()
    *     .setParent(parent.toString())
-   *     .setFindingId(findingId)
-   *     .setFinding(finding)
+   *     .setGroupBy(groupBy)
    *     .build();
-   *   Finding response = securityCenterClient.createFinding(request);
+   *   for (GroupResult element : securityCenterClient.groupFindings(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 Finding createFinding(CreateFindingRequest request) { - return createFindingCallable().call(request); + public final GroupFindingsPagedResponse groupFindings(GroupFindingsRequest request) { + return groupFindingsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a finding. The corresponding source must exist for finding creation to succeed. + * Filters an organization or source's findings and groups them by their specified properties. + * + *

To group across all sources provide a `-` as the source id. Example: + * /v1/organizations/{organization_id}/sources/-/findings * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   String findingId = "";
-   *   Finding finding = Finding.newBuilder().build();
-   *   CreateFindingRequest request = CreateFindingRequest.newBuilder()
+   *   String groupBy = "";
+   *   GroupFindingsRequest request = GroupFindingsRequest.newBuilder()
    *     .setParent(parent.toString())
-   *     .setFindingId(findingId)
-   *     .setFinding(finding)
+   *     .setGroupBy(groupBy)
    *     .build();
-   *   ApiFuture<Finding> future = securityCenterClient.createFindingCallable().futureCall(request);
+   *   ApiFuture<GroupFindingsPagedResponse> future = securityCenterClient.groupFindingsPagedCallable().futureCall(request);
    *   // Do something
-   *   Finding response = future.get();
+   *   for (GroupResult element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
*/ - public final UnaryCallable createFindingCallable() { - return stub.createFindingCallable(); + public final UnaryCallable + groupFindingsPagedCallable() { + return stub.groupFindingsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets the access control policy on the specified Source. + * Filters an organization or source's findings and groups them by their specified properties. + * + *

To group across all sources provide a `-` as the source id. Example: + * /v1/organizations/{organization_id}/sources/-/findings + * + *

Sample code: + * + *


+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   String groupBy = "";
+   *   GroupFindingsRequest request = GroupFindingsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setGroupBy(groupBy)
+   *     .build();
+   *   while (true) {
+   *     GroupFindingsResponse response = securityCenterClient.groupFindingsCallable().call(request);
+   *     for (GroupResult element : response.getGroupByResultsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable groupFindingsCallable() { + return stub.groupFindingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the permissions that a caller has on the specified source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
-   *   Policy response = securityCenterClient.getIamPolicy(resource);
+   *   List<String> permissions = new ArrayList<>();
+   *   TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(resource, permissions);
    * }
    * 
* - * @param resource REQUIRED: The resource for which the policy is being requested. See the + * @param resource REQUIRED: The resource for which the policy detail is being requested. See the * operation documentation for the appropriate value for this field. + * @param permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Policy getIamPolicy(ResourceName resource) { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() + public final TestIamPermissionsResponse testIamPermissions( + ResourceName resource, List permissions) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() .setResource(resource == null ? null : resource.toString()) + .addAllPermissions(permissions) .build(); - return getIamPolicy(request); + return testIamPermissions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets the access control policy on the specified Source. + * Returns the permissions that a caller has on the specified source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
-   *   Policy response = securityCenterClient.getIamPolicy(resource.toString());
+   *   List<String> permissions = new ArrayList<>();
+   *   TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(resource.toString(), permissions);
    * }
    * 
* - * @param resource REQUIRED: The resource for which the policy is being requested. See the + * @param resource REQUIRED: The resource for which the policy detail is being requested. See the * operation documentation for the appropriate value for this field. + * @param permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Policy getIamPolicy(String resource) { - GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); - return getIamPolicy(request); + public final TestIamPermissionsResponse testIamPermissions( + String resource, List permissions) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(resource) + .addAllPermissions(permissions) + .build(); + return testIamPermissions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets the access control policy on the specified Source. + * Returns the permissions that a caller has on the specified source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
-   *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
+   *   List<String> permissions = new ArrayList<>();
+   *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
    *     .setResource(resource.toString())
+   *     .addAllPermissions(permissions)
    *     .build();
-   *   Policy response = securityCenterClient.getIamPolicy(request);
+   *   TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(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 Policy getIamPolicy(GetIamPolicyRequest request) { - return getIamPolicyCallable().call(request); + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets the access control policy on the specified Source. + * Returns the permissions that a caller has on the specified source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
    *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
-   *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
+   *   List<String> permissions = new ArrayList<>();
+   *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
    *     .setResource(resource.toString())
+   *     .addAllPermissions(permissions)
    *     .build();
-   *   ApiFuture<Policy> future = securityCenterClient.getIamPolicyCallable().futureCall(request);
+   *   ApiFuture<TestIamPermissionsResponse> future = securityCenterClient.testIamPermissionsCallable().futureCall(request);
    *   // Do something
-   *   Policy response = future.get();
+   *   TestIamPermissionsResponse response = future.get();
    * }
    * 
*/ - public final UnaryCallable getIamPolicyCallable() { - return stub.getIamPolicyCallable(); + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets the settings for an organization. + * Creates a source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
-   *   OrganizationSettings response = securityCenterClient.getOrganizationSettings(name);
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   Source source = Source.newBuilder().build();
+   *   Source response = securityCenterClient.createSource(parent, source);
    * }
    * 
* - * @param name Required. Name of the organization to get organization settings for. Its format is - * "organizations/[organization_id]/organizationSettings". + * @param parent Required. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * @param source Required. The Source being created, only the display_name and description will be + * used. All other fields will be ignored. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OrganizationSettings getOrganizationSettings(OrganizationSettingsName name) { - GetOrganizationSettingsRequest request = - GetOrganizationSettingsRequest.newBuilder() - .setName(name == null ? null : name.toString()) + public final Source createSource(OrganizationName parent, Source source) { + CreateSourceRequest request = + CreateSourceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSource(source) .build(); - return getOrganizationSettings(request); + return createSource(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets the settings for an organization. + * Creates a source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
-   *   OrganizationSettings response = securityCenterClient.getOrganizationSettings(name.toString());
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   Source source = Source.newBuilder().build();
+   *   Source response = securityCenterClient.createSource(parent.toString(), source);
    * }
    * 
* - * @param name Required. Name of the organization to get organization settings for. Its format is - * "organizations/[organization_id]/organizationSettings". + * @param parent Required. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * @param source Required. The Source being created, only the display_name and description will be + * used. All other fields will be ignored. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OrganizationSettings getOrganizationSettings(String name) { - GetOrganizationSettingsRequest request = - GetOrganizationSettingsRequest.newBuilder().setName(name).build(); - return getOrganizationSettings(request); + public final Source createSource(String parent, Source source) { + CreateSourceRequest request = + CreateSourceRequest.newBuilder().setParent(parent).setSource(source).build(); + return createSource(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets the settings for an organization. + * Creates a source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
-   *   GetOrganizationSettingsRequest request = GetOrganizationSettingsRequest.newBuilder()
-   *     .setName(name.toString())
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   Source source = Source.newBuilder().build();
+   *   CreateSourceRequest request = CreateSourceRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setSource(source)
    *     .build();
-   *   OrganizationSettings response = securityCenterClient.getOrganizationSettings(request);
+   *   Source response = securityCenterClient.createSource(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 OrganizationSettings getOrganizationSettings( - GetOrganizationSettingsRequest request) { - return getOrganizationSettingsCallable().call(request); + public final Source createSource(CreateSourceRequest request) { + return createSourceCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets the settings for an organization. + * Creates a source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
-   *   GetOrganizationSettingsRequest request = GetOrganizationSettingsRequest.newBuilder()
-   *     .setName(name.toString())
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   Source source = Source.newBuilder().build();
+   *   CreateSourceRequest request = CreateSourceRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setSource(source)
    *     .build();
-   *   ApiFuture<OrganizationSettings> future = securityCenterClient.getOrganizationSettingsCallable().futureCall(request);
+   *   ApiFuture<Source> future = securityCenterClient.createSourceCallable().futureCall(request);
    *   // Do something
-   *   OrganizationSettings response = future.get();
+   *   Source response = future.get();
    * }
    * 
*/ - public final UnaryCallable - getOrganizationSettingsCallable() { - return stub.getOrganizationSettingsCallable(); + public final UnaryCallable createSourceCallable() { + return stub.createSourceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a source. + * Creates a finding. The corresponding source must exist for finding creation to succeed. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   Source response = securityCenterClient.getSource(name);
+   *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   String findingId = "";
+   *   Finding finding = Finding.newBuilder().build();
+   *   Finding response = securityCenterClient.createFinding(parent, findingId, finding);
    * }
    * 
* - * @param name Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". + * @param parent Required. Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + * @param findingId Required. Unique identifier provided by the client within the parent scope. It + * must be alphanumeric and less than or equal to 32 characters and greater than 0 characters + * in length. + * @param finding Required. The Finding being created. The name and security_marks will be ignored + * as they are both output only fields on this resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Source getSource(SourceName name) { - GetSourceRequest request = - GetSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getSource(request); + public final Finding createFinding(SourceName parent, String findingId, Finding finding) { + CreateFindingRequest request = + CreateFindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFindingId(findingId) + .setFinding(finding) + .build(); + return createFinding(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a source. + * Creates a finding. The corresponding source must exist for finding creation to succeed. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   Source response = securityCenterClient.getSource(name.toString());
+   *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   String findingId = "";
+   *   Finding finding = Finding.newBuilder().build();
+   *   Finding response = securityCenterClient.createFinding(parent.toString(), findingId, finding);
    * }
    * 
* - * @param name Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". + * @param parent Required. Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + * @param findingId Required. Unique identifier provided by the client within the parent scope. It + * must be alphanumeric and less than or equal to 32 characters and greater than 0 characters + * in length. + * @param finding Required. The Finding being created. The name and security_marks will be ignored + * as they are both output only fields on this resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Source getSource(String name) { - GetSourceRequest request = GetSourceRequest.newBuilder().setName(name).build(); - return getSource(request); + public final Finding createFinding(String parent, String findingId, Finding finding) { + CreateFindingRequest request = + CreateFindingRequest.newBuilder() + .setParent(parent) + .setFindingId(findingId) + .setFinding(finding) + .build(); + return createFinding(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a source. + * Creates a finding. The corresponding source must exist for finding creation to succeed. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   GetSourceRequest request = GetSourceRequest.newBuilder()
-   *     .setName(name.toString())
+   *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   String findingId = "";
+   *   Finding finding = Finding.newBuilder().build();
+   *   CreateFindingRequest request = CreateFindingRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setFindingId(findingId)
+   *     .setFinding(finding)
    *     .build();
-   *   Source response = securityCenterClient.getSource(request);
+   *   Finding response = securityCenterClient.createFinding(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 Source getSource(GetSourceRequest request) { - return getSourceCallable().call(request); + public final Finding createFinding(CreateFindingRequest request) { + return createFindingCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a source. + * Creates a finding. The corresponding source must exist for finding creation to succeed. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   GetSourceRequest request = GetSourceRequest.newBuilder()
-   *     .setName(name.toString())
+   *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   String findingId = "";
+   *   Finding finding = Finding.newBuilder().build();
+   *   CreateFindingRequest request = CreateFindingRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setFindingId(findingId)
+   *     .setFinding(finding)
    *     .build();
-   *   ApiFuture<Source> future = securityCenterClient.getSourceCallable().futureCall(request);
+   *   ApiFuture<Finding> future = securityCenterClient.createFindingCallable().futureCall(request);
    *   // Do something
-   *   Source response = future.get();
+   *   Finding response = future.get();
    * }
    * 
*/ - public final UnaryCallable getSourceCallable() { - return stub.getSourceCallable(); + public final UnaryCallable createFindingCallable() { + return stub.createFindingCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Filters an organization's assets and groups them by their specified properties. + * Gets the settings for an organization. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   String groupBy = "";
-   *   GroupAssetsRequest request = GroupAssetsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setGroupBy(groupBy)
-   *     .build();
-   *   for (GroupResult element : securityCenterClient.groupAssets(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
+   *   OrganizationSettings response = securityCenterClient.getOrganizationSettings(name);
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param name Required. Name of the organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GroupAssetsPagedResponse groupAssets(GroupAssetsRequest request) { - return groupAssetsPagedCallable().call(request); + public final OrganizationSettings getOrganizationSettings(OrganizationSettingsName name) { + GetOrganizationSettingsRequest request = + GetOrganizationSettingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getOrganizationSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Filters an organization's assets and groups them by their specified properties. + * Gets the settings for an organization. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   String groupBy = "";
-   *   GroupAssetsRequest request = GroupAssetsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setGroupBy(groupBy)
-   *     .build();
-   *   ApiFuture<GroupAssetsPagedResponse> future = securityCenterClient.groupAssetsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (GroupResult element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
+   *   OrganizationSettings response = securityCenterClient.getOrganizationSettings(name.toString());
    * }
    * 
+ * + * @param name Required. Name of the organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - groupAssetsPagedCallable() { - return stub.groupAssetsPagedCallable(); + public final OrganizationSettings getOrganizationSettings(String name) { + GetOrganizationSettingsRequest request = + GetOrganizationSettingsRequest.newBuilder().setName(name).build(); + return getOrganizationSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Filters an organization's assets and groups them by their specified properties. + * Gets the settings for an organization. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   String groupBy = "";
-   *   GroupAssetsRequest request = GroupAssetsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setGroupBy(groupBy)
+   *   OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
+   *   GetOrganizationSettingsRequest request = GetOrganizationSettingsRequest.newBuilder()
+   *     .setName(name.toString())
    *     .build();
-   *   while (true) {
-   *     GroupAssetsResponse response = securityCenterClient.groupAssetsCallable().call(request);
-   *     for (GroupResult element : response.getGroupByResultsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
+   *   OrganizationSettings response = securityCenterClient.getOrganizationSettings(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 UnaryCallable groupAssetsCallable() { - return stub.groupAssetsCallable(); + public final OrganizationSettings getOrganizationSettings( + GetOrganizationSettingsRequest request) { + return getOrganizationSettingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Filters an organization or source's findings and groups them by their specified properties. - * - *

To group across all sources provide a `-` as the source id. Example: - * /v1/organizations/{organization_id}/sources/-/findings + * Gets the settings for an organization. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   String groupBy = "";
-   *   for (GroupResult element : securityCenterClient.groupFindings(parent, groupBy).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
+   *   GetOrganizationSettingsRequest request = GetOrganizationSettingsRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<OrganizationSettings> future = securityCenterClient.getOrganizationSettingsCallable().futureCall(request);
+   *   // Do something
+   *   OrganizationSettings response = future.get();
    * }
    * 
- * - * @param parent Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]". To groupBy across all sources - * provide a source_id of `-`. For example: organizations/{organization_id}/sources/- - * @param groupBy Required. Expression that defines what assets fields to use for grouping - * (including `state_change`). The string value should follow SQL syntax: comma separated list - * of fields. For example: "parent,resource_name". - *

The following fields are supported: - *

* resource_name * category * state * parent - *

The following fields are supported when compare_duration is set: - *

* state_change - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GroupFindingsPagedResponse groupFindings(SourceName parent, String groupBy) { - GroupFindingsRequest request = - GroupFindingsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setGroupBy(groupBy) - .build(); - return groupFindings(request); + public final UnaryCallable + getOrganizationSettingsCallable() { + return stub.getOrganizationSettingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Filters an organization or source's findings and groups them by their specified properties. - * - *

To group across all sources provide a `-` as the source id. Example: - * /v1/organizations/{organization_id}/sources/-/findings + * Gets a source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   String groupBy = "";
-   *   for (GroupResult element : securityCenterClient.groupFindings(parent.toString(), groupBy).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   Source response = securityCenterClient.getSource(name);
    * }
    * 
* - * @param parent Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]". To groupBy across all sources - * provide a source_id of `-`. For example: organizations/{organization_id}/sources/- - * @param groupBy Required. Expression that defines what assets fields to use for grouping - * (including `state_change`). The string value should follow SQL syntax: comma separated list - * of fields. For example: "parent,resource_name". - *

The following fields are supported: - *

* resource_name * category * state * parent - *

The following fields are supported when compare_duration is set: - *

* state_change + * @param name Required. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GroupFindingsPagedResponse groupFindings(String parent, String groupBy) { - GroupFindingsRequest request = - GroupFindingsRequest.newBuilder().setParent(parent).setGroupBy(groupBy).build(); - return groupFindings(request); + public final Source getSource(SourceName name) { + GetSourceRequest request = + GetSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSource(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Filters an organization or source's findings and groups them by their specified properties. - * - *

To group across all sources provide a `-` as the source id. Example: - * /v1/organizations/{organization_id}/sources/-/findings + * Gets a source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   String groupBy = "";
-   *   GroupFindingsRequest request = GroupFindingsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setGroupBy(groupBy)
-   *     .build();
-   *   for (GroupResult element : securityCenterClient.groupFindings(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   Source response = securityCenterClient.getSource(name.toString());
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param name Required. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GroupFindingsPagedResponse groupFindings(GroupFindingsRequest request) { - return groupFindingsPagedCallable().call(request); + public final Source getSource(String name) { + GetSourceRequest request = GetSourceRequest.newBuilder().setName(name).build(); + return getSource(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Filters an organization or source's findings and groups them by their specified properties. - * - *

To group across all sources provide a `-` as the source id. Example: - * /v1/organizations/{organization_id}/sources/-/findings + * Gets a source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   String groupBy = "";
-   *   GroupFindingsRequest request = GroupFindingsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setGroupBy(groupBy)
+   *   SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   GetSourceRequest request = GetSourceRequest.newBuilder()
+   *     .setName(name.toString())
    *     .build();
-   *   ApiFuture<GroupFindingsPagedResponse> future = securityCenterClient.groupFindingsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (GroupResult element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   Source response = securityCenterClient.getSource(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 UnaryCallable - groupFindingsPagedCallable() { - return stub.groupFindingsPagedCallable(); + public final Source getSource(GetSourceRequest request) { + return getSourceCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Filters an organization or source's findings and groups them by their specified properties. - * - *

To group across all sources provide a `-` as the source id. Example: - * /v1/organizations/{organization_id}/sources/-/findings + * Gets a source. * *

Sample code: * *


    * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-   *   String groupBy = "";
-   *   GroupFindingsRequest request = GroupFindingsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setGroupBy(groupBy)
+   *   SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+   *   GetSourceRequest request = GetSourceRequest.newBuilder()
+   *     .setName(name.toString())
    *     .build();
-   *   while (true) {
-   *     GroupFindingsResponse response = securityCenterClient.groupFindingsCallable().call(request);
-   *     for (GroupResult element : response.getGroupByResultsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
+   *   ApiFuture<Source> future = securityCenterClient.getSourceCallable().futureCall(request);
+   *   // Do something
+   *   Source response = future.get();
    * }
    * 
*/ - public final UnaryCallable groupFindingsCallable() { - return stub.groupFindingsCallable(); + public final UnaryCallable getSourceCallable() { + return stub.getSourceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1607,118 +1718,6 @@ public final UnaryCallable setIamPolicyCallable() { return stub.setIamPolicyCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Returns the permissions that a caller has on the specified source. - * - *

Sample code: - * - *


-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
-   *   List<String> permissions = new ArrayList<>();
-   *   TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(resource, permissions);
-   * }
-   * 
- * - * @param resource REQUIRED: The resource for which the policy detail is being requested. See the - * operation documentation for the appropriate value for this field. - * @param permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final TestIamPermissionsResponse testIamPermissions( - ResourceName resource, List permissions) { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(resource == null ? null : resource.toString()) - .addAllPermissions(permissions) - .build(); - return testIamPermissions(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Returns the permissions that a caller has on the specified source. - * - *

Sample code: - * - *


-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
-   *   List<String> permissions = new ArrayList<>();
-   *   TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(resource.toString(), permissions);
-   * }
-   * 
- * - * @param resource REQUIRED: The resource for which the policy detail is being requested. See the - * operation documentation for the appropriate value for this field. - * @param permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final TestIamPermissionsResponse testIamPermissions( - String resource, List permissions) { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource(resource) - .addAllPermissions(permissions) - .build(); - return testIamPermissions(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Returns the permissions that a caller has on the specified source. - * - *

Sample code: - * - *


-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
-   *   List<String> permissions = new ArrayList<>();
-   *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
-   *     .setResource(resource.toString())
-   *     .addAllPermissions(permissions)
-   *     .build();
-   *   TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { - return testIamPermissionsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Returns the permissions that a caller has on the specified source. - * - *

Sample code: - * - *


-   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
-   *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
-   *   List<String> permissions = new ArrayList<>();
-   *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
-   *     .setResource(resource.toString())
-   *     .addAllPermissions(permissions)
-   *     .build();
-   *   ApiFuture<TestIamPermissionsResponse> future = securityCenterClient.testIamPermissionsCallable().futureCall(request);
-   *   // Do something
-   *   TestIamPermissionsResponse response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable - testIamPermissionsCallable() { - return stub.testIamPermissionsCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates or updates a finding. The corresponding source must exist for a finding creation to diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java index c657b20b5..1fa987850 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java @@ -61,16 +61,16 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createSource to 30 seconds: + *

For example, to set the total timeout of getIamPolicy to 30 seconds: * *

  * 
  * SecurityCenterSettings.Builder securityCenterSettingsBuilder =
  *     SecurityCenterSettings.newBuilder();
  * securityCenterSettingsBuilder
- *     .createSourceSettings()
+ *     .getIamPolicySettings()
  *     .setRetrySettings(
- *         securityCenterSettingsBuilder.createSourceSettings().getRetrySettings().toBuilder()
+ *         securityCenterSettingsBuilder.getIamPolicySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * SecurityCenterSettings securityCenterSettings = securityCenterSettingsBuilder.build();
@@ -80,6 +80,29 @@
 @Generated("by gapic-generator")
 @BetaApi
 public class SecurityCenterSettings extends ClientSettings {
+  /** Returns the object with the settings used for calls to getIamPolicy. */
+  public UnaryCallSettings getIamPolicySettings() {
+    return ((SecurityCenterStubSettings) getStubSettings()).getIamPolicySettings();
+  }
+
+  /** Returns the object with the settings used for calls to groupAssets. */
+  public PagedCallSettings
+      groupAssetsSettings() {
+    return ((SecurityCenterStubSettings) getStubSettings()).groupAssetsSettings();
+  }
+
+  /** Returns the object with the settings used for calls to groupFindings. */
+  public PagedCallSettings
+      groupFindingsSettings() {
+    return ((SecurityCenterStubSettings) getStubSettings()).groupFindingsSettings();
+  }
+
+  /** Returns the object with the settings used for calls to testIamPermissions. */
+  public UnaryCallSettings
+      testIamPermissionsSettings() {
+    return ((SecurityCenterStubSettings) getStubSettings()).testIamPermissionsSettings();
+  }
+
   /** Returns the object with the settings used for calls to createSource. */
   public UnaryCallSettings createSourceSettings() {
     return ((SecurityCenterStubSettings) getStubSettings()).createSourceSettings();
@@ -90,11 +113,6 @@ public UnaryCallSettings createFindingSettings()
     return ((SecurityCenterStubSettings) getStubSettings()).createFindingSettings();
   }
 
-  /** Returns the object with the settings used for calls to getIamPolicy. */
-  public UnaryCallSettings getIamPolicySettings() {
-    return ((SecurityCenterStubSettings) getStubSettings()).getIamPolicySettings();
-  }
-
   /** Returns the object with the settings used for calls to getOrganizationSettings. */
   public UnaryCallSettings
       getOrganizationSettingsSettings() {
@@ -106,18 +124,6 @@ public UnaryCallSettings getSourceSettings() {
     return ((SecurityCenterStubSettings) getStubSettings()).getSourceSettings();
   }
 
-  /** Returns the object with the settings used for calls to groupAssets. */
-  public PagedCallSettings
-      groupAssetsSettings() {
-    return ((SecurityCenterStubSettings) getStubSettings()).groupAssetsSettings();
-  }
-
-  /** Returns the object with the settings used for calls to groupFindings. */
-  public PagedCallSettings
-      groupFindingsSettings() {
-    return ((SecurityCenterStubSettings) getStubSettings()).groupFindingsSettings();
-  }
-
   /** Returns the object with the settings used for calls to listAssets. */
   public PagedCallSettings
       listAssetsSettings() {
@@ -159,12 +165,6 @@ public UnaryCallSettings setIamPolicySettings() {
     return ((SecurityCenterStubSettings) getStubSettings()).setIamPolicySettings();
   }
 
-  /** Returns the object with the settings used for calls to testIamPermissions. */
-  public UnaryCallSettings
-      testIamPermissionsSettings() {
-    return ((SecurityCenterStubSettings) getStubSettings()).testIamPermissionsSettings();
-  }
-
   /** Returns the object with the settings used for calls to updateFinding. */
   public UnaryCallSettings updateFindingSettings() {
     return ((SecurityCenterStubSettings) getStubSettings()).updateFindingSettings();
@@ -284,6 +284,31 @@ public Builder applyToAllUnaryMethods(
       return this;
     }
 
+    /** Returns the builder for the settings used for calls to getIamPolicy. */
+    public UnaryCallSettings.Builder getIamPolicySettings() {
+      return getStubSettingsBuilder().getIamPolicySettings();
+    }
+
+    /** Returns the builder for the settings used for calls to groupAssets. */
+    public PagedCallSettings.Builder<
+            GroupAssetsRequest, GroupAssetsResponse, GroupAssetsPagedResponse>
+        groupAssetsSettings() {
+      return getStubSettingsBuilder().groupAssetsSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to groupFindings. */
+    public PagedCallSettings.Builder<
+            GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse>
+        groupFindingsSettings() {
+      return getStubSettingsBuilder().groupFindingsSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to testIamPermissions. */
+    public UnaryCallSettings.Builder
+        testIamPermissionsSettings() {
+      return getStubSettingsBuilder().testIamPermissionsSettings();
+    }
+
     /** Returns the builder for the settings used for calls to createSource. */
     public UnaryCallSettings.Builder createSourceSettings() {
       return getStubSettingsBuilder().createSourceSettings();
@@ -294,11 +319,6 @@ public UnaryCallSettings.Builder createFindingSet
       return getStubSettingsBuilder().createFindingSettings();
     }
 
-    /** Returns the builder for the settings used for calls to getIamPolicy. */
-    public UnaryCallSettings.Builder getIamPolicySettings() {
-      return getStubSettingsBuilder().getIamPolicySettings();
-    }
-
     /** Returns the builder for the settings used for calls to getOrganizationSettings. */
     public UnaryCallSettings.Builder
         getOrganizationSettingsSettings() {
@@ -310,20 +330,6 @@ public UnaryCallSettings.Builder getSourceSettings() {
       return getStubSettingsBuilder().getSourceSettings();
     }
 
-    /** Returns the builder for the settings used for calls to groupAssets. */
-    public PagedCallSettings.Builder<
-            GroupAssetsRequest, GroupAssetsResponse, GroupAssetsPagedResponse>
-        groupAssetsSettings() {
-      return getStubSettingsBuilder().groupAssetsSettings();
-    }
-
-    /** Returns the builder for the settings used for calls to groupFindings. */
-    public PagedCallSettings.Builder<
-            GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse>
-        groupFindingsSettings() {
-      return getStubSettingsBuilder().groupFindingsSettings();
-    }
-
     /** Returns the builder for the settings used for calls to listAssets. */
     public PagedCallSettings.Builder
         listAssetsSettings() {
@@ -368,12 +374,6 @@ public UnaryCallSettings.Builder setIamPolicySettin
       return getStubSettingsBuilder().setIamPolicySettings();
     }
 
-    /** Returns the builder for the settings used for calls to testIamPermissions. */
-    public UnaryCallSettings.Builder
-        testIamPermissionsSettings() {
-      return getStubSettingsBuilder().testIamPermissionsSettings();
-    }
-
     /** Returns the builder for the settings used for calls to updateFinding. */
     public UnaryCallSettings.Builder updateFindingSettings() {
       return getStubSettingsBuilder().updateFindingSettings();
diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/package-info.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/package-info.java
index 8c5839023..9f504764d 100644
--- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/package-info.java
+++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/package-info.java
@@ -28,9 +28,8 @@
  * 
  * 
  * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
- *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- *   Source source = Source.newBuilder().build();
- *   Source response = securityCenterClient.createSource(parent, source);
+ *   ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
+ *   Policy response = securityCenterClient.getIamPolicy(resource);
  * }
  * 
  * 
diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java index 749feffa8..8850c98cd 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java @@ -81,6 +81,42 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcSecurityCenterStub extends SecurityCenterStub { + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + private static final MethodDescriptor + groupAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GroupAssets") + .setRequestMarshaller(ProtoUtils.marshaller(GroupAssetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GroupAssetsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + groupFindingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GroupFindings") + .setRequestMarshaller( + ProtoUtils.marshaller(GroupFindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GroupFindingsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); private static final MethodDescriptor createSourceMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -97,13 +133,6 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { ProtoUtils.marshaller(CreateFindingRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Finding.getDefaultInstance())) .build(); - private static final MethodDescriptor getIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .build(); private static final MethodDescriptor getOrganizationSettingsMethodDescriptor = MethodDescriptor.newBuilder() @@ -122,25 +151,6 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { .setRequestMarshaller(ProtoUtils.marshaller(GetSourceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Source.getDefaultInstance())) .build(); - private static final MethodDescriptor - groupAssetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GroupAssets") - .setRequestMarshaller(ProtoUtils.marshaller(GroupAssetsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(GroupAssetsResponse.getDefaultInstance())) - .build(); - private static final MethodDescriptor - groupFindingsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/GroupFindings") - .setRequestMarshaller( - ProtoUtils.marshaller(GroupFindingsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(GroupFindingsResponse.getDefaultInstance())) - .build(); private static final MethodDescriptor listAssetsMethodDescriptor = MethodDescriptor.newBuilder() @@ -192,16 +202,6 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) .build(); - private static final MethodDescriptor - testIamPermissionsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.securitycenter.v1.SecurityCenter/TestIamPermissions") - .setRequestMarshaller( - ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) - .build(); private static final MethodDescriptor updateFindingMethodDescriptor = MethodDescriptor.newBuilder() @@ -243,18 +243,20 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; - private final UnaryCallable createSourceCallable; - private final UnaryCallable createFindingCallable; private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable - getOrganizationSettingsCallable; - private final UnaryCallable getSourceCallable; private final UnaryCallable groupAssetsCallable; private final UnaryCallable groupAssetsPagedCallable; private final UnaryCallable groupFindingsCallable; private final UnaryCallable groupFindingsPagedCallable; + private final UnaryCallable + testIamPermissionsCallable; + private final UnaryCallable createSourceCallable; + private final UnaryCallable createFindingCallable; + private final UnaryCallable + getOrganizationSettingsCallable; + private final UnaryCallable getSourceCallable; private final UnaryCallable listAssetsCallable; private final UnaryCallable listAssetsPagedCallable; private final UnaryCallable listFindingsCallable; @@ -268,8 +270,6 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { runAssetDiscoveryOperationCallable; private final UnaryCallable setFindingStateCallable; private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; private final UnaryCallable updateFindingCallable; private final UnaryCallable updateOrganizationSettingsCallable; @@ -319,6 +319,59 @@ protected GrpcSecurityCenterStub( this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) + .build(); + GrpcCallSettings groupAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(groupAssetsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GroupAssetsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings groupFindingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(groupFindingsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GroupFindingsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(TestIamPermissionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) + .build(); GrpcCallSettings createSourceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createSourceMethodDescriptor) @@ -345,19 +398,6 @@ public Map extract(CreateFindingRequest request) { } }) .build(); - GrpcCallSettings getIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetIamPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } - }) - .build(); GrpcCallSettings getOrganizationSettingsTransportSettings = GrpcCallSettings.newBuilder() @@ -385,32 +425,6 @@ public Map extract(GetSourceRequest request) { } }) .build(); - GrpcCallSettings groupAssetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(groupAssetsMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GroupAssetsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings groupFindingsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(groupFindingsMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GroupFindingsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); GrpcCallSettings listAssetsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listAssetsMethodDescriptor) @@ -489,20 +503,6 @@ public Map extract(SetIamPolicyRequest request) { } }) .build(); - GrpcCallSettings - testIamPermissionsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(TestIamPermissionsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - } - }) - .build(); GrpcCallSettings updateFindingTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateFindingMethodDescriptor) @@ -563,23 +563,9 @@ public Map extract(UpdateSecurityMarksRequest request) { }) .build(); - this.createSourceCallable = - callableFactory.createUnaryCallable( - createSourceTransportSettings, settings.createSourceSettings(), clientContext); - this.createFindingCallable = - callableFactory.createUnaryCallable( - createFindingTransportSettings, settings.createFindingSettings(), clientContext); this.getIamPolicyCallable = callableFactory.createUnaryCallable( getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.getOrganizationSettingsCallable = - callableFactory.createUnaryCallable( - getOrganizationSettingsTransportSettings, - settings.getOrganizationSettingsSettings(), - clientContext); - this.getSourceCallable = - callableFactory.createUnaryCallable( - getSourceTransportSettings, settings.getSourceSettings(), clientContext); this.groupAssetsCallable = callableFactory.createUnaryCallable( groupAssetsTransportSettings, settings.groupAssetsSettings(), clientContext); @@ -592,6 +578,25 @@ public Map extract(UpdateSecurityMarksRequest request) { this.groupFindingsPagedCallable = callableFactory.createPagedCallable( groupFindingsTransportSettings, settings.groupFindingsSettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + this.createSourceCallable = + callableFactory.createUnaryCallable( + createSourceTransportSettings, settings.createSourceSettings(), clientContext); + this.createFindingCallable = + callableFactory.createUnaryCallable( + createFindingTransportSettings, settings.createFindingSettings(), clientContext); + this.getOrganizationSettingsCallable = + callableFactory.createUnaryCallable( + getOrganizationSettingsTransportSettings, + settings.getOrganizationSettingsSettings(), + clientContext); + this.getSourceCallable = + callableFactory.createUnaryCallable( + getSourceTransportSettings, settings.getSourceSettings(), clientContext); this.listAssetsCallable = callableFactory.createUnaryCallable( listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); @@ -627,11 +632,6 @@ public Map extract(UpdateSecurityMarksRequest request) { this.setIamPolicyCallable = callableFactory.createUnaryCallable( setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); this.updateFindingCallable = callableFactory.createUnaryCallable( updateFindingTransportSettings, settings.updateFindingSettings(), clientContext); @@ -657,27 +657,10 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } - public UnaryCallable createSourceCallable() { - return createSourceCallable; - } - - public UnaryCallable createFindingCallable() { - return createFindingCallable; - } - public UnaryCallable getIamPolicyCallable() { return getIamPolicyCallable; } - public UnaryCallable - getOrganizationSettingsCallable() { - return getOrganizationSettingsCallable; - } - - public UnaryCallable getSourceCallable() { - return getSourceCallable; - } - public UnaryCallable groupAssetsPagedCallable() { return groupAssetsPagedCallable; } @@ -695,6 +678,28 @@ public UnaryCallable groupFindingsC return groupFindingsCallable; } + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + public UnaryCallable createSourceCallable() { + return createSourceCallable; + } + + public UnaryCallable createFindingCallable() { + return createFindingCallable; + } + + public UnaryCallable + getOrganizationSettingsCallable() { + return getOrganizationSettingsCallable; + } + + public UnaryCallable getSourceCallable() { + return getSourceCallable; + } + public UnaryCallable listAssetsPagedCallable() { return listAssetsPagedCallable; } @@ -737,11 +742,6 @@ public UnaryCallable setIamPolicyCallable() { return setIamPolicyCallable; } - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - public UnaryCallable updateFindingCallable() { return updateFindingCallable; } diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java index e7573bef8..229d434e0 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java @@ -75,27 +75,10 @@ public OperationsStub getOperationsStub() { throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); } - public UnaryCallable createSourceCallable() { - throw new UnsupportedOperationException("Not implemented: createSourceCallable()"); - } - - public UnaryCallable createFindingCallable() { - throw new UnsupportedOperationException("Not implemented: createFindingCallable()"); - } - public UnaryCallable getIamPolicyCallable() { throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); } - public UnaryCallable - getOrganizationSettingsCallable() { - throw new UnsupportedOperationException("Not implemented: getOrganizationSettingsCallable()"); - } - - public UnaryCallable getSourceCallable() { - throw new UnsupportedOperationException("Not implemented: getSourceCallable()"); - } - public UnaryCallable groupAssetsPagedCallable() { throw new UnsupportedOperationException("Not implemented: groupAssetsPagedCallable()"); } @@ -113,6 +96,28 @@ public UnaryCallable groupFindingsC throw new UnsupportedOperationException("Not implemented: groupFindingsCallable()"); } + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + public UnaryCallable createSourceCallable() { + throw new UnsupportedOperationException("Not implemented: createSourceCallable()"); + } + + public UnaryCallable createFindingCallable() { + throw new UnsupportedOperationException("Not implemented: createFindingCallable()"); + } + + public UnaryCallable + getOrganizationSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: getOrganizationSettingsCallable()"); + } + + public UnaryCallable getSourceCallable() { + throw new UnsupportedOperationException("Not implemented: getSourceCallable()"); + } + public UnaryCallable listAssetsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listAssetsPagedCallable()"); } @@ -156,11 +161,6 @@ public UnaryCallable setIamPolicyCallable() { throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); } - public UnaryCallable - testIamPermissionsCallable() { - throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); - } - public UnaryCallable updateFindingCallable() { throw new UnsupportedOperationException("Not implemented: updateFindingCallable()"); } diff --git a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java index 7fb60e19d..173713fae 100644 --- a/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java +++ b/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java @@ -105,16 +105,16 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createSource to 30 seconds: + *

For example, to set the total timeout of getIamPolicy to 30 seconds: * *

  * 
  * SecurityCenterStubSettings.Builder securityCenterSettingsBuilder =
  *     SecurityCenterStubSettings.newBuilder();
  * securityCenterSettingsBuilder
- *     .createSourceSettings()
+ *     .getIamPolicySettings()
  *     .setRetrySettings(
- *         securityCenterSettingsBuilder.createSourceSettings().getRetrySettings().toBuilder()
+ *         securityCenterSettingsBuilder.getIamPolicySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * SecurityCenterStubSettings securityCenterSettings = securityCenterSettingsBuilder.build();
@@ -128,17 +128,19 @@ public class SecurityCenterStubSettings extends StubSettings DEFAULT_SERVICE_SCOPES =
       ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
 
-  private final UnaryCallSettings createSourceSettings;
-  private final UnaryCallSettings createFindingSettings;
   private final UnaryCallSettings getIamPolicySettings;
-  private final UnaryCallSettings
-      getOrganizationSettingsSettings;
-  private final UnaryCallSettings getSourceSettings;
   private final PagedCallSettings
       groupAssetsSettings;
   private final PagedCallSettings<
           GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse>
       groupFindingsSettings;
+  private final UnaryCallSettings
+      testIamPermissionsSettings;
+  private final UnaryCallSettings createSourceSettings;
+  private final UnaryCallSettings createFindingSettings;
+  private final UnaryCallSettings
+      getOrganizationSettingsSettings;
+  private final UnaryCallSettings getSourceSettings;
   private final PagedCallSettings
       listAssetsSettings;
   private final PagedCallSettings<
@@ -151,8 +153,6 @@ public class SecurityCenterStubSettings extends StubSettings setFindingStateSettings;
   private final UnaryCallSettings setIamPolicySettings;
-  private final UnaryCallSettings
-      testIamPermissionsSettings;
   private final UnaryCallSettings updateFindingSettings;
   private final UnaryCallSettings
       updateOrganizationSettingsSettings;
@@ -160,6 +160,29 @@ public class SecurityCenterStubSettings extends StubSettings
       updateSecurityMarksSettings;
 
+  /** Returns the object with the settings used for calls to getIamPolicy. */
+  public UnaryCallSettings getIamPolicySettings() {
+    return getIamPolicySettings;
+  }
+
+  /** Returns the object with the settings used for calls to groupAssets. */
+  public PagedCallSettings
+      groupAssetsSettings() {
+    return groupAssetsSettings;
+  }
+
+  /** Returns the object with the settings used for calls to groupFindings. */
+  public PagedCallSettings
+      groupFindingsSettings() {
+    return groupFindingsSettings;
+  }
+
+  /** Returns the object with the settings used for calls to testIamPermissions. */
+  public UnaryCallSettings
+      testIamPermissionsSettings() {
+    return testIamPermissionsSettings;
+  }
+
   /** Returns the object with the settings used for calls to createSource. */
   public UnaryCallSettings createSourceSettings() {
     return createSourceSettings;
@@ -170,11 +193,6 @@ public UnaryCallSettings createFindingSettings()
     return createFindingSettings;
   }
 
-  /** Returns the object with the settings used for calls to getIamPolicy. */
-  public UnaryCallSettings getIamPolicySettings() {
-    return getIamPolicySettings;
-  }
-
   /** Returns the object with the settings used for calls to getOrganizationSettings. */
   public UnaryCallSettings
       getOrganizationSettingsSettings() {
@@ -186,18 +204,6 @@ public UnaryCallSettings getSourceSettings() {
     return getSourceSettings;
   }
 
-  /** Returns the object with the settings used for calls to groupAssets. */
-  public PagedCallSettings
-      groupAssetsSettings() {
-    return groupAssetsSettings;
-  }
-
-  /** Returns the object with the settings used for calls to groupFindings. */
-  public PagedCallSettings
-      groupFindingsSettings() {
-    return groupFindingsSettings;
-  }
-
   /** Returns the object with the settings used for calls to listAssets. */
   public PagedCallSettings
       listAssetsSettings() {
@@ -238,12 +244,6 @@ public UnaryCallSettings setIamPolicySettings() {
     return setIamPolicySettings;
   }
 
-  /** Returns the object with the settings used for calls to testIamPermissions. */
-  public UnaryCallSettings
-      testIamPermissionsSettings() {
-    return testIamPermissionsSettings;
-  }
-
   /** Returns the object with the settings used for calls to updateFinding. */
   public UnaryCallSettings updateFindingSettings() {
     return updateFindingSettings;
@@ -335,13 +335,14 @@ public Builder toBuilder() {
   protected SecurityCenterStubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
+    getIamPolicySettings = settingsBuilder.getIamPolicySettings().build();
+    groupAssetsSettings = settingsBuilder.groupAssetsSettings().build();
+    groupFindingsSettings = settingsBuilder.groupFindingsSettings().build();
+    testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
     createSourceSettings = settingsBuilder.createSourceSettings().build();
     createFindingSettings = settingsBuilder.createFindingSettings().build();
-    getIamPolicySettings = settingsBuilder.getIamPolicySettings().build();
     getOrganizationSettingsSettings = settingsBuilder.getOrganizationSettingsSettings().build();
     getSourceSettings = settingsBuilder.getSourceSettings().build();
-    groupAssetsSettings = settingsBuilder.groupAssetsSettings().build();
-    groupFindingsSettings = settingsBuilder.groupFindingsSettings().build();
     listAssetsSettings = settingsBuilder.listAssetsSettings().build();
     listFindingsSettings = settingsBuilder.listFindingsSettings().build();
     listSourcesSettings = settingsBuilder.listSourcesSettings().build();
@@ -350,7 +351,6 @@ protected SecurityCenterStubSettings(Builder settingsBuilder) throws IOException
         settingsBuilder.runAssetDiscoveryOperationSettings().build();
     setFindingStateSettings = settingsBuilder.setFindingStateSettings().build();
     setIamPolicySettings = settingsBuilder.setIamPolicySettings().build();
-    testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
     updateFindingSettings = settingsBuilder.updateFindingSettings().build();
     updateOrganizationSettingsSettings =
         settingsBuilder.updateOrganizationSettingsSettings().build();
@@ -641,18 +641,20 @@ public ApiFuture getFuturePagedResponse(
   public static class Builder extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
 
-    private final UnaryCallSettings.Builder createSourceSettings;
-    private final UnaryCallSettings.Builder createFindingSettings;
     private final UnaryCallSettings.Builder getIamPolicySettings;
-    private final UnaryCallSettings.Builder
-        getOrganizationSettingsSettings;
-    private final UnaryCallSettings.Builder getSourceSettings;
     private final PagedCallSettings.Builder<
             GroupAssetsRequest, GroupAssetsResponse, GroupAssetsPagedResponse>
         groupAssetsSettings;
     private final PagedCallSettings.Builder<
             GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse>
         groupFindingsSettings;
+    private final UnaryCallSettings.Builder
+        testIamPermissionsSettings;
+    private final UnaryCallSettings.Builder createSourceSettings;
+    private final UnaryCallSettings.Builder createFindingSettings;
+    private final UnaryCallSettings.Builder
+        getOrganizationSettingsSettings;
+    private final UnaryCallSettings.Builder getSourceSettings;
     private final PagedCallSettings.Builder<
             ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse>
         listAssetsSettings;
@@ -670,8 +672,6 @@ public static class Builder extends StubSettings.Builder
         setFindingStateSettings;
     private final UnaryCallSettings.Builder setIamPolicySettings;
-    private final UnaryCallSettings.Builder
-        testIamPermissionsSettings;
     private final UnaryCallSettings.Builder updateFindingSettings;
     private final UnaryCallSettings.Builder
         updateOrganizationSettingsSettings;
@@ -704,9 +704,9 @@ public static class Builder extends StubSettings.Builder>of(
+              getIamPolicySettings,
+              groupAssetsSettings,
+              groupFindingsSettings,
+              testIamPermissionsSettings,
               createSourceSettings,
               createFindingSettings,
-              getIamPolicySettings,
               getOrganizationSettingsSettings,
               getSourceSettings,
-              groupAssetsSettings,
-              groupFindingsSettings,
               listAssetsSettings,
               listFindingsSettings,
               listSourcesSettings,
               runAssetDiscoverySettings,
               setFindingStateSettings,
               setIamPolicySettings,
-              testIamPermissionsSettings,
               updateFindingSettings,
               updateOrganizationSettingsSettings,
               updateSourceSettings,
@@ -794,38 +794,43 @@ private static Builder createDefault() {
     private static Builder initDefaults(Builder builder) {
 
       builder
-          .createSourceSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .getIamPolicySettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .createFindingSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .groupAssetsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .getIamPolicySettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .groupFindingsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .getOrganizationSettingsSettings()
+          .testIamPermissionsSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .getSourceSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .createSourceSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .groupAssetsSettings()
+          .createFindingSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .groupFindingsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .getOrganizationSettingsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .getSourceSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
@@ -858,11 +863,6 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
-      builder
-          .testIamPermissionsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
       builder
           .updateFindingSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
@@ -913,13 +913,14 @@ private static Builder initDefaults(Builder builder) {
     protected Builder(SecurityCenterStubSettings settings) {
       super(settings);
 
+      getIamPolicySettings = settings.getIamPolicySettings.toBuilder();
+      groupAssetsSettings = settings.groupAssetsSettings.toBuilder();
+      groupFindingsSettings = settings.groupFindingsSettings.toBuilder();
+      testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder();
       createSourceSettings = settings.createSourceSettings.toBuilder();
       createFindingSettings = settings.createFindingSettings.toBuilder();
-      getIamPolicySettings = settings.getIamPolicySettings.toBuilder();
       getOrganizationSettingsSettings = settings.getOrganizationSettingsSettings.toBuilder();
       getSourceSettings = settings.getSourceSettings.toBuilder();
-      groupAssetsSettings = settings.groupAssetsSettings.toBuilder();
-      groupFindingsSettings = settings.groupFindingsSettings.toBuilder();
       listAssetsSettings = settings.listAssetsSettings.toBuilder();
       listFindingsSettings = settings.listFindingsSettings.toBuilder();
       listSourcesSettings = settings.listSourcesSettings.toBuilder();
@@ -927,7 +928,6 @@ protected Builder(SecurityCenterStubSettings settings) {
       runAssetDiscoveryOperationSettings = settings.runAssetDiscoveryOperationSettings.toBuilder();
       setFindingStateSettings = settings.setFindingStateSettings.toBuilder();
       setIamPolicySettings = settings.setIamPolicySettings.toBuilder();
-      testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder();
       updateFindingSettings = settings.updateFindingSettings.toBuilder();
       updateOrganizationSettingsSettings = settings.updateOrganizationSettingsSettings.toBuilder();
       updateSourceSettings = settings.updateSourceSettings.toBuilder();
@@ -935,20 +935,20 @@ protected Builder(SecurityCenterStubSettings settings) {
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              getIamPolicySettings,
+              groupAssetsSettings,
+              groupFindingsSettings,
+              testIamPermissionsSettings,
               createSourceSettings,
               createFindingSettings,
-              getIamPolicySettings,
               getOrganizationSettingsSettings,
               getSourceSettings,
-              groupAssetsSettings,
-              groupFindingsSettings,
               listAssetsSettings,
               listFindingsSettings,
               listSourcesSettings,
               runAssetDiscoverySettings,
               setFindingStateSettings,
               setIamPolicySettings,
-              testIamPermissionsSettings,
               updateFindingSettings,
               updateOrganizationSettingsSettings,
               updateSourceSettings,
@@ -971,6 +971,31 @@ public Builder applyToAllUnaryMethods(
       return unaryMethodSettingsBuilders;
     }
 
+    /** Returns the builder for the settings used for calls to getIamPolicy. */
+    public UnaryCallSettings.Builder getIamPolicySettings() {
+      return getIamPolicySettings;
+    }
+
+    /** Returns the builder for the settings used for calls to groupAssets. */
+    public PagedCallSettings.Builder<
+            GroupAssetsRequest, GroupAssetsResponse, GroupAssetsPagedResponse>
+        groupAssetsSettings() {
+      return groupAssetsSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to groupFindings. */
+    public PagedCallSettings.Builder<
+            GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse>
+        groupFindingsSettings() {
+      return groupFindingsSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to testIamPermissions. */
+    public UnaryCallSettings.Builder
+        testIamPermissionsSettings() {
+      return testIamPermissionsSettings;
+    }
+
     /** Returns the builder for the settings used for calls to createSource. */
     public UnaryCallSettings.Builder createSourceSettings() {
       return createSourceSettings;
@@ -981,11 +1006,6 @@ public UnaryCallSettings.Builder createFindingSet
       return createFindingSettings;
     }
 
-    /** Returns the builder for the settings used for calls to getIamPolicy. */
-    public UnaryCallSettings.Builder getIamPolicySettings() {
-      return getIamPolicySettings;
-    }
-
     /** Returns the builder for the settings used for calls to getOrganizationSettings. */
     public UnaryCallSettings.Builder
         getOrganizationSettingsSettings() {
@@ -997,20 +1017,6 @@ public UnaryCallSettings.Builder getSourceSettings() {
       return getSourceSettings;
     }
 
-    /** Returns the builder for the settings used for calls to groupAssets. */
-    public PagedCallSettings.Builder<
-            GroupAssetsRequest, GroupAssetsResponse, GroupAssetsPagedResponse>
-        groupAssetsSettings() {
-      return groupAssetsSettings;
-    }
-
-    /** Returns the builder for the settings used for calls to groupFindings. */
-    public PagedCallSettings.Builder<
-            GroupFindingsRequest, GroupFindingsResponse, GroupFindingsPagedResponse>
-        groupFindingsSettings() {
-      return groupFindingsSettings;
-    }
-
     /** Returns the builder for the settings used for calls to listAssets. */
     public PagedCallSettings.Builder
         listAssetsSettings() {
@@ -1055,12 +1061,6 @@ public UnaryCallSettings.Builder setIamPolicySettin
       return setIamPolicySettings;
     }
 
-    /** Returns the builder for the settings used for calls to testIamPermissions. */
-    public UnaryCallSettings.Builder
-        testIamPermissionsSettings() {
-      return testIamPermissionsSettings;
-    }
-
     /** Returns the builder for the settings used for calls to updateFinding. */
     public UnaryCallSettings.Builder updateFindingSettings() {
       return updateFindingSettings;
diff --git a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java
index 032b04094..ffd32e482 100644
--- a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java
+++ b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java
@@ -97,30 +97,76 @@ public void tearDown() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void createSourceTest() {
-    SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-    String displayName = "displayName1615086568";
-    String description = "description-1724546052";
-    Source expectedResponse =
-        Source.newBuilder()
-            .setName(name.toString())
-            .setDisplayName(displayName)
-            .setDescription(description)
+  public void getIamPolicyTest() {
+    int version = 351608024;
+    ByteString etag = ByteString.copyFromUtf8("21");
+    Policy expectedResponse = Policy.newBuilder().setVersion(version).setEtag(etag).build();
+    mockSecurityCenter.addResponse(expectedResponse);
+
+    ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
+
+    Policy actualResponse = client.getIamPolicy(resource);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockSecurityCenter.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    GetIamPolicyRequest actualRequest = (GetIamPolicyRequest) actualRequests.get(0);
+
+    Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource()));
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void getIamPolicyExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockSecurityCenter.addException(exception);
+
+    try {
+      ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
+
+      client.getIamPolicy(resource);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void groupAssetsTest() {
+    String nextPageToken = "";
+    int totalSize = 705419236;
+    GroupResult groupByResultsElement = GroupResult.newBuilder().build();
+    List groupByResults = Arrays.asList(groupByResultsElement);
+    GroupAssetsResponse expectedResponse =
+        GroupAssetsResponse.newBuilder()
+            .setNextPageToken(nextPageToken)
+            .setTotalSize(totalSize)
+            .addAllGroupByResults(groupByResults)
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
     OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-    Source source = Source.newBuilder().build();
+    String groupBy = "groupBy506361367";
+    GroupAssetsRequest request =
+        GroupAssetsRequest.newBuilder().setParent(parent.toString()).setGroupBy(groupBy).build();
 
-    Source actualResponse = client.createSource(parent, source);
-    Assert.assertEquals(expectedResponse, actualResponse);
+    GroupAssetsPagedResponse pagedListResponse = client.groupAssets(request);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getGroupByResultsList().get(0), resources.get(0));
 
     List actualRequests = mockSecurityCenter.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    CreateSourceRequest actualRequest = (CreateSourceRequest) actualRequests.get(0);
+    GroupAssetsRequest actualRequest = (GroupAssetsRequest) actualRequests.get(0);
 
     Assert.assertEquals(parent, OrganizationName.parse(actualRequest.getParent()));
-    Assert.assertEquals(source, actualRequest.getSource());
+    Assert.assertEquals(groupBy, actualRequest.getGroupBy());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -129,15 +175,17 @@ public void createSourceTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void createSourceExceptionTest() throws Exception {
+  public void groupAssetsExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockSecurityCenter.addException(exception);
 
     try {
       OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-      Source source = Source.newBuilder().build();
+      String groupBy = "groupBy506361367";
+      GroupAssetsRequest request =
+          GroupAssetsRequest.newBuilder().setParent(parent.toString()).setGroupBy(groupBy).build();
 
-      client.createSource(parent, source);
+      client.groupAssets(request);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -146,36 +194,34 @@ public void createSourceExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void createFindingTest() {
-    FindingName name = FindingName.of("[ORGANIZATION]", "[SOURCE]", "[FINDING]");
-    String parent2 = "parent21175163357";
-    String resourceName = "resourceName979421212";
-    String category = "category50511102";
-    String externalUri = "externalUri-1385596168";
-    Finding expectedResponse =
-        Finding.newBuilder()
-            .setName(name.toString())
-            .setParent(parent2)
-            .setResourceName(resourceName)
-            .setCategory(category)
-            .setExternalUri(externalUri)
+  public void groupFindingsTest() {
+    String nextPageToken = "";
+    int totalSize = 705419236;
+    GroupResult groupByResultsElement = GroupResult.newBuilder().build();
+    List groupByResults = Arrays.asList(groupByResultsElement);
+    GroupFindingsResponse expectedResponse =
+        GroupFindingsResponse.newBuilder()
+            .setNextPageToken(nextPageToken)
+            .setTotalSize(totalSize)
+            .addAllGroupByResults(groupByResults)
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
     SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-    String findingId = "findingId728776081";
-    Finding finding = Finding.newBuilder().build();
+    String groupBy = "groupBy506361367";
 
-    Finding actualResponse = client.createFinding(parent, findingId, finding);
-    Assert.assertEquals(expectedResponse, actualResponse);
+    GroupFindingsPagedResponse pagedListResponse = client.groupFindings(parent, groupBy);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getGroupByResultsList().get(0), resources.get(0));
 
     List actualRequests = mockSecurityCenter.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    CreateFindingRequest actualRequest = (CreateFindingRequest) actualRequests.get(0);
+    GroupFindingsRequest actualRequest = (GroupFindingsRequest) actualRequests.get(0);
 
     Assert.assertEquals(parent, SourceName.parse(actualRequest.getParent()));
-    Assert.assertEquals(findingId, actualRequest.getFindingId());
-    Assert.assertEquals(finding, actualRequest.getFinding());
+    Assert.assertEquals(groupBy, actualRequest.getGroupBy());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -184,16 +230,15 @@ public void createFindingTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void createFindingExceptionTest() throws Exception {
+  public void groupFindingsExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockSecurityCenter.addException(exception);
 
     try {
       SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-      String findingId = "findingId728776081";
-      Finding finding = Finding.newBuilder().build();
+      String groupBy = "groupBy506361367";
 
-      client.createFinding(parent, findingId, finding);
+      client.groupFindings(parent, groupBy);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -202,22 +247,22 @@ public void createFindingExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void getIamPolicyTest() {
-    int version = 351608024;
-    ByteString etag = ByteString.copyFromUtf8("21");
-    Policy expectedResponse = Policy.newBuilder().setVersion(version).setEtag(etag).build();
+  public void testIamPermissionsTest() {
+    TestIamPermissionsResponse expectedResponse = TestIamPermissionsResponse.newBuilder().build();
     mockSecurityCenter.addResponse(expectedResponse);
 
     ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
+    List permissions = new ArrayList<>();
 
-    Policy actualResponse = client.getIamPolicy(resource);
+    TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockSecurityCenter.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    GetIamPolicyRequest actualRequest = (GetIamPolicyRequest) actualRequests.get(0);
+    TestIamPermissionsRequest actualRequest = (TestIamPermissionsRequest) actualRequests.get(0);
 
     Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource()));
+    Assert.assertEquals(permissions, actualRequest.getPermissionsList());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -226,14 +271,15 @@ public void getIamPolicyTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void getIamPolicyExceptionTest() throws Exception {
+  public void testIamPermissionsExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockSecurityCenter.addException(exception);
 
     try {
       ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
+      List permissions = new ArrayList<>();
 
-      client.getIamPolicy(resource);
+      client.testIamPermissions(resource, permissions);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -242,27 +288,30 @@ public void getIamPolicyExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void getOrganizationSettingsTest() {
-    OrganizationSettingsName name2 = OrganizationSettingsName.of("[ORGANIZATION]");
-    boolean enableAssetDiscovery = false;
-    OrganizationSettings expectedResponse =
-        OrganizationSettings.newBuilder()
-            .setName(name2.toString())
-            .setEnableAssetDiscovery(enableAssetDiscovery)
+  public void createSourceTest() {
+    SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+    String displayName = "displayName1615086568";
+    String description = "description-1724546052";
+    Source expectedResponse =
+        Source.newBuilder()
+            .setName(name.toString())
+            .setDisplayName(displayName)
+            .setDescription(description)
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
+    OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+    Source source = Source.newBuilder().build();
 
-    OrganizationSettings actualResponse = client.getOrganizationSettings(name);
+    Source actualResponse = client.createSource(parent, source);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockSecurityCenter.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    GetOrganizationSettingsRequest actualRequest =
-        (GetOrganizationSettingsRequest) actualRequests.get(0);
+    CreateSourceRequest actualRequest = (CreateSourceRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, OrganizationSettingsName.parse(actualRequest.getName()));
+    Assert.assertEquals(parent, OrganizationName.parse(actualRequest.getParent()));
+    Assert.assertEquals(source, actualRequest.getSource());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -271,14 +320,15 @@ public void getOrganizationSettingsTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void getOrganizationSettingsExceptionTest() throws Exception {
+  public void createSourceExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockSecurityCenter.addException(exception);
 
     try {
-      OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
+      OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+      Source source = Source.newBuilder().build();
 
-      client.getOrganizationSettings(name);
+      client.createSource(parent, source);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -287,28 +337,36 @@ public void getOrganizationSettingsExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void getSourceTest() {
-    SourceName name2 = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-    String displayName = "displayName1615086568";
-    String description = "description-1724546052";
-    Source expectedResponse =
-        Source.newBuilder()
-            .setName(name2.toString())
-            .setDisplayName(displayName)
-            .setDescription(description)
+  public void createFindingTest() {
+    FindingName name = FindingName.of("[ORGANIZATION]", "[SOURCE]", "[FINDING]");
+    String parent2 = "parent21175163357";
+    String resourceName = "resourceName979421212";
+    String category = "category50511102";
+    String externalUri = "externalUri-1385596168";
+    Finding expectedResponse =
+        Finding.newBuilder()
+            .setName(name.toString())
+            .setParent(parent2)
+            .setResourceName(resourceName)
+            .setCategory(category)
+            .setExternalUri(externalUri)
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+    SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+    String findingId = "findingId728776081";
+    Finding finding = Finding.newBuilder().build();
 
-    Source actualResponse = client.getSource(name);
+    Finding actualResponse = client.createFinding(parent, findingId, finding);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockSecurityCenter.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    GetSourceRequest actualRequest = (GetSourceRequest) actualRequests.get(0);
+    CreateFindingRequest actualRequest = (CreateFindingRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, SourceName.parse(actualRequest.getName()));
+    Assert.assertEquals(parent, SourceName.parse(actualRequest.getParent()));
+    Assert.assertEquals(findingId, actualRequest.getFindingId());
+    Assert.assertEquals(finding, actualRequest.getFinding());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -317,14 +375,16 @@ public void getSourceTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void getSourceExceptionTest() throws Exception {
+  public void createFindingExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockSecurityCenter.addException(exception);
 
     try {
-      SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+      SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+      String findingId = "findingId728776081";
+      Finding finding = Finding.newBuilder().build();
 
-      client.getSource(name);
+      client.createFinding(parent, findingId, finding);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -333,36 +393,27 @@ public void getSourceExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void groupAssetsTest() {
-    String nextPageToken = "";
-    int totalSize = 705419236;
-    GroupResult groupByResultsElement = GroupResult.newBuilder().build();
-    List groupByResults = Arrays.asList(groupByResultsElement);
-    GroupAssetsResponse expectedResponse =
-        GroupAssetsResponse.newBuilder()
-            .setNextPageToken(nextPageToken)
-            .setTotalSize(totalSize)
-            .addAllGroupByResults(groupByResults)
+  public void getOrganizationSettingsTest() {
+    OrganizationSettingsName name2 = OrganizationSettingsName.of("[ORGANIZATION]");
+    boolean enableAssetDiscovery = false;
+    OrganizationSettings expectedResponse =
+        OrganizationSettings.newBuilder()
+            .setName(name2.toString())
+            .setEnableAssetDiscovery(enableAssetDiscovery)
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-    String groupBy = "groupBy506361367";
-    GroupAssetsRequest request =
-        GroupAssetsRequest.newBuilder().setParent(parent.toString()).setGroupBy(groupBy).build();
-
-    GroupAssetsPagedResponse pagedListResponse = client.groupAssets(request);
+    OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
 
-    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
-    Assert.assertEquals(1, resources.size());
-    Assert.assertEquals(expectedResponse.getGroupByResultsList().get(0), resources.get(0));
+    OrganizationSettings actualResponse = client.getOrganizationSettings(name);
+    Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockSecurityCenter.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    GroupAssetsRequest actualRequest = (GroupAssetsRequest) actualRequests.get(0);
+    GetOrganizationSettingsRequest actualRequest =
+        (GetOrganizationSettingsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(parent, OrganizationName.parse(actualRequest.getParent()));
-    Assert.assertEquals(groupBy, actualRequest.getGroupBy());
+    Assert.assertEquals(name, OrganizationSettingsName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -371,17 +422,14 @@ public void groupAssetsTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void groupAssetsExceptionTest() throws Exception {
+  public void getOrganizationSettingsExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockSecurityCenter.addException(exception);
 
     try {
-      OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-      String groupBy = "groupBy506361367";
-      GroupAssetsRequest request =
-          GroupAssetsRequest.newBuilder().setParent(parent.toString()).setGroupBy(groupBy).build();
+      OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
 
-      client.groupAssets(request);
+      client.getOrganizationSettings(name);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -390,34 +438,28 @@ public void groupAssetsExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void groupFindingsTest() {
-    String nextPageToken = "";
-    int totalSize = 705419236;
-    GroupResult groupByResultsElement = GroupResult.newBuilder().build();
-    List groupByResults = Arrays.asList(groupByResultsElement);
-    GroupFindingsResponse expectedResponse =
-        GroupFindingsResponse.newBuilder()
-            .setNextPageToken(nextPageToken)
-            .setTotalSize(totalSize)
-            .addAllGroupByResults(groupByResults)
+  public void getSourceTest() {
+    SourceName name2 = SourceName.of("[ORGANIZATION]", "[SOURCE]");
+    String displayName = "displayName1615086568";
+    String description = "description-1724546052";
+    Source expectedResponse =
+        Source.newBuilder()
+            .setName(name2.toString())
+            .setDisplayName(displayName)
+            .setDescription(description)
             .build();
     mockSecurityCenter.addResponse(expectedResponse);
 
-    SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-    String groupBy = "groupBy506361367";
-
-    GroupFindingsPagedResponse pagedListResponse = client.groupFindings(parent, groupBy);
+    SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
 
-    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
-    Assert.assertEquals(1, resources.size());
-    Assert.assertEquals(expectedResponse.getGroupByResultsList().get(0), resources.get(0));
+    Source actualResponse = client.getSource(name);
+    Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockSecurityCenter.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    GroupFindingsRequest actualRequest = (GroupFindingsRequest) actualRequests.get(0);
+    GetSourceRequest actualRequest = (GetSourceRequest) actualRequests.get(0);
 
-    Assert.assertEquals(parent, SourceName.parse(actualRequest.getParent()));
-    Assert.assertEquals(groupBy, actualRequest.getGroupBy());
+    Assert.assertEquals(name, SourceName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -426,15 +468,14 @@ public void groupFindingsTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void groupFindingsExceptionTest() throws Exception {
+  public void getSourceExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockSecurityCenter.addException(exception);
 
     try {
-      SourceName parent = SourceName.of("[ORGANIZATION]", "[SOURCE]");
-      String groupBy = "groupBy506361367";
+      SourceName name = SourceName.of("[ORGANIZATION]", "[SOURCE]");
 
-      client.groupFindings(parent, groupBy);
+      client.getSource(name);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -747,47 +788,6 @@ public void setIamPolicyExceptionTest() throws Exception {
     }
   }
 
-  @Test
-  @SuppressWarnings("all")
-  public void testIamPermissionsTest() {
-    TestIamPermissionsResponse expectedResponse = TestIamPermissionsResponse.newBuilder().build();
-    mockSecurityCenter.addResponse(expectedResponse);
-
-    ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
-    List permissions = new ArrayList<>();
-
-    TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions);
-    Assert.assertEquals(expectedResponse, actualResponse);
-
-    List actualRequests = mockSecurityCenter.getRequests();
-    Assert.assertEquals(1, actualRequests.size());
-    TestIamPermissionsRequest actualRequest = (TestIamPermissionsRequest) actualRequests.get(0);
-
-    Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource()));
-    Assert.assertEquals(permissions, actualRequest.getPermissionsList());
-    Assert.assertTrue(
-        channelProvider.isHeaderSent(
-            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
-            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void testIamPermissionsExceptionTest() throws Exception {
-    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
-    mockSecurityCenter.addException(exception);
-
-    try {
-      ResourceName resource = AssetName.of("[ORGANIZATION]", "[ASSET]");
-      List permissions = new ArrayList<>();
-
-      client.testIamPermissions(resource, permissions);
-      Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
-    }
-  }
-
   @Test
   @SuppressWarnings("all")
   public void updateFindingTest() {
@@ -932,7 +932,7 @@ public void updateSourceExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void updateSecurityMarksTest() {
-    SecurityMarksName name = AssetSecurityMarksName.of("[ORGANIZATION]", "[ASSET]");
+    SecurityMarksName name = SecurityMarksName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]");
     SecurityMarks expectedResponse = SecurityMarks.newBuilder().setName(name.toString()).build();
     mockSecurityCenter.addResponse(expectedResponse);
 
diff --git a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClientTest.java b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClientTest.java
index 15fb2e5b4..0824cc91b 100644
--- a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClientTest.java
+++ b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClientTest.java
@@ -1374,7 +1374,7 @@ public void updateSourceExceptionTest2() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void updateSecurityMarksTest() {
-    String name = "name3373707";
+    SecurityMarksName name = SecurityMarksName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]");
     SecurityMarks expectedResponse = SecurityMarks.newBuilder().setName(name.toString()).build();
     mockSecurityCenter.addResponse(expectedResponse);
 
@@ -1413,7 +1413,7 @@ public void updateSecurityMarksExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void updateSecurityMarksTest2() {
-    String name = "name3373707";
+    SecurityMarksName name = SecurityMarksName.ofOrganizationAssetName("[ORGANIZATION]", "[ASSET]");
     SecurityMarks expectedResponse = SecurityMarks.newBuilder().setName(name.toString()).build();
     mockSecurityCenter.addResponse(expectedResponse);
 
diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityMarksName.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityMarksName.java
index bbe40e199..78d7970b2 100644
--- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityMarksName.java
+++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityMarksName.java
@@ -83,10 +83,12 @@ public static Builder newBuilder() {
     return new Builder();
   }
 
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
   public static Builder newOrganizationAssetBuilder() {
     return new Builder();
   }
 
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
   public static OrganizationSourceFindingBuilder newOrganizationSourceFindingBuilder() {
     return new OrganizationSourceFindingBuilder();
   }
@@ -99,10 +101,12 @@ public static SecurityMarksName of(String organization, String asset) {
     return newOrganizationAssetBuilder().setOrganization(organization).setAsset(asset).build();
   }
 
+  @BetaApi("The static create methods are not stable yet and may be changed in the future.")
   public static SecurityMarksName ofOrganizationAssetName(String organization, String asset) {
     return newOrganizationAssetBuilder().setOrganization(organization).setAsset(asset).build();
   }
 
+  @BetaApi("The static create methods are not stable yet and may be changed in the future.")
   public static SecurityMarksName ofOrganizationSourceFindingName(
       String organization, String source, String finding) {
     return newOrganizationSourceFindingBuilder()
@@ -116,10 +120,12 @@ public static String format(String organization, String asset) {
     return newBuilder().setOrganization(organization).setAsset(asset).build().toString();
   }
 
+  @BetaApi("The static format methods are not stable yet and may be changed in the future.")
   public static String formatOrganizationAssetName(String organization, String asset) {
     return newBuilder().setOrganization(organization).setAsset(asset).build().toString();
   }
 
+  @BetaApi("The static format methods are not stable yet and may be changed in the future.")
   public static String formatOrganizationSourceFindingName(
       String organization, String source, String finding) {
     return newOrganizationSourceFindingBuilder()
@@ -248,6 +254,7 @@ public SecurityMarksName build() {
   }
 
   /** Builder for organizations/{organization}/sources/{source}/findings/{finding}/securityMarks. */
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
   public static class OrganizationSourceFindingBuilder {
 
     private String organization;
@@ -293,7 +300,7 @@ public boolean equals(Object o) {
     if (o == this) {
       return true;
     }
-    if (o == null || getClass() != o.getClass()) {
+    if (o != null || getClass() == o.getClass()) {
       SecurityMarksName that = (SecurityMarksName) o;
       return (Objects.equals(this.organization, that.organization))
           && (Objects.equals(this.asset, that.asset))
diff --git a/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/AssetSecurityMarksName.java b/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/AssetSecurityMarksName.java
index e6b02a73b..78cf25b85 100644
--- a/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/AssetSecurityMarksName.java
+++ b/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/AssetSecurityMarksName.java
@@ -23,13 +23,8 @@
 import java.util.List;
 import java.util.Map;
 
-/**
- * AUTO-GENERATED DOCUMENTATION AND CLASS
- *
- * @deprecated This resource name class will be removed in the next major version.
- */
+/** AUTO-GENERATED DOCUMENTATION AND CLASS */
 @javax.annotation.Generated("by GAPIC protoc plugin")
-@Deprecated
 public class AssetSecurityMarksName extends SecuritymarksName {
 
   private static final PathTemplate PATH_TEMPLATE =
diff --git a/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/FindingSecurityMarksName.java b/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/FindingSecurityMarksName.java
index e21206ac0..645301591 100644
--- a/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/FindingSecurityMarksName.java
+++ b/proto-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/FindingSecurityMarksName.java
@@ -23,13 +23,8 @@
 import java.util.List;
 import java.util.Map;
 
-/**
- * AUTO-GENERATED DOCUMENTATION AND CLASS
- *
- * @deprecated This resource name class will be removed in the next major version.
- */
+/** AUTO-GENERATED DOCUMENTATION AND CLASS */
 @javax.annotation.Generated("by GAPIC protoc plugin")
-@Deprecated
 public class FindingSecurityMarksName extends SecuritymarksName {
 
   private static final PathTemplate PATH_TEMPLATE =
diff --git a/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityMarksName.java b/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityMarksName.java
index 25a97f663..00ff409f7 100644
--- a/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityMarksName.java
+++ b/proto-google-cloud-securitycenter-v1p1beta1/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityMarksName.java
@@ -83,10 +83,12 @@ public static Builder newBuilder() {
     return new Builder();
   }
 
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
   public static Builder newOrganizationAssetBuilder() {
     return new Builder();
   }
 
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
   public static OrganizationSourceFindingBuilder newOrganizationSourceFindingBuilder() {
     return new OrganizationSourceFindingBuilder();
   }
@@ -99,10 +101,12 @@ public static SecurityMarksName of(String organization, String asset) {
     return newOrganizationAssetBuilder().setOrganization(organization).setAsset(asset).build();
   }
 
+  @BetaApi("The static create methods are not stable yet and may be changed in the future.")
   public static SecurityMarksName ofOrganizationAssetName(String organization, String asset) {
     return newOrganizationAssetBuilder().setOrganization(organization).setAsset(asset).build();
   }
 
+  @BetaApi("The static create methods are not stable yet and may be changed in the future.")
   public static SecurityMarksName ofOrganizationSourceFindingName(
       String organization, String source, String finding) {
     return newOrganizationSourceFindingBuilder()
@@ -116,10 +120,12 @@ public static String format(String organization, String asset) {
     return newBuilder().setOrganization(organization).setAsset(asset).build().toString();
   }
 
+  @BetaApi("The static format methods are not stable yet and may be changed in the future.")
   public static String formatOrganizationAssetName(String organization, String asset) {
     return newBuilder().setOrganization(organization).setAsset(asset).build().toString();
   }
 
+  @BetaApi("The static format methods are not stable yet and may be changed in the future.")
   public static String formatOrganizationSourceFindingName(
       String organization, String source, String finding) {
     return newOrganizationSourceFindingBuilder()
@@ -248,6 +254,7 @@ public SecurityMarksName build() {
   }
 
   /** Builder for organizations/{organization}/sources/{source}/findings/{finding}/securityMarks. */
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
   public static class OrganizationSourceFindingBuilder {
 
     private String organization;
@@ -293,7 +300,7 @@ public boolean equals(Object o) {
     if (o == this) {
       return true;
     }
-    if (o == null || getClass() != o.getClass()) {
+    if (o != null || getClass() == o.getClass()) {
       SecurityMarksName that = (SecurityMarksName) o;
       return (Objects.equals(this.organization, that.organization))
           && (Objects.equals(this.asset, that.asset))
diff --git a/renovate.json b/renovate.json
index 268a4669a..fc6412701 100644
--- a/renovate.json
+++ b/renovate.json
@@ -54,6 +54,13 @@
       "semanticCommitType": "build",
       "semanticCommitScope": "deps"
     },
+    {
+      "packagePatterns": [
+        "^com.google.cloud:libraries-bom"
+      ],
+      "semanticCommitType": "chore",
+      "semanticCommitScope": "deps"
+    },
     {
       "packagePatterns": [
         "^com.google.cloud:google-cloud-"
diff --git a/synth.metadata b/synth.metadata
index d954dccb5..72126b297 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -1,34 +1,11 @@
 {
-  "updateTime": "2020-02-20T23:03:49.486464Z",
+  "updateTime": "2020-03-09T21:42:40.388732Z",
   "sources": [
     {
       "generator": {
         "name": "artman",
-        "version": "0.45.0",
-        "dockerImage": "googleapis/artman@sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b"
-      }
-    },
-    {
-      "git": {
-        "name": ".",
-        "remote": "https://github.com/googleapis/java-securitycenter.git",
-        "sha": "1ea386e246b70a10f768f27fe2a59ec1c4600f01"
-      }
-    },
-    {
-      "git": {
-        "name": "googleapis",
-        "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "3eaaaf8626ce5b0c0bc7eee05e143beffa373b01",
-        "internalRef": "296274723",
-        "log": "3eaaaf8626ce5b0c0bc7eee05e143beffa373b01\nAdd BUILD.bazel for v1 secretmanager.googleapis.com\n\nPiperOrigin-RevId: 296274723\n\ne76149c3d992337f85eeb45643106aacae7ede82\nMove securitycenter v1 to use generate from annotations.\n\nPiperOrigin-RevId: 296266862\n\n203740c78ac69ee07c3bf6be7408048751f618f8\nAdd StackdriverLoggingConfig field to Cloud Tasks v2 API.\n\nPiperOrigin-RevId: 296256388\n\ne4117d5e9ed8bbca28da4a60a94947ca51cb2083\nCreate a Bazel BUILD file for the google.actions.type export.\n\nPiperOrigin-RevId: 296212567\n\na9639a0a9854fd6e1be08bba1ac3897f4f16cb2f\nAdd secretmanager.googleapis.com v1 protos\n\nPiperOrigin-RevId: 295983266\n\nce4f4c21d9dd2bfab18873a80449b9d9851efde8\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295861722\n\ncb61d6c2d070b589980c779b68ffca617f789116\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295855449\n\nab2685d8d3a0e191dc8aef83df36773c07cb3d06\nfix: Dataproc v1 - AutoscalingPolicy annotation\n\nThis adds the second resource name pattern to the\nAutoscalingPolicy resource.\n\nCommitter: @lukesneeringer\nPiperOrigin-RevId: 295738415\n\n8a1020bf6828f6e3c84c3014f2c51cb62b739140\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295286165\n\n5cfa105206e77670369e4b2225597386aba32985\nAdd service control related proto build rule.\n\nPiperOrigin-RevId: 295262088\n\nee4dddf805072004ab19ac94df2ce669046eec26\nmonitoring v3: Add prefix \"https://cloud.google.com/\" into the link for global access\ncl 295167522, get ride of synth.py hacks\n\nPiperOrigin-RevId: 295238095\n\n"
-      }
-    },
-    {
-      "git": {
-        "name": "synthtool",
-        "remote": "rpc://devrel/cloud/libraries/tools/autosynth",
-        "sha": "706a38c26db42299845396cdae55db635c38794a"
+        "version": "1.0.0",
+        "dockerImage": "googleapis/artman@sha256:f37f2464788cb551299209b4fcab4eb323533154488c2ef9ec0c75d7c2b4b482"
       }
     },
     {